diff --git a/lib/google_api/cloud_platform/client.rb b/lib/google_api/cloud_platform/client.rb index f7a00974efc..36859b4d025 100644 --- a/lib/google_api/cloud_platform/client.rb +++ b/lib/google_api/cloud_platform/client.rb @@ -43,40 +43,6 @@ module GoogleApi true end - def projects_list - service = Google::Apis::CloudresourcemanagerV1::CloudResourceManagerService.new - service.authorization = access_token - - service.fetch_all(items: :projects) do |token| - service.list_projects(page_token: token, options: user_agent_header) - end - end - - def projects_get_billing_info(project_id) - service = Google::Apis::CloudbillingV1::CloudbillingService.new - service.authorization = access_token - - service.get_project_billing_info("projects/#{project_id}", options: user_agent_header) - end - - def projects_zones_list(project_id) - service = Google::Apis::ComputeV1::ComputeService.new - service.authorization = access_token - - service.fetch_all do |token| - service.list_zones(project_id, page_token: token, options: user_agent_header) - end - end - - def projects_zones_machine_types_list(project_id, zone) - service = Google::Apis::ComputeV1::ComputeService.new - service.authorization = access_token - - service.fetch_all do |token| - service.list_machine_types(project_id, zone, page_token: token, options: user_agent_header) - end - end - def projects_zones_clusters_get(project_id, zone, cluster_id) service = Google::Apis::ContainerV1::ContainerService.new service.authorization = access_token diff --git a/spec/lib/google_api/cloud_platform/client_spec.rb b/spec/lib/google_api/cloud_platform/client_spec.rb index 040cbda9468..27cb3198e5b 100644 --- a/spec/lib/google_api/cloud_platform/client_spec.rb +++ b/spec/lib/google_api/cloud_platform/client_spec.rb @@ -50,54 +50,6 @@ describe GoogleApi::CloudPlatform::Client do end end - describe '#projects_list' do - subject { client.projects_list } - let(:projects) { double } - - before do - allow_any_instance_of(Google::Apis::CloudresourcemanagerV1::CloudResourceManagerService) - .to receive(:fetch_all).and_return(projects) - end - - it { is_expected.to eq(projects) } - end - - describe '#projects_get_billing_info' do - subject { client.projects_get_billing_info('project') } - let(:billing_info) { double } - - before do - allow_any_instance_of(Google::Apis::CloudbillingV1::CloudbillingService) - .to receive(:get_project_billing_info).and_return(billing_info) - end - - it { is_expected.to eq(billing_info) } - end - - describe '#projects_zones_list' do - subject { client.projects_zones_list('project') } - let(:zones) { double } - - before do - allow_any_instance_of(Google::Apis::ComputeV1::ComputeService) - .to receive(:fetch_all).and_return(zones) - end - - it { is_expected.to eq(zones) } - end - - describe '#projects_zones_machine_types_list' do - subject { client.projects_zones_machine_types_list('project', 'zone') } - let(:machine_types) { double } - - before do - allow_any_instance_of(Google::Apis::ComputeV1::ComputeService) - .to receive(:fetch_all).and_return(machine_types) - end - - it { is_expected.to eq(machine_types) } - end - describe '#projects_zones_clusters_get' do subject { client.projects_zones_clusters_get(spy, spy, spy) } let(:gke_cluster) { double }