mirror of
https://github.com/ansible-collections/google.cloud.git
synced 2025-04-06 19:00:27 -07:00
Signed-off-by: Modular Magician <magic-modules@google.com>
This commit is contained in:
parent
7f65d2b8c1
commit
3f863e0a5c
4 changed files with 84 additions and 6 deletions
|
@ -165,6 +165,18 @@ options:
|
||||||
type: str
|
type: str
|
||||||
aliases:
|
aliases:
|
||||||
- target
|
- target
|
||||||
|
predictive_method:
|
||||||
|
description:
|
||||||
|
- 'Indicates whether predictive autoscaling based on CPU metric is enabled.
|
||||||
|
Valid values are: - NONE (default). No predictive method is used. The
|
||||||
|
autoscaler scales the group to meet current demand based on real-time
|
||||||
|
metrics.'
|
||||||
|
- "- OPTIMIZE_AVAILABILITY. Predictive autoscaling improves availability
|
||||||
|
by monitoring daily and weekly load patterns and scaling out ahead of
|
||||||
|
anticipated demand."
|
||||||
|
required: false
|
||||||
|
default: NONE
|
||||||
|
type: str
|
||||||
custom_metric_utilizations:
|
custom_metric_utilizations:
|
||||||
description:
|
description:
|
||||||
- Configuration parameters of autoscaling based on a custom metric.
|
- Configuration parameters of autoscaling based on a custom metric.
|
||||||
|
@ -476,6 +488,17 @@ autoscalingPolicy:
|
||||||
the average utilization reaches the target utilization.
|
the average utilization reaches the target utilization.
|
||||||
returned: success
|
returned: success
|
||||||
type: str
|
type: str
|
||||||
|
predictiveMethod:
|
||||||
|
description:
|
||||||
|
- 'Indicates whether predictive autoscaling based on CPU metric is enabled.
|
||||||
|
Valid values are: - NONE (default). No predictive method is used. The
|
||||||
|
autoscaler scales the group to meet current demand based on real-time
|
||||||
|
metrics.'
|
||||||
|
- "- OPTIMIZE_AVAILABILITY. Predictive autoscaling improves availability
|
||||||
|
by monitoring daily and weekly load patterns and scaling out ahead of
|
||||||
|
anticipated demand."
|
||||||
|
returned: success
|
||||||
|
type: str
|
||||||
customMetricUtilizations:
|
customMetricUtilizations:
|
||||||
description:
|
description:
|
||||||
- Configuration parameters of autoscaling based on a custom metric.
|
- Configuration parameters of autoscaling based on a custom metric.
|
||||||
|
@ -572,7 +595,9 @@ def main():
|
||||||
time_window_sec=dict(type='int'),
|
time_window_sec=dict(type='int'),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
cpu_utilization=dict(type='dict', options=dict(utilization_target=dict(type='str', aliases=['target']))),
|
cpu_utilization=dict(
|
||||||
|
type='dict', options=dict(utilization_target=dict(type='str', aliases=['target']), predictive_method=dict(default='NONE', type='str'))
|
||||||
|
),
|
||||||
custom_metric_utilizations=dict(
|
custom_metric_utilizations=dict(
|
||||||
type='list',
|
type='list',
|
||||||
elements='dict',
|
elements='dict',
|
||||||
|
@ -844,10 +869,14 @@ class AutoscalerCpuutilization(object):
|
||||||
self.request = {}
|
self.request = {}
|
||||||
|
|
||||||
def to_request(self):
|
def to_request(self):
|
||||||
return remove_nones_from_dict({u'utilizationTarget': self.request.get('utilization_target')})
|
return remove_nones_from_dict(
|
||||||
|
{u'utilizationTarget': self.request.get('utilization_target'), u'predictiveMethod': self.request.get('predictive_method')}
|
||||||
|
)
|
||||||
|
|
||||||
def from_response(self):
|
def from_response(self):
|
||||||
return remove_nones_from_dict({u'utilizationTarget': self.request.get(u'utilizationTarget')})
|
return remove_nones_from_dict(
|
||||||
|
{u'utilizationTarget': self.request.get(u'utilizationTarget'), u'predictiveMethod': self.request.get(u'predictiveMethod')}
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
class AutoscalerCustommetricutilizationsArray(object):
|
class AutoscalerCustommetricutilizationsArray(object):
|
||||||
|
|
|
@ -235,6 +235,17 @@ resources:
|
||||||
or until the average utilization reaches the target utilization.
|
or until the average utilization reaches the target utilization.
|
||||||
returned: success
|
returned: success
|
||||||
type: str
|
type: str
|
||||||
|
predictiveMethod:
|
||||||
|
description:
|
||||||
|
- 'Indicates whether predictive autoscaling based on CPU metric is enabled.
|
||||||
|
Valid values are: - NONE (default). No predictive method is used.
|
||||||
|
The autoscaler scales the group to meet current demand based on real-time
|
||||||
|
metrics.'
|
||||||
|
- "- OPTIMIZE_AVAILABILITY. Predictive autoscaling improves availability
|
||||||
|
by monitoring daily and weekly load patterns and scaling out ahead
|
||||||
|
of anticipated demand."
|
||||||
|
returned: success
|
||||||
|
type: str
|
||||||
customMetricUtilizations:
|
customMetricUtilizations:
|
||||||
description:
|
description:
|
||||||
- Configuration parameters of autoscaling based on a custom metric.
|
- Configuration parameters of autoscaling based on a custom metric.
|
||||||
|
|
|
@ -157,6 +157,18 @@ options:
|
||||||
until the average utilization reaches the target utilization.
|
until the average utilization reaches the target utilization.
|
||||||
required: false
|
required: false
|
||||||
type: str
|
type: str
|
||||||
|
predictive_method:
|
||||||
|
description:
|
||||||
|
- 'Indicates whether predictive autoscaling based on CPU metric is enabled.
|
||||||
|
Valid values are: - NONE (default). No predictive method is used. The
|
||||||
|
autoscaler scales the group to meet current demand based on real-time
|
||||||
|
metrics.'
|
||||||
|
- "- OPTIMIZE_AVAILABILITY. Predictive autoscaling improves availability
|
||||||
|
by monitoring daily and weekly load patterns and scaling out ahead of
|
||||||
|
anticipated demand."
|
||||||
|
required: false
|
||||||
|
default: NONE
|
||||||
|
type: str
|
||||||
custom_metric_utilizations:
|
custom_metric_utilizations:
|
||||||
description:
|
description:
|
||||||
- Configuration parameters of autoscaling based on a custom metric.
|
- Configuration parameters of autoscaling based on a custom metric.
|
||||||
|
@ -453,6 +465,17 @@ autoscalingPolicy:
|
||||||
the average utilization reaches the target utilization.
|
the average utilization reaches the target utilization.
|
||||||
returned: success
|
returned: success
|
||||||
type: str
|
type: str
|
||||||
|
predictiveMethod:
|
||||||
|
description:
|
||||||
|
- 'Indicates whether predictive autoscaling based on CPU metric is enabled.
|
||||||
|
Valid values are: - NONE (default). No predictive method is used. The
|
||||||
|
autoscaler scales the group to meet current demand based on real-time
|
||||||
|
metrics.'
|
||||||
|
- "- OPTIMIZE_AVAILABILITY. Predictive autoscaling improves availability
|
||||||
|
by monitoring daily and weekly load patterns and scaling out ahead of
|
||||||
|
anticipated demand."
|
||||||
|
returned: success
|
||||||
|
type: str
|
||||||
customMetricUtilizations:
|
customMetricUtilizations:
|
||||||
description:
|
description:
|
||||||
- Configuration parameters of autoscaling based on a custom metric.
|
- Configuration parameters of autoscaling based on a custom metric.
|
||||||
|
@ -549,7 +572,7 @@ def main():
|
||||||
time_window_sec=dict(type='int'),
|
time_window_sec=dict(type='int'),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
cpu_utilization=dict(type='dict', options=dict(utilization_target=dict(type='str'))),
|
cpu_utilization=dict(type='dict', options=dict(utilization_target=dict(type='str'), predictive_method=dict(default='NONE', type='str'))),
|
||||||
custom_metric_utilizations=dict(
|
custom_metric_utilizations=dict(
|
||||||
type='list',
|
type='list',
|
||||||
elements='dict',
|
elements='dict',
|
||||||
|
@ -820,10 +843,14 @@ class RegionAutoscalerCpuutilization(object):
|
||||||
self.request = {}
|
self.request = {}
|
||||||
|
|
||||||
def to_request(self):
|
def to_request(self):
|
||||||
return remove_nones_from_dict({u'utilizationTarget': self.request.get('utilization_target')})
|
return remove_nones_from_dict(
|
||||||
|
{u'utilizationTarget': self.request.get('utilization_target'), u'predictiveMethod': self.request.get('predictive_method')}
|
||||||
|
)
|
||||||
|
|
||||||
def from_response(self):
|
def from_response(self):
|
||||||
return remove_nones_from_dict({u'utilizationTarget': self.request.get(u'utilizationTarget')})
|
return remove_nones_from_dict(
|
||||||
|
{u'utilizationTarget': self.request.get(u'utilizationTarget'), u'predictiveMethod': self.request.get(u'predictiveMethod')}
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
class RegionAutoscalerCustommetricutilizationsArray(object):
|
class RegionAutoscalerCustommetricutilizationsArray(object):
|
||||||
|
|
|
@ -235,6 +235,17 @@ resources:
|
||||||
or until the average utilization reaches the target utilization.
|
or until the average utilization reaches the target utilization.
|
||||||
returned: success
|
returned: success
|
||||||
type: str
|
type: str
|
||||||
|
predictiveMethod:
|
||||||
|
description:
|
||||||
|
- 'Indicates whether predictive autoscaling based on CPU metric is enabled.
|
||||||
|
Valid values are: - NONE (default). No predictive method is used.
|
||||||
|
The autoscaler scales the group to meet current demand based on real-time
|
||||||
|
metrics.'
|
||||||
|
- "- OPTIMIZE_AVAILABILITY. Predictive autoscaling improves availability
|
||||||
|
by monitoring daily and weekly load patterns and scaling out ahead
|
||||||
|
of anticipated demand."
|
||||||
|
returned: success
|
||||||
|
type: str
|
||||||
customMetricUtilizations:
|
customMetricUtilizations:
|
||||||
description:
|
description:
|
||||||
- Configuration parameters of autoscaling based on a custom metric.
|
- Configuration parameters of autoscaling based on a custom metric.
|
||||||
|
|
Loading…
Add table
Reference in a new issue