Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move DiskType to a resourceref so you can successfully create ssd disks. #337

Merged
merged 4 commits into from
Jul 10, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build/ansible
2 changes: 1 addition & 1 deletion build/terraform
5 changes: 3 additions & 2 deletions products/compute/api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -834,9 +834,10 @@ objects:

global/images/family/my-private-family
input: true
# TODO(nelsonjr): Make this a resource refefence
- !ruby/object:Api::Type::String
- !ruby/object:Api::Type::ResourceRef
name: 'type'
resource: 'DiskType'
imports: 'selfLink'
description: |
URL of the disk type resource describing which disk type to use to
create the disk. Provide this when creating the disk.
Expand Down
4 changes: 2 additions & 2 deletions provider/ansible/request.rb
Original file line number Diff line number Diff line change
Expand Up @@ -137,9 +137,9 @@ def request_output(prop, hash_name, module_name)
].join
elsif prop.is_a?(Api::Type::ResourceRef) && \
prop.resource_ref.virtual && prop.imports == 'selfLink'
func_name = Google::StringUtils.underscore("#{prop.name}_selflink")
func = "#{Google::StringUtils.underscore(prop.resource)}_selflink"
[
"#{func_name}(#{hash_name}.get(#{quote_string(prop.out_name)}),",
"#{func}(#{hash_name}.get(#{quote_string(prop.out_name)}),",
"#{module_name}.params)"
].join(' ')
elsif prop.is_a?(Api::Type::Array) && \
Expand Down