Skip to content
This repository has been archived by the owner on Nov 14, 2024. It is now read-only.

InSpec Add back pathmatchers except for routerules #273

Merged
merged 1 commit into from
Dec 10, 2019
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
144 changes: 144 additions & 0 deletions docs/resources/google_compute_url_map.md

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions docs/resources/google_compute_url_maps.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ See [google_compute_url_map.md](google_compute_url_map.md) for more detailed inf
* `header_actions`: an array of `google_compute_url_map` header_action
* `host_rules`: an array of `google_compute_url_map` host_rules
* `names`: an array of `google_compute_url_map` name
* `path_matchers`: an array of `google_compute_url_map` path_matchers
* `tests`: an array of `google_compute_url_map` tests

## Filter Criteria
Expand Down
58 changes: 58 additions & 0 deletions libraries/google/compute/property/urlmap_path_matchers.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# frozen_string_literal: false

# ----------------------------------------------------------------------------
#
# *** AUTO GENERATED CODE *** AUTO GENERATED CODE ***
#
# ----------------------------------------------------------------------------
#
# 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/compute/property/urlmap_path_matchers_header_action'
require 'google/compute/property/urlmap_path_matchers_header_action_request_headers_to_add'
require 'google/compute/property/urlmap_path_matchers_header_action_response_headers_to_add'
require 'google/compute/property/urlmap_path_matchers_path_rules'
module GoogleInSpec
module Compute
module Property
class UrlMapPathMatchers
attr_reader :default_service

attr_reader :description

attr_reader :header_action

attr_reader :name

attr_reader :path_rules

def initialize(args = nil, parent_identifier = nil)
return if args.nil?
@parent_identifier = parent_identifier
@default_service = args['defaultService']
@description = args['description']
@header_action = GoogleInSpec::Compute::Property::UrlMapPathMatchersHeaderAction.new(args['headerAction'], to_s)
@name = args['name']
@path_rules = GoogleInSpec::Compute::Property::UrlMapPathMatchersPathRulesArray.parse(args['pathRules'], to_s)
end

def to_s
"#{@parent_identifier} UrlMapPathMatchers"
end
end

class UrlMapPathMatchersArray
def self.parse(value, parent_identifier)
return if value.nil?
return UrlMapPathMatchers.new(value, parent_identifier) unless value.is_a?(::Array)
value.map { |v| UrlMapPathMatchers.new(v, parent_identifier) }
end
end
end
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# frozen_string_literal: false

# ----------------------------------------------------------------------------
#
# *** AUTO GENERATED CODE *** AUTO GENERATED CODE ***
#
# ----------------------------------------------------------------------------
#
# 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/compute/property/urlmap_path_matchers_header_action_request_headers_to_add'
require 'google/compute/property/urlmap_path_matchers_header_action_response_headers_to_add'
module GoogleInSpec
module Compute
module Property
class UrlMapPathMatchersHeaderAction
attr_reader :request_headers_to_add

attr_reader :request_headers_to_remove

attr_reader :response_headers_to_add

attr_reader :response_headers_to_remove

def initialize(args = nil, parent_identifier = nil)
return if args.nil?
@parent_identifier = parent_identifier
@request_headers_to_add = GoogleInSpec::Compute::Property::UrlMapPathMatchersHeaderActionRequestHeadersToAddArray.parse(args['requestHeadersToAdd'], to_s)
@request_headers_to_remove = args['requestHeadersToRemove']
@response_headers_to_add = GoogleInSpec::Compute::Property::UrlMapPathMatchersHeaderActionResponseHeadersToAddArray.parse(args['responseHeadersToAdd'], to_s)
@response_headers_to_remove = args['responseHeadersToRemove']
end

def to_s
"#{@parent_identifier} UrlMapPathMatchersHeaderAction"
end
end
end
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# frozen_string_literal: false

# ----------------------------------------------------------------------------
#
# *** AUTO GENERATED CODE *** AUTO GENERATED CODE ***
#
# ----------------------------------------------------------------------------
#
# 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 Compute
module Property
class UrlMapPathMatchersHeaderActionRequestHeadersToAdd
attr_reader :header_name

attr_reader :header_value

attr_reader :replace

def initialize(args = nil, parent_identifier = nil)
return if args.nil?
@parent_identifier = parent_identifier
@header_name = args['headerName']
@header_value = args['headerValue']
@replace = args['replace']
end

def to_s
"#{@parent_identifier} UrlMapPathMatchersHeaderActionRequestHeadersToAdd"
end
end

class UrlMapPathMatchersHeaderActionRequestHeadersToAddArray
def self.parse(value, parent_identifier)
return if value.nil?
return UrlMapPathMatchersHeaderActionRequestHeadersToAdd.new(value, parent_identifier) unless value.is_a?(::Array)
value.map { |v| UrlMapPathMatchersHeaderActionRequestHeadersToAdd.new(v, parent_identifier) }
end
end
end
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# frozen_string_literal: false

# ----------------------------------------------------------------------------
#
# *** AUTO GENERATED CODE *** AUTO GENERATED CODE ***
#
# ----------------------------------------------------------------------------
#
# 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 Compute
module Property
class UrlMapPathMatchersHeaderActionResponseHeadersToAdd
attr_reader :header_name

attr_reader :header_value

attr_reader :replace

def initialize(args = nil, parent_identifier = nil)
return if args.nil?
@parent_identifier = parent_identifier
@header_name = args['headerName']
@header_value = args['headerValue']
@replace = args['replace']
end

def to_s
"#{@parent_identifier} UrlMapPathMatchersHeaderActionResponseHeadersToAdd"
end
end

class UrlMapPathMatchersHeaderActionResponseHeadersToAddArray
def self.parse(value, parent_identifier)
return if value.nil?
return UrlMapPathMatchersHeaderActionResponseHeadersToAdd.new(value, parent_identifier) unless value.is_a?(::Array)
value.map { |v| UrlMapPathMatchersHeaderActionResponseHeadersToAdd.new(v, parent_identifier) }
end
end
end
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# frozen_string_literal: false

# ----------------------------------------------------------------------------
#
# *** AUTO GENERATED CODE *** AUTO GENERATED CODE ***
#
# ----------------------------------------------------------------------------
#
# 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/compute/property/urlmap_path_matchers_path_rules_route_action'
require 'google/compute/property/urlmap_path_matchers_path_rules_route_action_cors_policy'
require 'google/compute/property/urlmap_path_matchers_path_rules_route_action_fault_injection_policy'
require 'google/compute/property/urlmap_path_matchers_path_rules_route_action_fault_injection_policy_abort'
require 'google/compute/property/urlmap_path_matchers_path_rules_route_action_fault_injection_policy_delay'
require 'google/compute/property/urlmap_path_matchers_path_rules_route_action_fault_injection_policy_delay_fixed_delay'
require 'google/compute/property/urlmap_path_matchers_path_rules_route_action_request_mirror_policy'
require 'google/compute/property/urlmap_path_matchers_path_rules_route_action_retry_policy'
require 'google/compute/property/urlmap_path_matchers_path_rules_route_action_retry_policy_per_try_timeout'
require 'google/compute/property/urlmap_path_matchers_path_rules_route_action_timeout'
require 'google/compute/property/urlmap_path_matchers_path_rules_route_action_url_rewrite'
require 'google/compute/property/urlmap_path_matchers_path_rules_route_action_weighted_backend_services'
require 'google/compute/property/urlmap_path_matchers_path_rules_url_redirect'
module GoogleInSpec
module Compute
module Property
class UrlMapPathMatchersPathRules
attr_reader :service

attr_reader :paths

attr_reader :route_action

attr_reader :url_redirect

def initialize(args = nil, parent_identifier = nil)
return if args.nil?
@parent_identifier = parent_identifier
@service = args['service']
@paths = args['paths']
@route_action = GoogleInSpec::Compute::Property::UrlMapPathMatchersPathRulesRouteAction.new(args['routeAction'], to_s)
@url_redirect = GoogleInSpec::Compute::Property::UrlMapPathMatchersPathRulesUrlRedirect.new(args['urlRedirect'], to_s)
end

def to_s
"#{@parent_identifier} UrlMapPathMatchersPathRules"
end
end

class UrlMapPathMatchersPathRulesArray
def self.parse(value, parent_identifier)
return if value.nil?
return UrlMapPathMatchersPathRules.new(value, parent_identifier) unless value.is_a?(::Array)
value.map { |v| UrlMapPathMatchersPathRules.new(v, parent_identifier) }
end
end
end
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# frozen_string_literal: false

# ----------------------------------------------------------------------------
#
# *** AUTO GENERATED CODE *** AUTO GENERATED CODE ***
#
# ----------------------------------------------------------------------------
#
# 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/compute/property/urlmap_path_matchers_path_rules_route_action_cors_policy'
require 'google/compute/property/urlmap_path_matchers_path_rules_route_action_fault_injection_policy'
require 'google/compute/property/urlmap_path_matchers_path_rules_route_action_fault_injection_policy_abort'
require 'google/compute/property/urlmap_path_matchers_path_rules_route_action_fault_injection_policy_delay'
require 'google/compute/property/urlmap_path_matchers_path_rules_route_action_fault_injection_policy_delay_fixed_delay'
require 'google/compute/property/urlmap_path_matchers_path_rules_route_action_request_mirror_policy'
require 'google/compute/property/urlmap_path_matchers_path_rules_route_action_retry_policy'
require 'google/compute/property/urlmap_path_matchers_path_rules_route_action_retry_policy_per_try_timeout'
require 'google/compute/property/urlmap_path_matchers_path_rules_route_action_timeout'
require 'google/compute/property/urlmap_path_matchers_path_rules_route_action_url_rewrite'
require 'google/compute/property/urlmap_path_matchers_path_rules_route_action_weighted_backend_services'
module GoogleInSpec
module Compute
module Property
class UrlMapPathMatchersPathRulesRouteAction
attr_reader :cors_policy

attr_reader :fault_injection_policy

attr_reader :request_mirror_policy

attr_reader :retry_policy

attr_reader :timeout

attr_reader :url_rewrite

attr_reader :weighted_backend_services

def initialize(args = nil, parent_identifier = nil)
return if args.nil?
@parent_identifier = parent_identifier
@cors_policy = GoogleInSpec::Compute::Property::UrlMapPathMatchersPathRulesRouteActionCorsPolicy.new(args['corsPolicy'], to_s)
@fault_injection_policy = GoogleInSpec::Compute::Property::UrlMapPathMatchersPathRulesRouteActionFaultInjectionPolicy.new(args['faultInjectionPolicy'], to_s)
@request_mirror_policy = GoogleInSpec::Compute::Property::UrlMapPathMatchersPathRulesRouteActionRequestMirrorPolicy.new(args['requestMirrorPolicy'], to_s)
@retry_policy = GoogleInSpec::Compute::Property::UrlMapPathMatchersPathRulesRouteActionRetryPolicy.new(args['retryPolicy'], to_s)
@timeout = GoogleInSpec::Compute::Property::UrlMapPathMatchersPathRulesRouteActionTimeout.new(args['timeout'], to_s)
@url_rewrite = GoogleInSpec::Compute::Property::UrlMapPathMatchersPathRulesRouteActionUrlRewrite.new(args['urlRewrite'], to_s)
@weighted_backend_services = GoogleInSpec::Compute::Property::UrlMapPathMatchersPathRulesRouteActionWeightedBackendServicesArray.parse(args['weightedBackendServices'], to_s)
end

def to_s
"#{@parent_identifier} UrlMapPathMatchersPathRulesRouteAction"
end
end
end
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# frozen_string_literal: false

# ----------------------------------------------------------------------------
#
# *** AUTO GENERATED CODE *** AUTO GENERATED CODE ***
#
# ----------------------------------------------------------------------------
#
# 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 Compute
module Property
class UrlMapPathMatchersPathRulesRouteActionCorsPolicy
attr_reader :allow_credentials

attr_reader :allow_headers

attr_reader :allow_methods

attr_reader :allow_origin_regexes

attr_reader :allow_origins

attr_reader :disabled

attr_reader :expose_headers

attr_reader :max_age

def initialize(args = nil, parent_identifier = nil)
return if args.nil?
@parent_identifier = parent_identifier
@allow_credentials = args['allowCredentials']
@allow_headers = args['allowHeaders']
@allow_methods = args['allowMethods']
@allow_origin_regexes = args['allowOriginRegexes']
@allow_origins = args['allowOrigins']
@disabled = args['disabled']
@expose_headers = args['exposeHeaders']
@max_age = args['maxAge']
end

def to_s
"#{@parent_identifier} UrlMapPathMatchersPathRulesRouteActionCorsPolicy"
end
end
end
end
end
Loading