paasta-tools 1.21.4__py3-none-any.whl → 1.22.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- paasta_tools/__init__.py +1 -1
- paasta_tools/api/api.py +5 -0
- paasta_tools/api/api_docs/swagger.json +92 -0
- paasta_tools/api/views/autoscaler.py +122 -0
- paasta_tools/cli/cmds/autoscale.py +126 -7
- paasta_tools/kubernetes/application/controller_wrappers.py +16 -2
- paasta_tools/kubernetes_tools.py +77 -1
- paasta_tools/paastaapi/api/autoscaler_api.py +140 -1
- paasta_tools/paastaapi/model/autoscaling_override.py +180 -0
- paasta_tools/paastaapi/model/inline_response202.py +182 -0
- paasta_tools/paastaapi/models/__init__.py +2 -0
- paasta_tools/setup_kubernetes_job.py +105 -1
- {paasta_tools-1.21.4.data → paasta_tools-1.22.0.data}/scripts/setup_kubernetes_job.py +105 -1
- {paasta_tools-1.21.4.dist-info → paasta_tools-1.22.0.dist-info}/METADATA +1 -1
- {paasta_tools-1.21.4.dist-info → paasta_tools-1.22.0.dist-info}/RECORD +70 -68
- {paasta_tools-1.21.4.data → paasta_tools-1.22.0.data}/scripts/apply_external_resources.py +0 -0
- {paasta_tools-1.21.4.data → paasta_tools-1.22.0.data}/scripts/bounce_log_latency_parser.py +0 -0
- {paasta_tools-1.21.4.data → paasta_tools-1.22.0.data}/scripts/check_autoscaler_max_instances.py +0 -0
- {paasta_tools-1.21.4.data → paasta_tools-1.22.0.data}/scripts/check_cassandracluster_services_replication.py +0 -0
- {paasta_tools-1.21.4.data → paasta_tools-1.22.0.data}/scripts/check_flink_services_health.py +0 -0
- {paasta_tools-1.21.4.data → paasta_tools-1.22.0.data}/scripts/check_kubernetes_api.py +0 -0
- {paasta_tools-1.21.4.data → paasta_tools-1.22.0.data}/scripts/check_kubernetes_services_replication.py +0 -0
- {paasta_tools-1.21.4.data → paasta_tools-1.22.0.data}/scripts/check_manual_oapi_changes.sh +0 -0
- {paasta_tools-1.21.4.data → paasta_tools-1.22.0.data}/scripts/check_oom_events.py +0 -0
- {paasta_tools-1.21.4.data → paasta_tools-1.22.0.data}/scripts/check_orphans.py +0 -0
- {paasta_tools-1.21.4.data → paasta_tools-1.22.0.data}/scripts/check_spark_jobs.py +0 -0
- {paasta_tools-1.21.4.data → paasta_tools-1.22.0.data}/scripts/cleanup_kubernetes_cr.py +0 -0
- {paasta_tools-1.21.4.data → paasta_tools-1.22.0.data}/scripts/cleanup_kubernetes_crd.py +0 -0
- {paasta_tools-1.21.4.data → paasta_tools-1.22.0.data}/scripts/cleanup_kubernetes_jobs.py +0 -0
- {paasta_tools-1.21.4.data → paasta_tools-1.22.0.data}/scripts/create_dynamodb_table.py +0 -0
- {paasta_tools-1.21.4.data → paasta_tools-1.22.0.data}/scripts/create_paasta_playground.py +0 -0
- {paasta_tools-1.21.4.data → paasta_tools-1.22.0.data}/scripts/delete_kubernetes_deployments.py +0 -0
- {paasta_tools-1.21.4.data → paasta_tools-1.22.0.data}/scripts/emit_allocated_cpu_metrics.py +0 -0
- {paasta_tools-1.21.4.data → paasta_tools-1.22.0.data}/scripts/generate_all_deployments +0 -0
- {paasta_tools-1.21.4.data → paasta_tools-1.22.0.data}/scripts/generate_authenticating_services.py +0 -0
- {paasta_tools-1.21.4.data → paasta_tools-1.22.0.data}/scripts/generate_deployments_for_service.py +0 -0
- {paasta_tools-1.21.4.data → paasta_tools-1.22.0.data}/scripts/generate_services_file.py +0 -0
- {paasta_tools-1.21.4.data → paasta_tools-1.22.0.data}/scripts/generate_services_yaml.py +0 -0
- {paasta_tools-1.21.4.data → paasta_tools-1.22.0.data}/scripts/get_running_task_allocation.py +0 -0
- {paasta_tools-1.21.4.data → paasta_tools-1.22.0.data}/scripts/habitat_fixer.py +0 -0
- {paasta_tools-1.21.4.data → paasta_tools-1.22.0.data}/scripts/ide_helper.py +0 -0
- {paasta_tools-1.21.4.data → paasta_tools-1.22.0.data}/scripts/is_pod_healthy_in_proxy.py +0 -0
- {paasta_tools-1.21.4.data → paasta_tools-1.22.0.data}/scripts/is_pod_healthy_in_smartstack.py +0 -0
- {paasta_tools-1.21.4.data → paasta_tools-1.22.0.data}/scripts/kill_bad_containers.py +0 -0
- {paasta_tools-1.21.4.data → paasta_tools-1.22.0.data}/scripts/kubernetes_remove_evicted_pods.py +0 -0
- {paasta_tools-1.21.4.data → paasta_tools-1.22.0.data}/scripts/mass-deploy-tag.sh +0 -0
- {paasta_tools-1.21.4.data → paasta_tools-1.22.0.data}/scripts/mock_patch_checker.py +0 -0
- {paasta_tools-1.21.4.data → paasta_tools-1.22.0.data}/scripts/paasta_cleanup_remote_run_resources.py +0 -0
- {paasta_tools-1.21.4.data → paasta_tools-1.22.0.data}/scripts/paasta_cleanup_stale_nodes.py +0 -0
- {paasta_tools-1.21.4.data → paasta_tools-1.22.0.data}/scripts/paasta_deploy_tron_jobs +0 -0
- {paasta_tools-1.21.4.data → paasta_tools-1.22.0.data}/scripts/paasta_execute_docker_command.py +0 -0
- {paasta_tools-1.21.4.data → paasta_tools-1.22.0.data}/scripts/paasta_secrets_sync.py +0 -0
- {paasta_tools-1.21.4.data → paasta_tools-1.22.0.data}/scripts/paasta_tabcomplete.sh +0 -0
- {paasta_tools-1.21.4.data → paasta_tools-1.22.0.data}/scripts/paasta_update_soa_memcpu.py +0 -0
- {paasta_tools-1.21.4.data → paasta_tools-1.22.0.data}/scripts/render_template.py +0 -0
- {paasta_tools-1.21.4.data → paasta_tools-1.22.0.data}/scripts/rightsizer_soaconfigs_update.py +0 -0
- {paasta_tools-1.21.4.data → paasta_tools-1.22.0.data}/scripts/service_shard_remove.py +0 -0
- {paasta_tools-1.21.4.data → paasta_tools-1.22.0.data}/scripts/service_shard_update.py +0 -0
- {paasta_tools-1.21.4.data → paasta_tools-1.22.0.data}/scripts/setup_istio_mesh.py +0 -0
- {paasta_tools-1.21.4.data → paasta_tools-1.22.0.data}/scripts/setup_kubernetes_cr.py +0 -0
- {paasta_tools-1.21.4.data → paasta_tools-1.22.0.data}/scripts/setup_kubernetes_crd.py +0 -0
- {paasta_tools-1.21.4.data → paasta_tools-1.22.0.data}/scripts/setup_kubernetes_internal_crd.py +0 -0
- {paasta_tools-1.21.4.data → paasta_tools-1.22.0.data}/scripts/setup_prometheus_adapter_config.py +0 -0
- {paasta_tools-1.21.4.data → paasta_tools-1.22.0.data}/scripts/shared_ip_check.py +0 -0
- {paasta_tools-1.21.4.data → paasta_tools-1.22.0.data}/scripts/synapse_srv_namespaces_fact.py +0 -0
- {paasta_tools-1.21.4.data → paasta_tools-1.22.0.data}/scripts/timeouts_metrics_prom.py +0 -0
- {paasta_tools-1.21.4.dist-info → paasta_tools-1.22.0.dist-info}/LICENSE +0 -0
- {paasta_tools-1.21.4.dist-info → paasta_tools-1.22.0.dist-info}/WHEEL +0 -0
- {paasta_tools-1.21.4.dist-info → paasta_tools-1.22.0.dist-info}/entry_points.txt +0 -0
- {paasta_tools-1.21.4.dist-info → paasta_tools-1.22.0.dist-info}/top_level.txt +0 -0
|
@@ -24,6 +24,8 @@ from paasta_tools.paastaapi.model_utils import ( # noqa: F401
|
|
|
24
24
|
validate_and_convert_types
|
|
25
25
|
)
|
|
26
26
|
from paasta_tools.paastaapi.model.autoscaler_count_msg import AutoscalerCountMsg
|
|
27
|
+
from paasta_tools.paastaapi.model.autoscaling_override import AutoscalingOverride
|
|
28
|
+
from paasta_tools.paastaapi.model.inline_response202 import InlineResponse202
|
|
27
29
|
|
|
28
30
|
|
|
29
31
|
class AutoscalerApi(object):
|
|
@@ -164,6 +166,143 @@ class AutoscalerApi(object):
|
|
|
164
166
|
callable=__get_autoscaler_count
|
|
165
167
|
)
|
|
166
168
|
|
|
169
|
+
def __set_autoscaling_override(
|
|
170
|
+
self,
|
|
171
|
+
service,
|
|
172
|
+
instance,
|
|
173
|
+
autoscaling_override,
|
|
174
|
+
**kwargs
|
|
175
|
+
):
|
|
176
|
+
"""Set a temporary autoscaling override for a service instance # noqa: E501
|
|
177
|
+
|
|
178
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
179
|
+
asynchronous HTTP request, please pass async_req=True
|
|
180
|
+
|
|
181
|
+
>>> thread = api.set_autoscaling_override(service, instance, autoscaling_override, async_req=True)
|
|
182
|
+
>>> result = thread.get()
|
|
183
|
+
|
|
184
|
+
Args:
|
|
185
|
+
service (str): Service name
|
|
186
|
+
instance (str): Instance name
|
|
187
|
+
autoscaling_override (AutoscalingOverride):
|
|
188
|
+
|
|
189
|
+
Keyword Args:
|
|
190
|
+
_return_http_data_only (bool): response data without head status
|
|
191
|
+
code and headers. Default is True.
|
|
192
|
+
_preload_content (bool): if False, the urllib3.HTTPResponse object
|
|
193
|
+
will be returned without reading/decoding response data.
|
|
194
|
+
Default is True.
|
|
195
|
+
_request_timeout (float/tuple): timeout setting for this request. If one
|
|
196
|
+
number provided, it will be total request timeout. It can also
|
|
197
|
+
be a pair (tuple) of (connection, read) timeouts.
|
|
198
|
+
Default is None.
|
|
199
|
+
_check_input_type (bool): specifies if type checking
|
|
200
|
+
should be done one the data sent to the server.
|
|
201
|
+
Default is True.
|
|
202
|
+
_check_return_type (bool): specifies if type checking
|
|
203
|
+
should be done one the data received from the server.
|
|
204
|
+
Default is True.
|
|
205
|
+
_host_index (int/None): specifies the index of the server
|
|
206
|
+
that we want to use.
|
|
207
|
+
Default is read from the configuration.
|
|
208
|
+
async_req (bool): execute request asynchronously
|
|
209
|
+
|
|
210
|
+
Returns:
|
|
211
|
+
InlineResponse202
|
|
212
|
+
If the method is called asynchronously, returns the request
|
|
213
|
+
thread.
|
|
214
|
+
"""
|
|
215
|
+
kwargs['async_req'] = kwargs.get(
|
|
216
|
+
'async_req', False
|
|
217
|
+
)
|
|
218
|
+
kwargs['_return_http_data_only'] = kwargs.get(
|
|
219
|
+
'_return_http_data_only', True
|
|
220
|
+
)
|
|
221
|
+
kwargs['_preload_content'] = kwargs.get(
|
|
222
|
+
'_preload_content', True
|
|
223
|
+
)
|
|
224
|
+
kwargs['_request_timeout'] = kwargs.get(
|
|
225
|
+
'_request_timeout', None
|
|
226
|
+
)
|
|
227
|
+
kwargs['_check_input_type'] = kwargs.get(
|
|
228
|
+
'_check_input_type', True
|
|
229
|
+
)
|
|
230
|
+
kwargs['_check_return_type'] = kwargs.get(
|
|
231
|
+
'_check_return_type', True
|
|
232
|
+
)
|
|
233
|
+
kwargs['_host_index'] = kwargs.get('_host_index')
|
|
234
|
+
kwargs['service'] = \
|
|
235
|
+
service
|
|
236
|
+
kwargs['instance'] = \
|
|
237
|
+
instance
|
|
238
|
+
kwargs['autoscaling_override'] = \
|
|
239
|
+
autoscaling_override
|
|
240
|
+
return self.call_with_http_info(**kwargs)
|
|
241
|
+
|
|
242
|
+
self.set_autoscaling_override = Endpoint(
|
|
243
|
+
settings={
|
|
244
|
+
'response_type': (InlineResponse202,),
|
|
245
|
+
'auth': [],
|
|
246
|
+
'endpoint_path': '/service_autoscaler/{service}/{instance}/autoscaling_override',
|
|
247
|
+
'operation_id': 'set_autoscaling_override',
|
|
248
|
+
'http_method': 'POST',
|
|
249
|
+
'servers': None,
|
|
250
|
+
},
|
|
251
|
+
params_map={
|
|
252
|
+
'all': [
|
|
253
|
+
'service',
|
|
254
|
+
'instance',
|
|
255
|
+
'autoscaling_override',
|
|
256
|
+
],
|
|
257
|
+
'required': [
|
|
258
|
+
'service',
|
|
259
|
+
'instance',
|
|
260
|
+
'autoscaling_override',
|
|
261
|
+
],
|
|
262
|
+
'nullable': [
|
|
263
|
+
],
|
|
264
|
+
'enum': [
|
|
265
|
+
],
|
|
266
|
+
'validation': [
|
|
267
|
+
]
|
|
268
|
+
},
|
|
269
|
+
root_map={
|
|
270
|
+
'validations': {
|
|
271
|
+
},
|
|
272
|
+
'allowed_values': {
|
|
273
|
+
},
|
|
274
|
+
'openapi_types': {
|
|
275
|
+
'service':
|
|
276
|
+
(str,),
|
|
277
|
+
'instance':
|
|
278
|
+
(str,),
|
|
279
|
+
'autoscaling_override':
|
|
280
|
+
(AutoscalingOverride,),
|
|
281
|
+
},
|
|
282
|
+
'attribute_map': {
|
|
283
|
+
'service': 'service',
|
|
284
|
+
'instance': 'instance',
|
|
285
|
+
},
|
|
286
|
+
'location_map': {
|
|
287
|
+
'service': 'path',
|
|
288
|
+
'instance': 'path',
|
|
289
|
+
'autoscaling_override': 'body',
|
|
290
|
+
},
|
|
291
|
+
'collection_format_map': {
|
|
292
|
+
}
|
|
293
|
+
},
|
|
294
|
+
headers_map={
|
|
295
|
+
'accept': [
|
|
296
|
+
'application/json'
|
|
297
|
+
],
|
|
298
|
+
'content_type': [
|
|
299
|
+
'application/json'
|
|
300
|
+
]
|
|
301
|
+
},
|
|
302
|
+
api_client=api_client,
|
|
303
|
+
callable=__set_autoscaling_override
|
|
304
|
+
)
|
|
305
|
+
|
|
167
306
|
def __update_autoscaler_count(
|
|
168
307
|
self,
|
|
169
308
|
service,
|
|
@@ -171,7 +310,7 @@ class AutoscalerApi(object):
|
|
|
171
310
|
autoscaler_count_msg,
|
|
172
311
|
**kwargs
|
|
173
312
|
):
|
|
174
|
-
"""
|
|
313
|
+
"""Set desired instance count for a service instance # noqa: E501
|
|
175
314
|
|
|
176
315
|
This method makes a synchronous HTTP request by default. To make an
|
|
177
316
|
asynchronous HTTP request, please pass async_req=True
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Paasta API
|
|
5
|
+
|
|
6
|
+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 1.2.0
|
|
9
|
+
Generated by: https://openapi-generator.tech
|
|
10
|
+
"""
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
import re # noqa: F401
|
|
14
|
+
import sys # noqa: F401
|
|
15
|
+
|
|
16
|
+
import nulltype # noqa: F401
|
|
17
|
+
|
|
18
|
+
from paasta_tools.paastaapi.model_utils import ( # noqa: F401
|
|
19
|
+
ApiTypeError,
|
|
20
|
+
ModelComposed,
|
|
21
|
+
ModelNormal,
|
|
22
|
+
ModelSimple,
|
|
23
|
+
cached_property,
|
|
24
|
+
change_keys_js_to_python,
|
|
25
|
+
convert_js_args_to_python_args,
|
|
26
|
+
date,
|
|
27
|
+
datetime,
|
|
28
|
+
file_type,
|
|
29
|
+
none_type,
|
|
30
|
+
validate_get_composed_info,
|
|
31
|
+
)
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
class AutoscalingOverride(ModelNormal):
|
|
35
|
+
"""NOTE: This class is auto generated by OpenAPI Generator.
|
|
36
|
+
Ref: https://openapi-generator.tech
|
|
37
|
+
|
|
38
|
+
Do not edit the class manually.
|
|
39
|
+
|
|
40
|
+
Attributes:
|
|
41
|
+
allowed_values (dict): The key is the tuple path to the attribute
|
|
42
|
+
and the for var_name this is (var_name,). The value is a dict
|
|
43
|
+
with a capitalized key describing the allowed value and an allowed
|
|
44
|
+
value. These dicts store the allowed enum values.
|
|
45
|
+
attribute_map (dict): The key is attribute name
|
|
46
|
+
and the value is json key in definition.
|
|
47
|
+
discriminator_value_class_map (dict): A dict to go from the discriminator
|
|
48
|
+
variable value to the discriminator class name.
|
|
49
|
+
validations (dict): The key is the tuple path to the attribute
|
|
50
|
+
and the for var_name this is (var_name,). The value is a dict
|
|
51
|
+
that stores validations for max_length, min_length, max_items,
|
|
52
|
+
min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
|
|
53
|
+
inclusive_minimum, and regex.
|
|
54
|
+
additional_properties_type (tuple): A tuple of classes accepted
|
|
55
|
+
as additional properties values.
|
|
56
|
+
"""
|
|
57
|
+
|
|
58
|
+
allowed_values = {
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
validations = {
|
|
62
|
+
('min_instances',): {
|
|
63
|
+
'inclusive_minimum': 1,
|
|
64
|
+
},
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
additional_properties_type = None
|
|
68
|
+
|
|
69
|
+
_nullable = False
|
|
70
|
+
|
|
71
|
+
@cached_property
|
|
72
|
+
def openapi_types():
|
|
73
|
+
"""
|
|
74
|
+
This must be a method because a model may have properties that are
|
|
75
|
+
of type self, this must run after the class is loaded
|
|
76
|
+
|
|
77
|
+
Returns
|
|
78
|
+
openapi_types (dict): The key is attribute name
|
|
79
|
+
and the value is attribute type.
|
|
80
|
+
"""
|
|
81
|
+
return {
|
|
82
|
+
'min_instances': (int,), # noqa: E501
|
|
83
|
+
'expire_after': (float,), # noqa: E501
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
@cached_property
|
|
87
|
+
def discriminator():
|
|
88
|
+
return None
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
attribute_map = {
|
|
92
|
+
'min_instances': 'min_instances', # noqa: E501
|
|
93
|
+
'expire_after': 'expire_after', # noqa: E501
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
_composed_schemas = {}
|
|
97
|
+
|
|
98
|
+
required_properties = set([
|
|
99
|
+
'_data_store',
|
|
100
|
+
'_check_type',
|
|
101
|
+
'_spec_property_naming',
|
|
102
|
+
'_path_to_item',
|
|
103
|
+
'_configuration',
|
|
104
|
+
'_visited_composed_classes',
|
|
105
|
+
])
|
|
106
|
+
|
|
107
|
+
@convert_js_args_to_python_args
|
|
108
|
+
def __init__(self, min_instances, expire_after, *args, **kwargs): # noqa: E501
|
|
109
|
+
"""AutoscalingOverride - a model defined in OpenAPI
|
|
110
|
+
|
|
111
|
+
Args:
|
|
112
|
+
min_instances (int): Minimum number of instances to run
|
|
113
|
+
expire_after (float): Unix timestamp when this override is no longer valid
|
|
114
|
+
|
|
115
|
+
Keyword Args:
|
|
116
|
+
_check_type (bool): if True, values for parameters in openapi_types
|
|
117
|
+
will be type checked and a TypeError will be
|
|
118
|
+
raised if the wrong type is input.
|
|
119
|
+
Defaults to True
|
|
120
|
+
_path_to_item (tuple/list): This is a list of keys or values to
|
|
121
|
+
drill down to the model in received_data
|
|
122
|
+
when deserializing a response
|
|
123
|
+
_spec_property_naming (bool): True if the variable names in the input data
|
|
124
|
+
are serialized names, as specified in the OpenAPI document.
|
|
125
|
+
False if the variable names in the input data
|
|
126
|
+
are pythonic names, e.g. snake case (default)
|
|
127
|
+
_configuration (Configuration): the instance to use when
|
|
128
|
+
deserializing a file_type parameter.
|
|
129
|
+
If passed, type conversion is attempted
|
|
130
|
+
If omitted no type conversion is done.
|
|
131
|
+
_visited_composed_classes (tuple): This stores a tuple of
|
|
132
|
+
classes that we have traveled through so that
|
|
133
|
+
if we see that class again we will not use its
|
|
134
|
+
discriminator again.
|
|
135
|
+
When traveling through a discriminator, the
|
|
136
|
+
composed schema that is
|
|
137
|
+
is traveled through is added to this set.
|
|
138
|
+
For example if Animal has a discriminator
|
|
139
|
+
petType and we pass in "Dog", and the class Dog
|
|
140
|
+
allOf includes Animal, we move through Animal
|
|
141
|
+
once using the discriminator, and pick Dog.
|
|
142
|
+
Then in Dog, we will make an instance of the
|
|
143
|
+
Animal class but this time we won't travel
|
|
144
|
+
through its discriminator because we passed in
|
|
145
|
+
_visited_composed_classes = (Animal,)
|
|
146
|
+
"""
|
|
147
|
+
|
|
148
|
+
_check_type = kwargs.pop('_check_type', True)
|
|
149
|
+
_spec_property_naming = kwargs.pop('_spec_property_naming', False)
|
|
150
|
+
_path_to_item = kwargs.pop('_path_to_item', ())
|
|
151
|
+
_configuration = kwargs.pop('_configuration', None)
|
|
152
|
+
_visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
|
|
153
|
+
|
|
154
|
+
if args:
|
|
155
|
+
raise ApiTypeError(
|
|
156
|
+
"Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
|
|
157
|
+
args,
|
|
158
|
+
self.__class__.__name__,
|
|
159
|
+
),
|
|
160
|
+
path_to_item=_path_to_item,
|
|
161
|
+
valid_classes=(self.__class__,),
|
|
162
|
+
)
|
|
163
|
+
|
|
164
|
+
self._data_store = {}
|
|
165
|
+
self._check_type = _check_type
|
|
166
|
+
self._spec_property_naming = _spec_property_naming
|
|
167
|
+
self._path_to_item = _path_to_item
|
|
168
|
+
self._configuration = _configuration
|
|
169
|
+
self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
|
|
170
|
+
|
|
171
|
+
self.min_instances = min_instances
|
|
172
|
+
self.expire_after = expire_after
|
|
173
|
+
for var_name, var_value in kwargs.items():
|
|
174
|
+
if var_name not in self.attribute_map and \
|
|
175
|
+
self._configuration is not None and \
|
|
176
|
+
self._configuration.discard_unknown_keys and \
|
|
177
|
+
self.additional_properties_type is None:
|
|
178
|
+
# discard variable.
|
|
179
|
+
continue
|
|
180
|
+
setattr(self, var_name, var_value)
|
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Paasta API
|
|
5
|
+
|
|
6
|
+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 1.2.0
|
|
9
|
+
Generated by: https://openapi-generator.tech
|
|
10
|
+
"""
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
import re # noqa: F401
|
|
14
|
+
import sys # noqa: F401
|
|
15
|
+
|
|
16
|
+
import nulltype # noqa: F401
|
|
17
|
+
|
|
18
|
+
from paasta_tools.paastaapi.model_utils import ( # noqa: F401
|
|
19
|
+
ApiTypeError,
|
|
20
|
+
ModelComposed,
|
|
21
|
+
ModelNormal,
|
|
22
|
+
ModelSimple,
|
|
23
|
+
cached_property,
|
|
24
|
+
change_keys_js_to_python,
|
|
25
|
+
convert_js_args_to_python_args,
|
|
26
|
+
date,
|
|
27
|
+
datetime,
|
|
28
|
+
file_type,
|
|
29
|
+
none_type,
|
|
30
|
+
validate_get_composed_info,
|
|
31
|
+
)
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
class InlineResponse202(ModelNormal):
|
|
35
|
+
"""NOTE: This class is auto generated by OpenAPI Generator.
|
|
36
|
+
Ref: https://openapi-generator.tech
|
|
37
|
+
|
|
38
|
+
Do not edit the class manually.
|
|
39
|
+
|
|
40
|
+
Attributes:
|
|
41
|
+
allowed_values (dict): The key is the tuple path to the attribute
|
|
42
|
+
and the for var_name this is (var_name,). The value is a dict
|
|
43
|
+
with a capitalized key describing the allowed value and an allowed
|
|
44
|
+
value. These dicts store the allowed enum values.
|
|
45
|
+
attribute_map (dict): The key is attribute name
|
|
46
|
+
and the value is json key in definition.
|
|
47
|
+
discriminator_value_class_map (dict): A dict to go from the discriminator
|
|
48
|
+
variable value to the discriminator class name.
|
|
49
|
+
validations (dict): The key is the tuple path to the attribute
|
|
50
|
+
and the for var_name this is (var_name,). The value is a dict
|
|
51
|
+
that stores validations for max_length, min_length, max_items,
|
|
52
|
+
min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
|
|
53
|
+
inclusive_minimum, and regex.
|
|
54
|
+
additional_properties_type (tuple): A tuple of classes accepted
|
|
55
|
+
as additional properties values.
|
|
56
|
+
"""
|
|
57
|
+
|
|
58
|
+
allowed_values = {
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
validations = {
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
additional_properties_type = None
|
|
65
|
+
|
|
66
|
+
_nullable = False
|
|
67
|
+
|
|
68
|
+
@cached_property
|
|
69
|
+
def openapi_types():
|
|
70
|
+
"""
|
|
71
|
+
This must be a method because a model may have properties that are
|
|
72
|
+
of type self, this must run after the class is loaded
|
|
73
|
+
|
|
74
|
+
Returns
|
|
75
|
+
openapi_types (dict): The key is attribute name
|
|
76
|
+
and the value is attribute type.
|
|
77
|
+
"""
|
|
78
|
+
return {
|
|
79
|
+
'service': (str,), # noqa: E501
|
|
80
|
+
'instance': (str,), # noqa: E501
|
|
81
|
+
'min_instances': (int,), # noqa: E501
|
|
82
|
+
'expire_after': (float,), # noqa: E501
|
|
83
|
+
'status': (str,), # noqa: E501
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
@cached_property
|
|
87
|
+
def discriminator():
|
|
88
|
+
return None
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
attribute_map = {
|
|
92
|
+
'service': 'service', # noqa: E501
|
|
93
|
+
'instance': 'instance', # noqa: E501
|
|
94
|
+
'min_instances': 'min_instances', # noqa: E501
|
|
95
|
+
'expire_after': 'expire_after', # noqa: E501
|
|
96
|
+
'status': 'status', # noqa: E501
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
_composed_schemas = {}
|
|
100
|
+
|
|
101
|
+
required_properties = set([
|
|
102
|
+
'_data_store',
|
|
103
|
+
'_check_type',
|
|
104
|
+
'_spec_property_naming',
|
|
105
|
+
'_path_to_item',
|
|
106
|
+
'_configuration',
|
|
107
|
+
'_visited_composed_classes',
|
|
108
|
+
])
|
|
109
|
+
|
|
110
|
+
@convert_js_args_to_python_args
|
|
111
|
+
def __init__(self, *args, **kwargs): # noqa: E501
|
|
112
|
+
"""InlineResponse202 - a model defined in OpenAPI
|
|
113
|
+
|
|
114
|
+
Keyword Args:
|
|
115
|
+
_check_type (bool): if True, values for parameters in openapi_types
|
|
116
|
+
will be type checked and a TypeError will be
|
|
117
|
+
raised if the wrong type is input.
|
|
118
|
+
Defaults to True
|
|
119
|
+
_path_to_item (tuple/list): This is a list of keys or values to
|
|
120
|
+
drill down to the model in received_data
|
|
121
|
+
when deserializing a response
|
|
122
|
+
_spec_property_naming (bool): True if the variable names in the input data
|
|
123
|
+
are serialized names, as specified in the OpenAPI document.
|
|
124
|
+
False if the variable names in the input data
|
|
125
|
+
are pythonic names, e.g. snake case (default)
|
|
126
|
+
_configuration (Configuration): the instance to use when
|
|
127
|
+
deserializing a file_type parameter.
|
|
128
|
+
If passed, type conversion is attempted
|
|
129
|
+
If omitted no type conversion is done.
|
|
130
|
+
_visited_composed_classes (tuple): This stores a tuple of
|
|
131
|
+
classes that we have traveled through so that
|
|
132
|
+
if we see that class again we will not use its
|
|
133
|
+
discriminator again.
|
|
134
|
+
When traveling through a discriminator, the
|
|
135
|
+
composed schema that is
|
|
136
|
+
is traveled through is added to this set.
|
|
137
|
+
For example if Animal has a discriminator
|
|
138
|
+
petType and we pass in "Dog", and the class Dog
|
|
139
|
+
allOf includes Animal, we move through Animal
|
|
140
|
+
once using the discriminator, and pick Dog.
|
|
141
|
+
Then in Dog, we will make an instance of the
|
|
142
|
+
Animal class but this time we won't travel
|
|
143
|
+
through its discriminator because we passed in
|
|
144
|
+
_visited_composed_classes = (Animal,)
|
|
145
|
+
service (str): Service name. [optional] # noqa: E501
|
|
146
|
+
instance (str): Instance name. [optional] # noqa: E501
|
|
147
|
+
min_instances (int): Minimum number of instances to run. [optional] # noqa: E501
|
|
148
|
+
expire_after (float): Unix timestamp after which the override is no longer valid. [optional] # noqa: E501
|
|
149
|
+
status (str): Status of the operation. [optional] # noqa: E501
|
|
150
|
+
"""
|
|
151
|
+
|
|
152
|
+
_check_type = kwargs.pop('_check_type', True)
|
|
153
|
+
_spec_property_naming = kwargs.pop('_spec_property_naming', False)
|
|
154
|
+
_path_to_item = kwargs.pop('_path_to_item', ())
|
|
155
|
+
_configuration = kwargs.pop('_configuration', None)
|
|
156
|
+
_visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
|
|
157
|
+
|
|
158
|
+
if args:
|
|
159
|
+
raise ApiTypeError(
|
|
160
|
+
"Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
|
|
161
|
+
args,
|
|
162
|
+
self.__class__.__name__,
|
|
163
|
+
),
|
|
164
|
+
path_to_item=_path_to_item,
|
|
165
|
+
valid_classes=(self.__class__,),
|
|
166
|
+
)
|
|
167
|
+
|
|
168
|
+
self._data_store = {}
|
|
169
|
+
self._check_type = _check_type
|
|
170
|
+
self._spec_property_naming = _spec_property_naming
|
|
171
|
+
self._path_to_item = _path_to_item
|
|
172
|
+
self._configuration = _configuration
|
|
173
|
+
self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
|
|
174
|
+
|
|
175
|
+
for var_name, var_value in kwargs.items():
|
|
176
|
+
if var_name not in self.attribute_map and \
|
|
177
|
+
self._configuration is not None and \
|
|
178
|
+
self._configuration.discard_unknown_keys and \
|
|
179
|
+
self.additional_properties_type is None:
|
|
180
|
+
# discard variable.
|
|
181
|
+
continue
|
|
182
|
+
setattr(self, var_name, var_value)
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
|
|
14
14
|
from paasta_tools.paastaapi.model.adhoc_launch_history import AdhocLaunchHistory
|
|
15
15
|
from paasta_tools.paastaapi.model.autoscaler_count_msg import AutoscalerCountMsg
|
|
16
|
+
from paasta_tools.paastaapi.model.autoscaling_override import AutoscalingOverride
|
|
16
17
|
from paasta_tools.paastaapi.model.deploy_queue import DeployQueue
|
|
17
18
|
from paasta_tools.paastaapi.model.deploy_queue_service_instance import DeployQueueServiceInstance
|
|
18
19
|
from paasta_tools.paastaapi.model.envoy_backend import EnvoyBackend
|
|
@@ -28,6 +29,7 @@ from paasta_tools.paastaapi.model.hpa_metric import HPAMetric
|
|
|
28
29
|
from paasta_tools.paastaapi.model.inline_object import InlineObject
|
|
29
30
|
from paasta_tools.paastaapi.model.inline_response200 import InlineResponse200
|
|
30
31
|
from paasta_tools.paastaapi.model.inline_response2001 import InlineResponse2001
|
|
32
|
+
from paasta_tools.paastaapi.model.inline_response202 import InlineResponse202
|
|
31
33
|
from paasta_tools.paastaapi.model.instance_bounce_status import InstanceBounceStatus
|
|
32
34
|
from paasta_tools.paastaapi.model.instance_mesh_status import InstanceMeshStatus
|
|
33
35
|
from paasta_tools.paastaapi.model.instance_status import InstanceStatus
|