generated from sa-progress/magic-modules
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #168 from inspec/CHEF-7197-MAGIC-MODULE-compute_v1…
…-NodeType CHEF-7197-MAGIC-MODULE-compute_v1-NodeType - Resource Implementation
- Loading branch information
Showing
5 changed files
with
145 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
mmv1/templates/inspec/examples/google_compute_node_type/google_compute_node_type.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<% gcp_project_id = "#{external_attribute(pwd, 'gcp_project_id', doc_generation)}" -%> | ||
<% node_type = grab_attributes(pwd)['node_type'] -%> | ||
describe google_compute_v1_node_type(nodeType: <%= doc_generation ? "' #{node_type['nodeType']}'":"node_type['nodeType']" -%>, project: <%= gcp_project_id -%>, zone: <%= doc_generation ? "' #{node_type['zone']}'":"node_type['zone']" -%>) do | ||
it { should exist } | ||
its('kind') { should cmp <%= doc_generation ? "'#{node_type['kind']}'" : "node_type['kind']" -%> } | ||
its('id') { should cmp <%= doc_generation ? "'#{node_type['id']}'" : "node_type['id']" -%> } | ||
its('creation_timestamp') { should cmp <%= doc_generation ? "'#{node_type['creation_timestamp']}'" : "node_type['creation_timestamp']" -%> } | ||
its('name') { should cmp <%= doc_generation ? "'#{node_type['name']}'" : "node_type['name']" -%> } | ||
its('description') { should cmp <%= doc_generation ? "'#{node_type['description']}'" : "node_type['description']" -%> } | ||
its('cpu_platform') { should cmp <%= doc_generation ? "'#{node_type['cpu_platform']}'" : "node_type['cpu_platform']" -%> } | ||
its('zone') { should cmp <%= doc_generation ? "'#{node_type['zone']}'" : "node_type['zone']" -%> } | ||
its('self_link') { should cmp <%= doc_generation ? "'#{node_type['self_link']}'" : "node_type['self_link']" -%> } | ||
|
||
end | ||
|
||
describe google_compute_v1_node_type(nodeType: <%= doc_generation ? "' #{node_type['nodeType']}'":"node_type['nodeType']" -%>, project: <%= gcp_project_id -%>, zone: <%= doc_generation ? "' #{node_type['zone']}'":"node_type['zone']" -%>) do | ||
it { should_not exist } | ||
end |
3 changes: 3 additions & 0 deletions
3
...emplates/inspec/examples/google_compute_node_type/google_compute_node_type_attributes.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
gcp_project_id = input(:gcp_project_id, value: '<%= external_attribute(pwd, 'gcp_project_id') -%>', description: 'The GCP project identifier.') | ||
|
||
node_type = input('node_type', value: <%= JSON.pretty_generate(grab_attributes(pwd)['node_type']) -%>, description: 'node_type description') |
5 changes: 5 additions & 0 deletions
5
mmv1/templates/inspec/examples/google_compute_node_type/google_compute_node_types.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<% gcp_project_id = "#{external_attribute(pwd, 'gcp_project_id', doc_generation)}" -%> | ||
<% node_type = grab_attributes(pwd)['node_type'] -%> | ||
describe google_compute_v1_node_types(project: <%= gcp_project_id -%>, zone: <%= doc_generation ? "' #{node_type['zone']}'":"node_type['zone']" -%>) do | ||
it { should exist } | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters