Skip to content

Commit

Permalink
Remove Ansible references throughout the repo (GoogleCloudPlatform#7218)
Browse files Browse the repository at this point in the history
  • Loading branch information
rileykarson authored and ericayyliu committed Jul 26, 2023
1 parent 8e2a14d commit 4c293f3
Show file tree
Hide file tree
Showing 17 changed files with 11 additions and 267 deletions.
8 changes: 0 additions & 8 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,3 @@ contact_links:
url: https://github.com/hashicorp/terraform-provider-google/issues/new/choose
about: |
Terraform-specific issues or FRs
- name: Ansible Issue
url: https://github.com/ansible-collections/google.cloud/issues/new/choose
about: |
Ansible-specific issues or FRs
- name: InSpec Issue
url: https://github.com/inspec/inspec-gcp/issues/new/choose
about: |
InSpec-specific issues or FRs
5 changes: 1 addition & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,6 @@ ehthumbs.db
Thumbs.db

final_api.yaml
# Ansible PR Script
mmv1/tools/ansible-pr/templates/*
!mmv1/tools/ansible-pr/templates/.keep

# Used by OiCS tutorial
mmv1/build/*
Expand All @@ -54,4 +51,4 @@ mmv1/build/*
# ignore serialization generation build data
tpgtools/temp.serial

tpgtools/serialization.go
tpgtools/serialization.go
2 changes: 1 addition & 1 deletion docs/content/docs/getting-started/setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,4 +108,4 @@ Check for git in path...

## Test your setup

Try [generating the providers](/magic-modules/docs/getting-started/generate-providers/). If your environment is set up correctly, it should succeed with no errors!
Try [generating the providers](/magic-modules/docs/getting-started/generate-providers/). If your environment is set up correctly, it should succeed with no errors!
109 changes: 0 additions & 109 deletions mmv1/TUTORIAL.md

This file was deleted.

6 changes: 0 additions & 6 deletions mmv1/api/resource/nested_query.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,18 +44,12 @@ class NestedQuery < Api::Object
# }
attr_reader :modify_by_patch

# Nested resources generally don't have a kind field.
# This is used as a (potentially unnecessary) placeholder by Ansible
attr_reader :kind

def validate
super

check :keys, type: Array, item_type: String, required: true
check :is_list_of_ids, type: :boolean, default: false
check :modify_by_patch, type: :boolean, default: false

check :kind, type: String
end
end
end
Expand Down
8 changes: 0 additions & 8 deletions mmv1/compile/core.rb
Original file line number Diff line number Diff line change
Expand Up @@ -132,14 +132,6 @@ def compile(file, caller_frame = 1)
raise
end

def ansible_style_yaml(obj, options = {})
if obj.is_a?(::Hash)
obj.reject { |_, v| v.nil? }.to_yaml(options).sub("---\n", '')
else
obj.to_yaml(options).sub("---\n", '')
end
end

# Compiles a ERB template from a file.
#
# Arguments:
Expand Down
4 changes: 1 addition & 3 deletions mmv1/compiler.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@

$LOAD_PATH.unshift File.dirname(__FILE__)

# Run from compiler dir so all references are relative to the compiler
# executable. This allows the following command line:
# ruby compiler.rb -p products/compute -e ansible -o build/ansible
# Run from compiler dir so all references are relative to compiler.rb
Dir.chdir(File.dirname(__FILE__))

# Our default timezone is UTC, to avoid local time compromise test code seed
Expand Down
1 change: 0 additions & 1 deletion mmv1/products/activedirectory/api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,6 @@ objects:
identity:
- targetDomainName
nested_query: !ruby/object:Api::Resource::NestedQuery
kind: 'domain#trustList'
keys: ['trusts']
async: !ruby/object:Api::OpAsync
operation: !ruby/object:Api::OpAsync::Operation
Expand Down
97 changes: 0 additions & 97 deletions mmv1/products/bigtable/api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -92,100 +92,3 @@ objects:
description: |
If true, CheckAndMutateRow and ReadModifyWriteRow requests are allowed by this app profile.
It is unsafe to send these requests to the same table/row/column in multiple clusters.
- !ruby/object:Api::Resource
name: Instance
base_url: projects/{{project}}/instances
description: |
A collection of Bigtable Tables and the resources that serve them. All
tables in an instance are served from all Clusters in the instance.
async: !ruby/object:Api::OpAsync
actions: ['create']
operation: !ruby/object:Api::OpAsync::Operation
path: 'name'
# TODO: change this to be less Pythonic.
# Only Ansible uses this, so it's alright for now.
base_url: "operations/{module.params['clusters'][0]['location']}/{{op_id}}"
wait_ms: 1000
result: !ruby/object:Api::OpAsync::Result
path: 'response'
resource_inside_response: true
status: !ruby/object:Api::OpAsync::Status
path: 'done'
complete: True
allowed:
- True
- False
error: !ruby/object:Api::OpAsync::Error
path: 'error'
message: 'message'
properties:
- !ruby/object:Api::Type::Enum
name: state
description: The current state of the instance.
values:
- :STATE_NOT_KNOWN
- :READY
- :CREATING
output: true
- !ruby/object:Api::Type::String
name: name
description: The unique name of the instance.
- !ruby/object:Api::Type::String
name: displayName
description: |
The descriptive name for this instance as it appears in UIs.
Can be changed at any time, but should be kept globally unique
to avoid confusion.
- !ruby/object:Api::Type::Enum
name: type
description: The type of the instance. Defaults to `PRODUCTION`.
values:
- :TYPE_UNSPECIFIED
- :PRODUCTION
- :DEVELOPMENT
- !ruby/object:Api::Type::KeyValuePairs
name: labels
description: |
Labels are a flexible and lightweight mechanism for organizing cloud
resources into groups that reflect a customer's organizational needs and
deployment strategies. They can be used to filter resources and aggregate
metrics.
- !ruby/object:Api::Type::Array
name: clusters
description: An array of clusters. Maximum 4.
item_type: !ruby/object:Api::Type::NestedObject
properties:
- !ruby/object:Api::Type::String
name: name
description: The unique name of the cluster.
- !ruby/object:Api::Type::Integer
name: serveNodes
description: |
The number of nodes allocated to this cluster. More nodes enable higher
throughput and more consistent performance.
- !ruby/object:Api::Type::Enum
name: defaultStorageType
description: |
The type of storage used by this cluster to serve its
parent instance's tables, unless explicitly overridden.
values:
- :STORAGE_TYPE_UNSPECIFIED
- :SSD
- :HDD
- !ruby/object:Api::Type::String
name: location
description: |
The location where this cluster's nodes and storage reside. For best
performance, clients should be located as close as possible to this
cluster. Currently only zones are supported, so values should be of the
form `projects/<project>/locations/<zone>`.
- !ruby/object:Api::Type::Enum
name: state
description: The current state of the cluster.
values:
- :STATE_NOT_KNOWN
- :READY
- :CREATING
- :RESIZING
- :DISABLED
output: true
3 changes: 0 additions & 3 deletions mmv1/products/bigtable/terraform.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@

--- !ruby/object:Provider::Terraform::Config
overrides: !ruby/object:Overrides::ResourceOverrides
Instance: !ruby/object:Overrides::Terraform::ResourceOverride
exclude_resource: true
exclude: true
AppProfile: !ruby/object:Overrides::Terraform::ResourceOverride
id_format: "projects/{{project}}/instances/{{instance}}/appProfiles/{{app_profile_id}}"
import_format: ["projects/{{project}}/instances/{{instance}}/appProfiles/{{app_profile_id}}"]
Expand Down
1 change: 0 additions & 1 deletion mmv1/products/dns/api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,6 @@ objects:
base_url: 'projects/{{project}}/managedZones/{{managed_zone}}/changes'
self_link: 'projects/{{project}}/managedZones/{{managed_zone}}/rrsets?name={{name}}&type={{type}}'
nested_query: !ruby/object:Api::Resource::NestedQuery
kind: 'dns#resourceRecordSetsListResponse'
keys: ['rrsets']
collection_url_key: 'rrsets'
identity:
Expand Down
1 change: 0 additions & 1 deletion mmv1/products/resourcemanager/api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,6 @@ objects:
# of where that happens.
self_link: liens?parent={{parent}}
nested_query: !ruby/object:Api::Resource::NestedQuery
kind: 'resourceManager#liensList'
keys:
- liens
identity:
Expand Down
2 changes: 0 additions & 2 deletions mmv1/products/serviceusage/api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ objects:
'Getting Started': 'https://cloud.google.com/service-usage/docs/manage-quota#create_consumer_quota_override'
'REST API documentation': 'https://cloud.google.com/service-usage/docs/reference/rest/v1beta1/services.consumerQuotaMetrics.limits.adminOverrides'
nested_query: !ruby/object:Api::Resource::NestedQuery
kind: 'serviceusage#overridesList'
keys:
- overrides
identity:
Expand Down Expand Up @@ -132,7 +131,6 @@ objects:
'Getting Started': 'https://cloud.google.com/service-usage/docs/getting-started'
'REST API documentation': 'https://cloud.google.com/service-usage/docs/reference/rest/v1beta1/services.consumerQuotaMetrics.limits.consumerOverrides'
nested_query: !ruby/object:Api::Resource::NestedQuery
kind: 'serviceusage#overridesList'
keys:
- overrides
identity:
Expand Down
3 changes: 0 additions & 3 deletions mmv1/products/sql/api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,6 @@ objects:
base_url: projects/{{project}}/instances/{{instance}}/users
self_link: 'projects/{{project}}/instances/{{instance}}/users?name={{name}}&host={{host}}'
nested_query: !ruby/object:Api::Resource::NestedQuery
kind: 'sql#usersList'
keys: ['items']
collection_url_key: 'items'
identity:
Expand Down Expand Up @@ -602,7 +601,6 @@ objects:
base_url: flags
self_link: flags
nested_query: !ruby/object:Api::Resource::NestedQuery
kind: 'sql#flagsList'
keys: ['items']
readonly: true
properties:
Expand Down Expand Up @@ -655,7 +653,6 @@ objects:
base_url: projects/{{project}}/tiers
self_link: projects/{{project}}/tiers
nested_query: !ruby/object:Api::Resource::NestedQuery
kind: 'sql#tiersList'
keys: ['items']
identity:
- tier
Expand Down
2 changes: 0 additions & 2 deletions mmv1/products/tags/api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,6 @@ objects:
self_link: "tagBindings/?parent={{parent}}&pageSize=300"
delete_url: "tagBindings/{{name}}"
nested_query: !ruby/object:Api::Resource::NestedQuery
kind: 'tags#tagBindingList'
keys: ['tagBindings']
input: true
description: A TagBinding represents a connection between a TagValue and a cloud resource (currently project, folder, or organization). Once a TagBinding is created, the TagValue is applied to all the descendants of the cloud resource.
Expand All @@ -205,4 +204,3 @@ objects:
description: |
The TagValue of the TagBinding. Must be of the form tagValues/456.
required: true

Loading

0 comments on commit 4c293f3

Please sign in to comment.