-
Notifications
You must be signed in to change notification settings - Fork 71
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 #631 from inspec/CHEF-12244-MAGIC-MODULE-dataproc_…
…v1-Projects__locations__workflowTemplate CHEF-12244-MAGIC-MODULE-Dataproc Workflow Template - Resource Implementation
- Loading branch information
Showing
135 changed files
with
6,894 additions
and
0 deletions.
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
Large diffs are not rendered by default.
Oops, something went wrong.
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,47 @@ | ||
--- | ||
title: About the google_dataproc_workflow_templates resource | ||
platform: gcp | ||
--- | ||
|
||
## Syntax | ||
A `google_dataproc_workflow_templates` is used to test a Google WorkflowTemplates resource | ||
|
||
## Examples | ||
``` | ||
describe google_dataproc_workflow_templates(parent: 'value_parent') do | ||
it { should exist } | ||
its('ids') { should include 'value_id' } | ||
its('names') { should include 'value_name' } | ||
its('create_times') { should include 'value_createtime' } | ||
its('update_times') { should include 'value_updatetime' } | ||
its('dag_timeouts') { should include 'value_dagtimeout' } | ||
end | ||
``` | ||
## Parameters | ||
* `parent`: The resource name of the region or location, as described in https://cloud.google.com/apis/design/resource_names. | ||
For projects.regions.workflowTemplates,list, the resource name of the region has the following format: projects/{projectId}/regions/{region} | ||
For projects.locations.workflowTemplates.list, the resource name of the location has the following format: projects/{projectId}/locations/{location} | ||
|
||
## Properties | ||
Properties that can be accessed from the `google_dataproc_workflow_templates` resource: | ||
|
||
See [google_dataproc_project_location_workflow_template.md](google_dataproc_project_location_workflow_template.md) for more detailed information | ||
* `ids`: an array of `google_dataproc_project_location_workflow_template` id | ||
* `names`: an array of `google_dataproc_project_location_workflow_template` name | ||
* `versions`: an array of `google_dataproc_project_location_workflow_template` version | ||
* `create_times`: an array of `google_dataproc_project_location_workflow_template` create_time | ||
* `update_times`: an array of `google_dataproc_project_location_workflow_template` update_time | ||
* `labels`: an array of `google_dataproc_project_location_workflow_template` labels | ||
* `placements`: an array of `google_dataproc_project_location_workflow_template` placement | ||
* `jobs`: an array of `google_dataproc_project_location_workflow_template` jobs | ||
* `parameters`: an array of `google_dataproc_project_location_workflow_template` parameters | ||
* `dag_timeouts`: an array of `google_dataproc_project_location_workflow_template` dag_timeout | ||
* `encryption_configs`: an array of `google_dataproc_project_location_workflow_template` encryption_config | ||
|
||
## Filter Criteria | ||
This resource supports all of the above properties as filter criteria, which can be used | ||
with `where` as a block or a method. | ||
|
||
## GCP Permissions | ||
|
||
Ensure the [Cloud Dataproc API](https://console.cloud.google.com/apis/library/dataproc.googleapis.com) is enabled for the current project. |
53 changes: 53 additions & 0 deletions
53
libraries/google/dataproc/property/workflowtemplate_auxiliary_node_groups_node_group.rb
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,53 @@ | ||
# frozen_string_literal: false | ||
|
||
# ---------------------------------------------------------------------------- | ||
# | ||
# *** AUTO GENERATED CODE *** Type: MMv1 *** | ||
# | ||
# ---------------------------------------------------------------------------- | ||
# | ||
# This file is automatically generated by Magic Modules and manual | ||
# changes will be clobbered when the file is regenerated. | ||
# | ||
# Please read more about how to change this file in README.md and | ||
# CONTRIBUTING.md located at the root of this package. | ||
# | ||
# ---------------------------------------------------------------------------- | ||
require 'google/dataproc/property/workflowtemplate_auxiliary_node_groups_node_group_labels' | ||
require 'google/dataproc/property/workflowtemplate_auxiliary_node_groups_node_group_node_group_config' | ||
require 'google/dataproc/property/workflowtemplate_auxiliary_node_groups_node_group_node_group_config_accelerators' | ||
require 'google/dataproc/property/workflowtemplate_auxiliary_node_groups_node_group_node_group_config_disk_config' | ||
require 'google/dataproc/property/workflowtemplate_auxiliary_node_groups_node_group_node_group_config_instance_flexibility_policy' | ||
require 'google/dataproc/property/workflowtemplate_auxiliary_node_groups_policy_instance_selection_list' | ||
require 'google/dataproc/property/workflowtemplate_auxiliary_node_groups_policy_instance_selection_results' | ||
require 'google/dataproc/property/workflowtemplate_auxiliary_node_groups_node_group_node_group_config_instance_references' | ||
require 'google/dataproc/property/workflowtemplate_auxiliary_node_groups_node_group_node_group_config_managed_group_config' | ||
require 'google/dataproc/property/workflowtemplate_auxiliary_node_groups_node_group_node_group_config_startup_config' | ||
module GoogleInSpec | ||
module Dataproc | ||
module Property | ||
class WorkflowTemplateAuxiliaryNodeGroupsNodeGroup | ||
attr_reader :name | ||
|
||
attr_reader :roles | ||
|
||
attr_reader :node_group_config | ||
|
||
attr_reader :labels | ||
|
||
def initialize(args = nil, parent_identifier = nil) | ||
return if args.nil? | ||
@parent_identifier = parent_identifier | ||
@name = args['name'] | ||
@roles = args['roles'] | ||
@node_group_config = GoogleInSpec::Dataproc::Property::WorkflowTemplateAuxiliaryNodeGroupsNodeGroupNodeGroupConfig.new(args['nodeGroupConfig'], to_s) | ||
@labels = GoogleInSpec::Dataproc::Property::WorkflowTemplateAuxiliaryNodeGroupsNodeGroupLabels.new(args['labels'], to_s) | ||
end | ||
|
||
def to_s | ||
"#{@parent_identifier} WorkflowTemplateAuxiliaryNodeGroupsNodeGroup" | ||
end | ||
end | ||
end | ||
end | ||
end |
34 changes: 34 additions & 0 deletions
34
...ries/google/dataproc/property/workflowtemplate_auxiliary_node_groups_node_group_labels.rb
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,34 @@ | ||
# frozen_string_literal: false | ||
|
||
# ---------------------------------------------------------------------------- | ||
# | ||
# *** AUTO GENERATED CODE *** Type: MMv1 *** | ||
# | ||
# ---------------------------------------------------------------------------- | ||
# | ||
# This file is automatically generated by Magic Modules and manual | ||
# changes will be clobbered when the file is regenerated. | ||
# | ||
# Please read more about how to change this file in README.md and | ||
# CONTRIBUTING.md located at the root of this package. | ||
# | ||
# ---------------------------------------------------------------------------- | ||
module GoogleInSpec | ||
module Dataproc | ||
module Property | ||
class WorkflowTemplateAuxiliaryNodeGroupsNodeGroupLabels | ||
attr_reader :additional_properties | ||
|
||
def initialize(args = nil, parent_identifier = nil) | ||
return if args.nil? | ||
@parent_identifier = parent_identifier | ||
@additional_properties = args['additionalProperties'] | ||
end | ||
|
||
def to_s | ||
"#{@parent_identifier} WorkflowTemplateAuxiliaryNodeGroupsNodeGroupLabels" | ||
end | ||
end | ||
end | ||
end | ||
end |
81 changes: 81 additions & 0 deletions
81
.../dataproc/property/workflowtemplate_auxiliary_node_groups_node_group_node_group_config.rb
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,81 @@ | ||
# frozen_string_literal: false | ||
|
||
# ---------------------------------------------------------------------------- | ||
# | ||
# *** AUTO GENERATED CODE *** Type: MMv1 *** | ||
# | ||
# ---------------------------------------------------------------------------- | ||
# | ||
# This file is automatically generated by Magic Modules and manual | ||
# changes will be clobbered when the file is regenerated. | ||
# | ||
# Please read more about how to change this file in README.md and | ||
# CONTRIBUTING.md located at the root of this package. | ||
# | ||
# ---------------------------------------------------------------------------- | ||
require 'google/dataproc/property/workflowtemplate_auxiliary_node_groups_node_group_node_group_config_accelerators' | ||
require 'google/dataproc/property/workflowtemplate_auxiliary_node_groups_node_group_node_group_config_disk_config' | ||
require 'google/dataproc/property/workflowtemplate_auxiliary_node_groups_node_group_node_group_config_instance_flexibility_policy' | ||
require 'google/dataproc/property/workflowtemplate_auxiliary_node_groups_policy_instance_selection_list' | ||
require 'google/dataproc/property/workflowtemplate_auxiliary_node_groups_policy_instance_selection_results' | ||
require 'google/dataproc/property/workflowtemplate_auxiliary_node_groups_node_group_node_group_config_instance_references' | ||
require 'google/dataproc/property/workflowtemplate_auxiliary_node_groups_node_group_node_group_config_managed_group_config' | ||
require 'google/dataproc/property/workflowtemplate_auxiliary_node_groups_node_group_node_group_config_startup_config' | ||
module GoogleInSpec | ||
module Dataproc | ||
module Property | ||
class WorkflowTemplateAuxiliaryNodeGroupsNodeGroupNodeGroupConfig | ||
attr_reader :num_instances | ||
|
||
attr_reader :instance_names | ||
|
||
attr_reader :instance_references | ||
|
||
attr_reader :image_uri | ||
|
||
attr_reader :machine_type_uri | ||
|
||
attr_reader :disk_config | ||
|
||
attr_reader :is_preemptible | ||
|
||
attr_reader :preemptibility | ||
|
||
attr_reader :managed_group_config | ||
|
||
attr_reader :accelerators | ||
|
||
attr_reader :min_cpu_platform | ||
|
||
attr_reader :min_num_instances | ||
|
||
attr_reader :instance_flexibility_policy | ||
|
||
attr_reader :startup_config | ||
|
||
def initialize(args = nil, parent_identifier = nil) | ||
return if args.nil? | ||
@parent_identifier = parent_identifier | ||
@num_instances = args['numInstances'] | ||
@instance_names = args['instanceNames'] | ||
@instance_references = GoogleInSpec::Dataproc::Property::WorkflowTemplateAuxiliaryNodeGroupsNodeGroupNodeGroupConfigInstanceReferencesArray.parse(args['instanceReferences'], to_s) | ||
@image_uri = args['imageUri'] | ||
@machine_type_uri = args['machineTypeUri'] | ||
@disk_config = GoogleInSpec::Dataproc::Property::WorkflowTemplateAuxiliaryNodeGroupsNodeGroupNodeGroupConfigDiskConfig.new(args['diskConfig'], to_s) | ||
@is_preemptible = args['isPreemptible'] | ||
@preemptibility = args['preemptibility'] | ||
@managed_group_config = GoogleInSpec::Dataproc::Property::WorkflowTemplateAuxiliaryNodeGroupsNodeGroupNodeGroupConfigManagedGroupConfig.new(args['managedGroupConfig'], to_s) | ||
@accelerators = GoogleInSpec::Dataproc::Property::WorkflowTemplateAuxiliaryNodeGroupsNodeGroupNodeGroupConfigAcceleratorsArray.parse(args['accelerators'], to_s) | ||
@min_cpu_platform = args['minCpuPlatform'] | ||
@min_num_instances = args['minNumInstances'] | ||
@instance_flexibility_policy = GoogleInSpec::Dataproc::Property::WorkflowTemplateAuxiliaryNodeGroupsNodeGroupNodeGroupConfigInstanceFlexibilityPolicy.new(args['instanceFlexibilityPolicy'], to_s) | ||
@startup_config = GoogleInSpec::Dataproc::Property::WorkflowTemplateAuxiliaryNodeGroupsNodeGroupNodeGroupConfigStartupConfig.new(args['startupConfig'], to_s) | ||
end | ||
|
||
def to_s | ||
"#{@parent_identifier} WorkflowTemplateAuxiliaryNodeGroupsNodeGroupNodeGroupConfig" | ||
end | ||
end | ||
end | ||
end | ||
end |
45 changes: 45 additions & 0 deletions
45
...perty/workflowtemplate_auxiliary_node_groups_node_group_node_group_config_accelerators.rb
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,45 @@ | ||
# frozen_string_literal: false | ||
|
||
# ---------------------------------------------------------------------------- | ||
# | ||
# *** AUTO GENERATED CODE *** Type: MMv1 *** | ||
# | ||
# ---------------------------------------------------------------------------- | ||
# | ||
# This file is automatically generated by Magic Modules and manual | ||
# changes will be clobbered when the file is regenerated. | ||
# | ||
# Please read more about how to change this file in README.md and | ||
# CONTRIBUTING.md located at the root of this package. | ||
# | ||
# ---------------------------------------------------------------------------- | ||
module GoogleInSpec | ||
module Dataproc | ||
module Property | ||
class WorkflowTemplateAuxiliaryNodeGroupsNodeGroupNodeGroupConfigAccelerators | ||
attr_reader :accelerator_type_uri | ||
|
||
attr_reader :accelerator_count | ||
|
||
def initialize(args = nil, parent_identifier = nil) | ||
return if args.nil? | ||
@parent_identifier = parent_identifier | ||
@accelerator_type_uri = args['acceleratorTypeUri'] | ||
@accelerator_count = args['acceleratorCount'] | ||
end | ||
|
||
def to_s | ||
"#{@parent_identifier} WorkflowTemplateAuxiliaryNodeGroupsNodeGroupNodeGroupConfigAccelerators" | ||
end | ||
end | ||
|
||
class WorkflowTemplateAuxiliaryNodeGroupsNodeGroupNodeGroupConfigAcceleratorsArray | ||
def self.parse(value, parent_identifier) | ||
return if value.nil? | ||
return WorkflowTemplateAuxiliaryNodeGroupsNodeGroupNodeGroupConfigAccelerators.new(value, parent_identifier) unless value.is_a?(::Array) | ||
value.map { |v| WorkflowTemplateAuxiliaryNodeGroupsNodeGroupNodeGroupConfigAccelerators.new(v, parent_identifier) } | ||
end | ||
end | ||
end | ||
end | ||
end |
43 changes: 43 additions & 0 deletions
43
...operty/workflowtemplate_auxiliary_node_groups_node_group_node_group_config_disk_config.rb
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,43 @@ | ||
# frozen_string_literal: false | ||
|
||
# ---------------------------------------------------------------------------- | ||
# | ||
# *** AUTO GENERATED CODE *** Type: MMv1 *** | ||
# | ||
# ---------------------------------------------------------------------------- | ||
# | ||
# This file is automatically generated by Magic Modules and manual | ||
# changes will be clobbered when the file is regenerated. | ||
# | ||
# Please read more about how to change this file in README.md and | ||
# CONTRIBUTING.md located at the root of this package. | ||
# | ||
# ---------------------------------------------------------------------------- | ||
module GoogleInSpec | ||
module Dataproc | ||
module Property | ||
class WorkflowTemplateAuxiliaryNodeGroupsNodeGroupNodeGroupConfigDiskConfig | ||
attr_reader :boot_disk_type | ||
|
||
attr_reader :boot_disk_size_gb | ||
|
||
attr_reader :num_local_ssds | ||
|
||
attr_reader :local_ssd_interface | ||
|
||
def initialize(args = nil, parent_identifier = nil) | ||
return if args.nil? | ||
@parent_identifier = parent_identifier | ||
@boot_disk_type = args['bootDiskType'] | ||
@boot_disk_size_gb = args['bootDiskSizeGb'] | ||
@num_local_ssds = args['numLocalSsds'] | ||
@local_ssd_interface = args['localSsdInterface'] | ||
end | ||
|
||
def to_s | ||
"#{@parent_identifier} WorkflowTemplateAuxiliaryNodeGroupsNodeGroupNodeGroupConfigDiskConfig" | ||
end | ||
end | ||
end | ||
end | ||
end |
39 changes: 39 additions & 0 deletions
39
...emplate_auxiliary_node_groups_node_group_node_group_config_instance_flexibility_policy.rb
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,39 @@ | ||
# frozen_string_literal: false | ||
|
||
# ---------------------------------------------------------------------------- | ||
# | ||
# *** AUTO GENERATED CODE *** Type: MMv1 *** | ||
# | ||
# ---------------------------------------------------------------------------- | ||
# | ||
# This file is automatically generated by Magic Modules and manual | ||
# changes will be clobbered when the file is regenerated. | ||
# | ||
# Please read more about how to change this file in README.md and | ||
# CONTRIBUTING.md located at the root of this package. | ||
# | ||
# ---------------------------------------------------------------------------- | ||
require 'google/dataproc/property/workflowtemplate_auxiliary_node_groups_policy_instance_selection_list' | ||
require 'google/dataproc/property/workflowtemplate_auxiliary_node_groups_policy_instance_selection_results' | ||
module GoogleInSpec | ||
module Dataproc | ||
module Property | ||
class WorkflowTemplateAuxiliaryNodeGroupsNodeGroupNodeGroupConfigInstanceFlexibilityPolicy | ||
attr_reader :instance_selection_list | ||
|
||
attr_reader :instance_selection_results | ||
|
||
def initialize(args = nil, parent_identifier = nil) | ||
return if args.nil? | ||
@parent_identifier = parent_identifier | ||
@instance_selection_list = GoogleInSpec::Dataproc::Property::WorkflowTemplateAuxiliaryNodeGroupsPolicyInstanceSelectionListArray.parse(args['instanceSelectionList'], to_s) | ||
@instance_selection_results = GoogleInSpec::Dataproc::Property::WorkflowTemplateAuxiliaryNodeGroupsNodeGroupNodeGroupConfigInstanceFlexibilityPolicyInstanceSelectionResultsArray.parse(args['instanceSelectionResults'], to_s) | ||
end | ||
|
||
def to_s | ||
"#{@parent_identifier} WorkflowTemplateAuxiliaryNodeGroupsNodeGroupNodeGroupConfigInstanceFlexibilityPolicy" | ||
end | ||
end | ||
end | ||
end | ||
end |
Oops, something went wrong.