From 61ff6fb16c76bbc7210ca220cb9c4418a7f3704a Mon Sep 17 00:00:00 2001 From: Martin Slemr Date: Fri, 15 Jan 2021 14:52:34 +0100 Subject: [PATCH 1/2] Google Seeds --- db/seeds/application_types.yml | 3 +++ db/seeds/source_types.yml | 28 ++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+) diff --git a/db/seeds/application_types.yml b/db/seeds/application_types.yml index 8575c6f5..f5c90c56 100644 --- a/db/seeds/application_types.yml +++ b/db/seeds/application_types.yml @@ -14,12 +14,15 @@ :supported_source_types: - amazon - azure + - google - openshift :supported_authentication_types: amazon: - arn azure: - tenant_id_client_id_client_secret + google: + - username_password openshift: - token "/insights/platform/cloud-meter": diff --git a/db/seeds/source_types.yml b/db/seeds/source_types.yml index 4061f47b..9d58a8e3 100644 --- a/db/seeds/source_types.yml +++ b/db/seeds/source_types.yml @@ -123,6 +123,34 @@ ansible-tower: :condition: :when: endpoint.verify_ssl :is: true +google: + :product_name: Google Cloud Engine + :vendor: Google + :icon_url: "/apps/chrome/assets/images/partners-icons/google-cloud-engine.svg" # TODO + :schema: + :authentication: + - :type: username_password + :name: Project ID and Service Account JSON + :fields: + - :component: text-field + :name: authentication.authtype + :hideField: true + :initializeOnMount: true + :initialValue: username_password + - :component: text-field + :name: authentication.username + :label: Project ID + - :component: textarea + :name: authentication.password + :label: Service Account JSON + :endpoint: + :hidden: true + :fields: + - :component: text-field + :name: endpoint.role + :hideField: true + :initializeOnMount: true + :initialValue: google azure: :product_name: Microsoft Azure :vendor: Azure From 0294494ff81f707cd2a91be465e791136cfc4ea8 Mon Sep 17 00:00:00 2001 From: Martin Slemr Date: Fri, 22 Jan 2021 09:34:55 +0100 Subject: [PATCH 2/2] Google seeds update --- db/seeds/application_types.yml | 2 +- db/seeds/source_types.yml | 15 +++++++++++---- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/db/seeds/application_types.yml b/db/seeds/application_types.yml index f5c90c56..9b7e9551 100644 --- a/db/seeds/application_types.yml +++ b/db/seeds/application_types.yml @@ -22,7 +22,7 @@ azure: - tenant_id_client_id_client_secret google: - - username_password + - project_id_service_account_json openshift: - token "/insights/platform/cloud-meter": diff --git a/db/seeds/source_types.yml b/db/seeds/source_types.yml index 9d58a8e3..99f640fe 100644 --- a/db/seeds/source_types.yml +++ b/db/seeds/source_types.yml @@ -124,25 +124,32 @@ ansible-tower: :when: endpoint.verify_ssl :is: true google: - :product_name: Google Cloud Engine + :product_name: Google Cloud :vendor: Google - :icon_url: "/apps/chrome/assets/images/partners-icons/google-cloud-engine.svg" # TODO + :icon_url: "/apps/frontend-assets/partners-icons/google-cloud.svg" :schema: :authentication: - - :type: username_password + - :type: project_id_service_account_json :name: Project ID and Service Account JSON :fields: - :component: text-field :name: authentication.authtype :hideField: true :initializeOnMount: true - :initialValue: username_password + :initialValue: project_id_service_account_json - :component: text-field :name: authentication.username :label: Project ID - :component: textarea :name: authentication.password :label: Service Account JSON + - :component: text-field + :name: application.extra.dataset + :stepKey: cost-management + :label: Dataset name + :isRequired: true + :validate: + - :type: required :endpoint: :hidden: true :fields: