From 9f1fd902f9e48072a5c5eb178751dbe1326ee145 Mon Sep 17 00:00:00 2001 From: Nathan McKinley Date: Mon, 9 Jul 2018 14:47:06 -0700 Subject: [PATCH 1/3] Move DiskType to a resourceref so you can successfully create ssd disks. --- products/compute/api.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/products/compute/api.yaml b/products/compute/api.yaml index d7145563d6f1..7d26104e3167 100644 --- a/products/compute/api.yaml +++ b/products/compute/api.yaml @@ -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. From 035ab4c311340cb9e1537661ed2771a6c50733b3 Mon Sep 17 00:00:00 2001 From: Nathan McKinley Date: Mon, 9 Jul 2018 15:52:04 -0700 Subject: [PATCH 2/3] Ansible bugfix. The function called for virtual resourceref selflinks was different here and at the declaration point. Here it was 'underscored(prop.name)_selflink', but in the other place it's underscored(referenced_resource.name)_selflink'. This works sometimes, but in case of 'DiskType' vs Disk's field 'Type', it doesn't. --- provider/ansible/request.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/provider/ansible/request.rb b/provider/ansible/request.rb index 20d2ad36042d..6e3888c025b2 100644 --- a/provider/ansible/request.rb +++ b/provider/ansible/request.rb @@ -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) && \ From 90a896e4fa8f9d8fe2375d154bff47b8fe105df6 Mon Sep 17 00:00:00 2001 From: Modular Magician Date: Tue, 10 Jul 2018 17:54:10 +0000 Subject: [PATCH 3/3] Update tracked submodules -> HEAD on Tue Jul 10 17:54:10 UTC 2018 Tracked submodules are build/puppet/compute build/puppet/sql build/puppet/storage build/chef/compute build/chef/sql build/chef/storage build/terraform build/ansible. --- build/ansible | 2 +- build/chef/compute | 2 +- build/puppet/compute | 2 +- build/terraform | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/build/ansible b/build/ansible index 7cb378bcc613..3303fc5093aa 160000 --- a/build/ansible +++ b/build/ansible @@ -1 +1 @@ -Subproject commit 7cb378bcc613a42a11d39c7a258b4efb2d2a1c6e +Subproject commit 3303fc5093aab17ff433f27c6ec365e9eb556826 diff --git a/build/chef/compute b/build/chef/compute index 655ec16ef8fa..1bdf5a16443a 160000 --- a/build/chef/compute +++ b/build/chef/compute @@ -1 +1 @@ -Subproject commit 655ec16ef8faaa2a4132bc3873f6edce3c43fa1a +Subproject commit 1bdf5a16443a1033f9611071aec997d85c81a9a5 diff --git a/build/puppet/compute b/build/puppet/compute index 3de9868a6757..39af2923f2f4 160000 --- a/build/puppet/compute +++ b/build/puppet/compute @@ -1 +1 @@ -Subproject commit 3de9868a67573a031d2c727b990e1562a552c437 +Subproject commit 39af2923f2f4e55e9ac374437ac008cbb2f23c5b diff --git a/build/terraform b/build/terraform index 064ec03ffa6e..b93a759b2539 160000 --- a/build/terraform +++ b/build/terraform @@ -1 +1 @@ -Subproject commit 064ec03ffa6e1fbb696012740646d27cf8d04214 +Subproject commit b93a759b25399dc88e09cae86703deb33794a40a