Skip to content

Commit

Permalink
Merge pull request #181 from inspec/CHEF-7367_1-MAGIC-MODULE-dataflow…
Browse files Browse the repository at this point in the history
…_v1b3-Projects__locations__job

CHEF-7367_1-MAGIC-MODULE-dataflow_v1b3-Projects__locations__job - Resource Implementation
  • Loading branch information
balasubramanian-s authored Feb 7, 2024
2 parents 19d479e + a4df15e commit 753e610
Show file tree
Hide file tree
Showing 6 changed files with 2,239 additions and 0 deletions.
2,174 changes: 2,174 additions & 0 deletions mmv1/products/dataflow/api.yaml

Large diffs are not rendered by default.

15 changes: 15 additions & 0 deletions mmv1/products/dataflow/inspec.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Copyright 2017 Google Inc.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

--- !ruby/object:Provider::Inspec::Config
overrides: !ruby/object:Overrides::ResourceOverrides
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<% gcp_project_id = "#{external_attribute(pwd, 'gcp_project_id', doc_generation)}" -%>
<% project_location_job = grab_attributes(pwd)['project_location_job'] -%>
describe google_dataflow_project_location_job(jobId: <%= doc_generation ? "' #{project_location_job['jobId']}'":"project_location_job['jobId']" -%>, location: <%= doc_generation ? "' #{project_location_job['location']}'":"project_location_job['location']" -%>, projectId: <%= doc_generation ? "' #{project_location_job['projectId']}'":"project_location_job['projectId']" -%>) do
it { should exist }
its('id') { should cmp <%= doc_generation ? "'#{project_location_job['id']}'" : "project_location_job['id']" -%> }
its('project_id') { should cmp <%= doc_generation ? "'#{project_location_job['project_id']}'" : "project_location_job['project_id']" -%> }
its('name') { should cmp <%= doc_generation ? "'#{project_location_job['name']}'" : "project_location_job['name']" -%> }
its('type') { should cmp <%= doc_generation ? "'#{project_location_job['type']}'" : "project_location_job['type']" -%> }
its('steps_location') { should cmp <%= doc_generation ? "'#{project_location_job['steps_location']}'" : "project_location_job['steps_location']" -%> }
its('current_state') { should cmp <%= doc_generation ? "'#{project_location_job['current_state']}'" : "project_location_job['current_state']" -%> }
its('current_state_time') { should cmp <%= doc_generation ? "'#{project_location_job['current_state_time']}'" : "project_location_job['current_state_time']" -%> }
its('requested_state') { should cmp <%= doc_generation ? "'#{project_location_job['requested_state']}'" : "project_location_job['requested_state']" -%> }
its('create_time') { should cmp <%= doc_generation ? "'#{project_location_job['create_time']}'" : "project_location_job['create_time']" -%> }
its('replace_job_id') { should cmp <%= doc_generation ? "'#{project_location_job['replace_job_id']}'" : "project_location_job['replace_job_id']" -%> }
its('client_request_id') { should cmp <%= doc_generation ? "'#{project_location_job['client_request_id']}'" : "project_location_job['client_request_id']" -%> }
its('replaced_by_job_id') { should cmp <%= doc_generation ? "'#{project_location_job['replaced_by_job_id']}'" : "project_location_job['replaced_by_job_id']" -%> }
its('location') { should cmp <%= doc_generation ? "'#{project_location_job['location']}'" : "project_location_job['location']" -%> }
its('start_time') { should cmp <%= doc_generation ? "'#{project_location_job['start_time']}'" : "project_location_job['start_time']" -%> }
its('created_from_snapshot_id') { should cmp <%= doc_generation ? "'#{project_location_job['created_from_snapshot_id']}'" : "project_location_job['created_from_snapshot_id']" -%> }

end

describe google_dataflow_project_location_job(jobId: <%= doc_generation ? "' #{project_location_job['jobId']}'":"project_location_job['jobId']" -%>, location: <%= doc_generation ? "' #{project_location_job['location']}'":"project_location_job['location']" -%>, projectId: <%= doc_generation ? "' #{project_location_job['projectId']}'":"project_location_job['projectId']" -%>) do
it { should_not exist }
end
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.')

project_location_job = input('project_location_job', value: <%= JSON.pretty_generate(grab_attributes(pwd)['project_location_job']) -%>, description: 'project_location_job description')
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)}" -%>
<% project_location_job = grab_attributes(pwd)['project_location_job'] -%>
describe google_dataflow_project_location_jobs(location: <%= doc_generation ? "' #{project_location_job['location']}'":"project_location_job['location']" -%>, projectId: <%= doc_generation ? "' #{project_location_job['projectId']}'":"project_location_job['projectId']" -%>) do
it { should exist }
end
Original file line number Diff line number Diff line change
Expand Up @@ -1007,6 +1007,23 @@ machine_image:
source_instance : "value_sourceinstance"
status : "value_status"
total_storage_bytes : "value_totalstoragebytes"
project_location_job:
job_id : "value_jobid"
location : "value_location"
project_id : "value_projectid"
id : "value_id"
name : "value_name"
type : "value_type"
steps_location : "value_stepslocation"
current_state : "value_currentstate"
current_state_time : "value_currentstatetime"
requested_state : "value_requestedstate"
create_time : "value_createtime"
replace_job_id : "value_replacejobid"
client_request_id : "value_clientrequestid"
replaced_by_job_id : "value_replacedbyjobid"
start_time : "value_starttime"
created_from_snapshot_id : "value_createdfromsnapshotid"
network_edge_security_service:
machine_type : "value_machinetype"
project : "value_project"
Expand Down

0 comments on commit 753e610

Please sign in to comment.