This repository has been archived by the owner on Nov 14, 2024. It is now read-only.
forked from inspec/inspec-gcp
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add ScaleInControl fields to GCE Autoscalers (#4147) (#471)
Signed-off-by: Modular Magician <[email protected]>
- Loading branch information
1 parent
5cfceae
commit e899f8f
Showing
5 changed files
with
92 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
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
38 changes: 38 additions & 0 deletions
38
libraries/google/compute/property/autoscaler_autoscaling_policy_scale_in_control.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,38 @@ | ||
# 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/autoscaler_autoscaling_policy_scale_in_control_max_scaled_in_replicas' | ||
module GoogleInSpec | ||
module Compute | ||
module Property | ||
class AutoscalerAutoscalingPolicyScaleInControl | ||
attr_reader :max_scaled_in_replicas | ||
|
||
attr_reader :time_window_sec | ||
|
||
def initialize(args = nil, parent_identifier = nil) | ||
return if args.nil? | ||
@parent_identifier = parent_identifier | ||
@max_scaled_in_replicas = GoogleInSpec::Compute::Property::AutoscalerAutoscalingPolicyScaleInControlMaxScaledInReplicas.new(args['maxScaledInReplicas'], to_s) | ||
@time_window_sec = args['timeWindowSec'] | ||
end | ||
|
||
def to_s | ||
"#{@parent_identifier} AutoscalerAutoscalingPolicyScaleInControl" | ||
end | ||
end | ||
end | ||
end | ||
end |
37 changes: 37 additions & 0 deletions
37
...compute/property/autoscaler_autoscaling_policy_scale_in_control_max_scaled_in_replicas.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,37 @@ | ||
# 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 AutoscalerAutoscalingPolicyScaleInControlMaxScaledInReplicas | ||
attr_reader :fixed | ||
|
||
attr_reader :percent | ||
|
||
def initialize(args = nil, parent_identifier = nil) | ||
return if args.nil? | ||
@parent_identifier = parent_identifier | ||
@fixed = args['fixed'] | ||
@percent = args['percent'] | ||
end | ||
|
||
def to_s | ||
"#{@parent_identifier} AutoscalerAutoscalingPolicyScaleInControlMaxScaledInReplicas" | ||
end | ||
end | ||
end | ||
end | ||
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