paasta-tools 1.21.3__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.
Files changed (348) hide show
  1. k8s_itests/__init__.py +0 -0
  2. k8s_itests/test_autoscaling.py +23 -0
  3. k8s_itests/utils.py +38 -0
  4. paasta_tools/__init__.py +20 -0
  5. paasta_tools/adhoc_tools.py +142 -0
  6. paasta_tools/api/__init__.py +13 -0
  7. paasta_tools/api/api.py +330 -0
  8. paasta_tools/api/api_docs/swagger.json +2323 -0
  9. paasta_tools/api/client.py +106 -0
  10. paasta_tools/api/settings.py +33 -0
  11. paasta_tools/api/tweens/__init__.py +6 -0
  12. paasta_tools/api/tweens/auth.py +125 -0
  13. paasta_tools/api/tweens/profiling.py +108 -0
  14. paasta_tools/api/tweens/request_logger.py +124 -0
  15. paasta_tools/api/views/__init__.py +13 -0
  16. paasta_tools/api/views/autoscaler.py +100 -0
  17. paasta_tools/api/views/exception.py +45 -0
  18. paasta_tools/api/views/flink.py +73 -0
  19. paasta_tools/api/views/instance.py +395 -0
  20. paasta_tools/api/views/pause_autoscaler.py +71 -0
  21. paasta_tools/api/views/remote_run.py +113 -0
  22. paasta_tools/api/views/resources.py +76 -0
  23. paasta_tools/api/views/service.py +35 -0
  24. paasta_tools/api/views/version.py +25 -0
  25. paasta_tools/apply_external_resources.py +79 -0
  26. paasta_tools/async_utils.py +109 -0
  27. paasta_tools/autoscaling/__init__.py +0 -0
  28. paasta_tools/autoscaling/autoscaling_service_lib.py +57 -0
  29. paasta_tools/autoscaling/forecasting.py +106 -0
  30. paasta_tools/autoscaling/max_all_k8s_services.py +41 -0
  31. paasta_tools/autoscaling/pause_service_autoscaler.py +77 -0
  32. paasta_tools/autoscaling/utils.py +52 -0
  33. paasta_tools/bounce_lib.py +184 -0
  34. paasta_tools/broadcast_log_to_services.py +62 -0
  35. paasta_tools/cassandracluster_tools.py +210 -0
  36. paasta_tools/check_autoscaler_max_instances.py +212 -0
  37. paasta_tools/check_cassandracluster_services_replication.py +35 -0
  38. paasta_tools/check_flink_services_health.py +203 -0
  39. paasta_tools/check_kubernetes_api.py +57 -0
  40. paasta_tools/check_kubernetes_services_replication.py +141 -0
  41. paasta_tools/check_oom_events.py +244 -0
  42. paasta_tools/check_services_replication_tools.py +324 -0
  43. paasta_tools/check_spark_jobs.py +234 -0
  44. paasta_tools/cleanup_kubernetes_cr.py +138 -0
  45. paasta_tools/cleanup_kubernetes_crd.py +145 -0
  46. paasta_tools/cleanup_kubernetes_jobs.py +344 -0
  47. paasta_tools/cleanup_tron_namespaces.py +96 -0
  48. paasta_tools/cli/__init__.py +13 -0
  49. paasta_tools/cli/authentication.py +85 -0
  50. paasta_tools/cli/cli.py +260 -0
  51. paasta_tools/cli/cmds/__init__.py +13 -0
  52. paasta_tools/cli/cmds/autoscale.py +143 -0
  53. paasta_tools/cli/cmds/check.py +334 -0
  54. paasta_tools/cli/cmds/cook_image.py +147 -0
  55. paasta_tools/cli/cmds/get_docker_image.py +76 -0
  56. paasta_tools/cli/cmds/get_image_version.py +172 -0
  57. paasta_tools/cli/cmds/get_latest_deployment.py +93 -0
  58. paasta_tools/cli/cmds/info.py +155 -0
  59. paasta_tools/cli/cmds/itest.py +117 -0
  60. paasta_tools/cli/cmds/list.py +66 -0
  61. paasta_tools/cli/cmds/list_clusters.py +42 -0
  62. paasta_tools/cli/cmds/list_deploy_queue.py +171 -0
  63. paasta_tools/cli/cmds/list_namespaces.py +84 -0
  64. paasta_tools/cli/cmds/local_run.py +1396 -0
  65. paasta_tools/cli/cmds/logs.py +1601 -0
  66. paasta_tools/cli/cmds/mark_for_deployment.py +1988 -0
  67. paasta_tools/cli/cmds/mesh_status.py +174 -0
  68. paasta_tools/cli/cmds/pause_service_autoscaler.py +107 -0
  69. paasta_tools/cli/cmds/push_to_registry.py +275 -0
  70. paasta_tools/cli/cmds/remote_run.py +252 -0
  71. paasta_tools/cli/cmds/rollback.py +347 -0
  72. paasta_tools/cli/cmds/secret.py +549 -0
  73. paasta_tools/cli/cmds/security_check.py +59 -0
  74. paasta_tools/cli/cmds/spark_run.py +1400 -0
  75. paasta_tools/cli/cmds/start_stop_restart.py +401 -0
  76. paasta_tools/cli/cmds/status.py +2302 -0
  77. paasta_tools/cli/cmds/validate.py +1012 -0
  78. paasta_tools/cli/cmds/wait_for_deployment.py +275 -0
  79. paasta_tools/cli/fsm/__init__.py +13 -0
  80. paasta_tools/cli/fsm/autosuggest.py +82 -0
  81. paasta_tools/cli/fsm/template/README.md +8 -0
  82. paasta_tools/cli/fsm/template/cookiecutter.json +7 -0
  83. paasta_tools/cli/fsm/template/{{cookiecutter.service}}/kubernetes-PROD.yaml +91 -0
  84. paasta_tools/cli/fsm/template/{{cookiecutter.service}}/monitoring.yaml +20 -0
  85. paasta_tools/cli/fsm/template/{{cookiecutter.service}}/service.yaml +8 -0
  86. paasta_tools/cli/fsm/template/{{cookiecutter.service}}/smartstack.yaml +6 -0
  87. paasta_tools/cli/fsm_cmd.py +121 -0
  88. paasta_tools/cli/paasta_tabcomplete.sh +23 -0
  89. paasta_tools/cli/schemas/adhoc_schema.json +199 -0
  90. paasta_tools/cli/schemas/autoscaling_schema.json +91 -0
  91. paasta_tools/cli/schemas/autotuned_defaults/cassandracluster_schema.json +37 -0
  92. paasta_tools/cli/schemas/autotuned_defaults/kubernetes_schema.json +89 -0
  93. paasta_tools/cli/schemas/deploy_schema.json +173 -0
  94. paasta_tools/cli/schemas/eks_schema.json +970 -0
  95. paasta_tools/cli/schemas/kubernetes_schema.json +970 -0
  96. paasta_tools/cli/schemas/rollback_schema.json +160 -0
  97. paasta_tools/cli/schemas/service_schema.json +25 -0
  98. paasta_tools/cli/schemas/smartstack_schema.json +322 -0
  99. paasta_tools/cli/schemas/tron_schema.json +699 -0
  100. paasta_tools/cli/utils.py +1118 -0
  101. paasta_tools/clusterman.py +21 -0
  102. paasta_tools/config_utils.py +385 -0
  103. paasta_tools/contrib/__init__.py +0 -0
  104. paasta_tools/contrib/bounce_log_latency_parser.py +68 -0
  105. paasta_tools/contrib/check_manual_oapi_changes.sh +24 -0
  106. paasta_tools/contrib/check_orphans.py +306 -0
  107. paasta_tools/contrib/create_dynamodb_table.py +35 -0
  108. paasta_tools/contrib/create_paasta_playground.py +105 -0
  109. paasta_tools/contrib/emit_allocated_cpu_metrics.py +50 -0
  110. paasta_tools/contrib/get_running_task_allocation.py +346 -0
  111. paasta_tools/contrib/habitat_fixer.py +86 -0
  112. paasta_tools/contrib/ide_helper.py +316 -0
  113. paasta_tools/contrib/is_pod_healthy_in_proxy.py +139 -0
  114. paasta_tools/contrib/is_pod_healthy_in_smartstack.py +50 -0
  115. paasta_tools/contrib/kill_bad_containers.py +109 -0
  116. paasta_tools/contrib/mass-deploy-tag.sh +44 -0
  117. paasta_tools/contrib/mock_patch_checker.py +86 -0
  118. paasta_tools/contrib/paasta_update_soa_memcpu.py +520 -0
  119. paasta_tools/contrib/render_template.py +129 -0
  120. paasta_tools/contrib/rightsizer_soaconfigs_update.py +348 -0
  121. paasta_tools/contrib/service_shard_remove.py +157 -0
  122. paasta_tools/contrib/service_shard_update.py +373 -0
  123. paasta_tools/contrib/shared_ip_check.py +77 -0
  124. paasta_tools/contrib/timeouts_metrics_prom.py +64 -0
  125. paasta_tools/delete_kubernetes_deployments.py +89 -0
  126. paasta_tools/deployment_utils.py +44 -0
  127. paasta_tools/docker_wrapper.py +234 -0
  128. paasta_tools/docker_wrapper_imports.py +13 -0
  129. paasta_tools/drain_lib.py +351 -0
  130. paasta_tools/dump_locally_running_services.py +71 -0
  131. paasta_tools/eks_tools.py +119 -0
  132. paasta_tools/envoy_tools.py +373 -0
  133. paasta_tools/firewall.py +504 -0
  134. paasta_tools/firewall_logging.py +154 -0
  135. paasta_tools/firewall_update.py +172 -0
  136. paasta_tools/flink_tools.py +345 -0
  137. paasta_tools/flinkeks_tools.py +90 -0
  138. paasta_tools/frameworks/__init__.py +0 -0
  139. paasta_tools/frameworks/adhoc_scheduler.py +71 -0
  140. paasta_tools/frameworks/constraints.py +87 -0
  141. paasta_tools/frameworks/native_scheduler.py +652 -0
  142. paasta_tools/frameworks/native_service_config.py +301 -0
  143. paasta_tools/frameworks/task_store.py +245 -0
  144. paasta_tools/generate_all_deployments +9 -0
  145. paasta_tools/generate_authenticating_services.py +94 -0
  146. paasta_tools/generate_deployments_for_service.py +255 -0
  147. paasta_tools/generate_services_file.py +114 -0
  148. paasta_tools/generate_services_yaml.py +30 -0
  149. paasta_tools/hacheck.py +76 -0
  150. paasta_tools/instance/__init__.py +0 -0
  151. paasta_tools/instance/hpa_metrics_parser.py +122 -0
  152. paasta_tools/instance/kubernetes.py +1362 -0
  153. paasta_tools/iptables.py +240 -0
  154. paasta_tools/kafkacluster_tools.py +143 -0
  155. paasta_tools/kubernetes/__init__.py +0 -0
  156. paasta_tools/kubernetes/application/__init__.py +0 -0
  157. paasta_tools/kubernetes/application/controller_wrappers.py +476 -0
  158. paasta_tools/kubernetes/application/tools.py +90 -0
  159. paasta_tools/kubernetes/bin/__init__.py +0 -0
  160. paasta_tools/kubernetes/bin/kubernetes_remove_evicted_pods.py +164 -0
  161. paasta_tools/kubernetes/bin/paasta_cleanup_remote_run_resources.py +135 -0
  162. paasta_tools/kubernetes/bin/paasta_cleanup_stale_nodes.py +181 -0
  163. paasta_tools/kubernetes/bin/paasta_secrets_sync.py +758 -0
  164. paasta_tools/kubernetes/remote_run.py +558 -0
  165. paasta_tools/kubernetes_tools.py +4679 -0
  166. paasta_tools/list_kubernetes_service_instances.py +128 -0
  167. paasta_tools/list_tron_namespaces.py +60 -0
  168. paasta_tools/long_running_service_tools.py +678 -0
  169. paasta_tools/mac_address.py +44 -0
  170. paasta_tools/marathon_dashboard.py +0 -0
  171. paasta_tools/mesos/__init__.py +0 -0
  172. paasta_tools/mesos/cfg.py +46 -0
  173. paasta_tools/mesos/cluster.py +60 -0
  174. paasta_tools/mesos/exceptions.py +59 -0
  175. paasta_tools/mesos/framework.py +77 -0
  176. paasta_tools/mesos/log.py +48 -0
  177. paasta_tools/mesos/master.py +306 -0
  178. paasta_tools/mesos/mesos_file.py +169 -0
  179. paasta_tools/mesos/parallel.py +52 -0
  180. paasta_tools/mesos/slave.py +115 -0
  181. paasta_tools/mesos/task.py +94 -0
  182. paasta_tools/mesos/util.py +69 -0
  183. paasta_tools/mesos/zookeeper.py +37 -0
  184. paasta_tools/mesos_maintenance.py +848 -0
  185. paasta_tools/mesos_tools.py +1051 -0
  186. paasta_tools/metrics/__init__.py +0 -0
  187. paasta_tools/metrics/metastatus_lib.py +1110 -0
  188. paasta_tools/metrics/metrics_lib.py +217 -0
  189. paasta_tools/monitoring/__init__.py +13 -0
  190. paasta_tools/monitoring/check_k8s_api_performance.py +110 -0
  191. paasta_tools/monitoring_tools.py +652 -0
  192. paasta_tools/monkrelaycluster_tools.py +146 -0
  193. paasta_tools/nrtsearchservice_tools.py +143 -0
  194. paasta_tools/nrtsearchserviceeks_tools.py +68 -0
  195. paasta_tools/oom_logger.py +321 -0
  196. paasta_tools/paasta_deploy_tron_jobs +3 -0
  197. paasta_tools/paasta_execute_docker_command.py +123 -0
  198. paasta_tools/paasta_native_serviceinit.py +21 -0
  199. paasta_tools/paasta_service_config_loader.py +201 -0
  200. paasta_tools/paastaapi/__init__.py +29 -0
  201. paasta_tools/paastaapi/api/__init__.py +3 -0
  202. paasta_tools/paastaapi/api/autoscaler_api.py +302 -0
  203. paasta_tools/paastaapi/api/default_api.py +569 -0
  204. paasta_tools/paastaapi/api/remote_run_api.py +604 -0
  205. paasta_tools/paastaapi/api/resources_api.py +157 -0
  206. paasta_tools/paastaapi/api/service_api.py +1736 -0
  207. paasta_tools/paastaapi/api_client.py +818 -0
  208. paasta_tools/paastaapi/apis/__init__.py +22 -0
  209. paasta_tools/paastaapi/configuration.py +455 -0
  210. paasta_tools/paastaapi/exceptions.py +137 -0
  211. paasta_tools/paastaapi/model/__init__.py +5 -0
  212. paasta_tools/paastaapi/model/adhoc_launch_history.py +176 -0
  213. paasta_tools/paastaapi/model/autoscaler_count_msg.py +176 -0
  214. paasta_tools/paastaapi/model/deploy_queue.py +178 -0
  215. paasta_tools/paastaapi/model/deploy_queue_service_instance.py +194 -0
  216. paasta_tools/paastaapi/model/envoy_backend.py +185 -0
  217. paasta_tools/paastaapi/model/envoy_location.py +184 -0
  218. paasta_tools/paastaapi/model/envoy_status.py +181 -0
  219. paasta_tools/paastaapi/model/flink_cluster_overview.py +188 -0
  220. paasta_tools/paastaapi/model/flink_config.py +173 -0
  221. paasta_tools/paastaapi/model/flink_job.py +186 -0
  222. paasta_tools/paastaapi/model/flink_job_details.py +192 -0
  223. paasta_tools/paastaapi/model/flink_jobs.py +175 -0
  224. paasta_tools/paastaapi/model/float_and_error.py +173 -0
  225. paasta_tools/paastaapi/model/hpa_metric.py +176 -0
  226. paasta_tools/paastaapi/model/inline_object.py +170 -0
  227. paasta_tools/paastaapi/model/inline_response200.py +170 -0
  228. paasta_tools/paastaapi/model/inline_response2001.py +170 -0
  229. paasta_tools/paastaapi/model/instance_bounce_status.py +200 -0
  230. paasta_tools/paastaapi/model/instance_mesh_status.py +186 -0
  231. paasta_tools/paastaapi/model/instance_status.py +220 -0
  232. paasta_tools/paastaapi/model/instance_status_adhoc.py +187 -0
  233. paasta_tools/paastaapi/model/instance_status_cassandracluster.py +173 -0
  234. paasta_tools/paastaapi/model/instance_status_flink.py +173 -0
  235. paasta_tools/paastaapi/model/instance_status_kafkacluster.py +173 -0
  236. paasta_tools/paastaapi/model/instance_status_kubernetes.py +263 -0
  237. paasta_tools/paastaapi/model/instance_status_kubernetes_autoscaling_status.py +187 -0
  238. paasta_tools/paastaapi/model/instance_status_kubernetes_v2.py +197 -0
  239. paasta_tools/paastaapi/model/instance_status_tron.py +204 -0
  240. paasta_tools/paastaapi/model/instance_tasks.py +182 -0
  241. paasta_tools/paastaapi/model/integer_and_error.py +173 -0
  242. paasta_tools/paastaapi/model/kubernetes_container.py +178 -0
  243. paasta_tools/paastaapi/model/kubernetes_container_v2.py +219 -0
  244. paasta_tools/paastaapi/model/kubernetes_healthcheck.py +176 -0
  245. paasta_tools/paastaapi/model/kubernetes_pod.py +201 -0
  246. paasta_tools/paastaapi/model/kubernetes_pod_event.py +176 -0
  247. paasta_tools/paastaapi/model/kubernetes_pod_v2.py +213 -0
  248. paasta_tools/paastaapi/model/kubernetes_replica_set.py +185 -0
  249. paasta_tools/paastaapi/model/kubernetes_version.py +202 -0
  250. paasta_tools/paastaapi/model/remote_run_outcome.py +189 -0
  251. paasta_tools/paastaapi/model/remote_run_start.py +185 -0
  252. paasta_tools/paastaapi/model/remote_run_stop.py +176 -0
  253. paasta_tools/paastaapi/model/remote_run_token.py +173 -0
  254. paasta_tools/paastaapi/model/resource.py +187 -0
  255. paasta_tools/paastaapi/model/resource_item.py +187 -0
  256. paasta_tools/paastaapi/model/resource_value.py +176 -0
  257. paasta_tools/paastaapi/model/smartstack_backend.py +191 -0
  258. paasta_tools/paastaapi/model/smartstack_location.py +181 -0
  259. paasta_tools/paastaapi/model/smartstack_status.py +181 -0
  260. paasta_tools/paastaapi/model/task_tail_lines.py +176 -0
  261. paasta_tools/paastaapi/model_utils.py +1879 -0
  262. paasta_tools/paastaapi/models/__init__.py +62 -0
  263. paasta_tools/paastaapi/rest.py +287 -0
  264. paasta_tools/prune_completed_pods.py +220 -0
  265. paasta_tools/puppet_service_tools.py +59 -0
  266. paasta_tools/py.typed +1 -0
  267. paasta_tools/remote_git.py +127 -0
  268. paasta_tools/run-paasta-api-in-dev-mode.py +57 -0
  269. paasta_tools/run-paasta-api-playground.py +51 -0
  270. paasta_tools/secret_providers/__init__.py +66 -0
  271. paasta_tools/secret_providers/vault.py +214 -0
  272. paasta_tools/secret_tools.py +277 -0
  273. paasta_tools/setup_istio_mesh.py +353 -0
  274. paasta_tools/setup_kubernetes_cr.py +412 -0
  275. paasta_tools/setup_kubernetes_crd.py +138 -0
  276. paasta_tools/setup_kubernetes_internal_crd.py +154 -0
  277. paasta_tools/setup_kubernetes_job.py +353 -0
  278. paasta_tools/setup_prometheus_adapter_config.py +1028 -0
  279. paasta_tools/setup_tron_namespace.py +248 -0
  280. paasta_tools/slack.py +75 -0
  281. paasta_tools/smartstack_tools.py +676 -0
  282. paasta_tools/spark_tools.py +283 -0
  283. paasta_tools/synapse_srv_namespaces_fact.py +42 -0
  284. paasta_tools/tron/__init__.py +0 -0
  285. paasta_tools/tron/client.py +158 -0
  286. paasta_tools/tron/tron_command_context.py +194 -0
  287. paasta_tools/tron/tron_timeutils.py +101 -0
  288. paasta_tools/tron_tools.py +1448 -0
  289. paasta_tools/utils.py +4307 -0
  290. paasta_tools/yaml_tools.py +44 -0
  291. paasta_tools-1.21.3.data/scripts/apply_external_resources.py +79 -0
  292. paasta_tools-1.21.3.data/scripts/bounce_log_latency_parser.py +68 -0
  293. paasta_tools-1.21.3.data/scripts/check_autoscaler_max_instances.py +212 -0
  294. paasta_tools-1.21.3.data/scripts/check_cassandracluster_services_replication.py +35 -0
  295. paasta_tools-1.21.3.data/scripts/check_flink_services_health.py +203 -0
  296. paasta_tools-1.21.3.data/scripts/check_kubernetes_api.py +57 -0
  297. paasta_tools-1.21.3.data/scripts/check_kubernetes_services_replication.py +141 -0
  298. paasta_tools-1.21.3.data/scripts/check_manual_oapi_changes.sh +24 -0
  299. paasta_tools-1.21.3.data/scripts/check_oom_events.py +244 -0
  300. paasta_tools-1.21.3.data/scripts/check_orphans.py +306 -0
  301. paasta_tools-1.21.3.data/scripts/check_spark_jobs.py +234 -0
  302. paasta_tools-1.21.3.data/scripts/cleanup_kubernetes_cr.py +138 -0
  303. paasta_tools-1.21.3.data/scripts/cleanup_kubernetes_crd.py +145 -0
  304. paasta_tools-1.21.3.data/scripts/cleanup_kubernetes_jobs.py +344 -0
  305. paasta_tools-1.21.3.data/scripts/create_dynamodb_table.py +35 -0
  306. paasta_tools-1.21.3.data/scripts/create_paasta_playground.py +105 -0
  307. paasta_tools-1.21.3.data/scripts/delete_kubernetes_deployments.py +89 -0
  308. paasta_tools-1.21.3.data/scripts/emit_allocated_cpu_metrics.py +50 -0
  309. paasta_tools-1.21.3.data/scripts/generate_all_deployments +9 -0
  310. paasta_tools-1.21.3.data/scripts/generate_authenticating_services.py +94 -0
  311. paasta_tools-1.21.3.data/scripts/generate_deployments_for_service.py +255 -0
  312. paasta_tools-1.21.3.data/scripts/generate_services_file.py +114 -0
  313. paasta_tools-1.21.3.data/scripts/generate_services_yaml.py +30 -0
  314. paasta_tools-1.21.3.data/scripts/get_running_task_allocation.py +346 -0
  315. paasta_tools-1.21.3.data/scripts/habitat_fixer.py +86 -0
  316. paasta_tools-1.21.3.data/scripts/ide_helper.py +316 -0
  317. paasta_tools-1.21.3.data/scripts/is_pod_healthy_in_proxy.py +139 -0
  318. paasta_tools-1.21.3.data/scripts/is_pod_healthy_in_smartstack.py +50 -0
  319. paasta_tools-1.21.3.data/scripts/kill_bad_containers.py +109 -0
  320. paasta_tools-1.21.3.data/scripts/kubernetes_remove_evicted_pods.py +164 -0
  321. paasta_tools-1.21.3.data/scripts/mass-deploy-tag.sh +44 -0
  322. paasta_tools-1.21.3.data/scripts/mock_patch_checker.py +86 -0
  323. paasta_tools-1.21.3.data/scripts/paasta_cleanup_remote_run_resources.py +135 -0
  324. paasta_tools-1.21.3.data/scripts/paasta_cleanup_stale_nodes.py +181 -0
  325. paasta_tools-1.21.3.data/scripts/paasta_deploy_tron_jobs +3 -0
  326. paasta_tools-1.21.3.data/scripts/paasta_execute_docker_command.py +123 -0
  327. paasta_tools-1.21.3.data/scripts/paasta_secrets_sync.py +758 -0
  328. paasta_tools-1.21.3.data/scripts/paasta_tabcomplete.sh +23 -0
  329. paasta_tools-1.21.3.data/scripts/paasta_update_soa_memcpu.py +520 -0
  330. paasta_tools-1.21.3.data/scripts/render_template.py +129 -0
  331. paasta_tools-1.21.3.data/scripts/rightsizer_soaconfigs_update.py +348 -0
  332. paasta_tools-1.21.3.data/scripts/service_shard_remove.py +157 -0
  333. paasta_tools-1.21.3.data/scripts/service_shard_update.py +373 -0
  334. paasta_tools-1.21.3.data/scripts/setup_istio_mesh.py +353 -0
  335. paasta_tools-1.21.3.data/scripts/setup_kubernetes_cr.py +412 -0
  336. paasta_tools-1.21.3.data/scripts/setup_kubernetes_crd.py +138 -0
  337. paasta_tools-1.21.3.data/scripts/setup_kubernetes_internal_crd.py +154 -0
  338. paasta_tools-1.21.3.data/scripts/setup_kubernetes_job.py +353 -0
  339. paasta_tools-1.21.3.data/scripts/setup_prometheus_adapter_config.py +1028 -0
  340. paasta_tools-1.21.3.data/scripts/shared_ip_check.py +77 -0
  341. paasta_tools-1.21.3.data/scripts/synapse_srv_namespaces_fact.py +42 -0
  342. paasta_tools-1.21.3.data/scripts/timeouts_metrics_prom.py +64 -0
  343. paasta_tools-1.21.3.dist-info/LICENSE +201 -0
  344. paasta_tools-1.21.3.dist-info/METADATA +74 -0
  345. paasta_tools-1.21.3.dist-info/RECORD +348 -0
  346. paasta_tools-1.21.3.dist-info/WHEEL +5 -0
  347. paasta_tools-1.21.3.dist-info/entry_points.txt +20 -0
  348. paasta_tools-1.21.3.dist-info/top_level.txt +2 -0
@@ -0,0 +1,1736 @@
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
+ from paasta_tools.paastaapi.api_client import ApiClient, Endpoint
17
+ from paasta_tools.paastaapi.model_utils import ( # noqa: F401
18
+ check_allowed_values,
19
+ check_validations,
20
+ date,
21
+ datetime,
22
+ file_type,
23
+ none_type,
24
+ validate_and_convert_types
25
+ )
26
+ from paasta_tools.paastaapi.model.flink_cluster_overview import FlinkClusterOverview
27
+ from paasta_tools.paastaapi.model.flink_config import FlinkConfig
28
+ from paasta_tools.paastaapi.model.flink_job_details import FlinkJobDetails
29
+ from paasta_tools.paastaapi.model.flink_jobs import FlinkJobs
30
+ from paasta_tools.paastaapi.model.inline_response200 import InlineResponse200
31
+ from paasta_tools.paastaapi.model.inline_response2001 import InlineResponse2001
32
+ from paasta_tools.paastaapi.model.instance_bounce_status import InstanceBounceStatus
33
+ from paasta_tools.paastaapi.model.instance_mesh_status import InstanceMeshStatus
34
+ from paasta_tools.paastaapi.model.instance_status import InstanceStatus
35
+ from paasta_tools.paastaapi.model.instance_tasks import InstanceTasks
36
+
37
+
38
+ class ServiceApi(object):
39
+ """NOTE: This class is auto generated by OpenAPI Generator
40
+ Ref: https://openapi-generator.tech
41
+
42
+ Do not edit the class manually.
43
+ """
44
+
45
+ def __init__(self, api_client=None):
46
+ if api_client is None:
47
+ api_client = ApiClient()
48
+ self.api_client = api_client
49
+
50
+ def __bounce_status_instance(
51
+ self,
52
+ service,
53
+ instance,
54
+ **kwargs
55
+ ):
56
+ """Get bounce status of service_name.instance_name # noqa: E501
57
+
58
+ This method makes a synchronous HTTP request by default. To make an
59
+ asynchronous HTTP request, please pass async_req=True
60
+
61
+ >>> thread = api.bounce_status_instance(service, instance, async_req=True)
62
+ >>> result = thread.get()
63
+
64
+ Args:
65
+ service (str): Service name
66
+ instance (str): Instance name
67
+
68
+ Keyword Args:
69
+ _return_http_data_only (bool): response data without head status
70
+ code and headers. Default is True.
71
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
72
+ will be returned without reading/decoding response data.
73
+ Default is True.
74
+ _request_timeout (float/tuple): timeout setting for this request. If one
75
+ number provided, it will be total request timeout. It can also
76
+ be a pair (tuple) of (connection, read) timeouts.
77
+ Default is None.
78
+ _check_input_type (bool): specifies if type checking
79
+ should be done one the data sent to the server.
80
+ Default is True.
81
+ _check_return_type (bool): specifies if type checking
82
+ should be done one the data received from the server.
83
+ Default is True.
84
+ _host_index (int/None): specifies the index of the server
85
+ that we want to use.
86
+ Default is read from the configuration.
87
+ async_req (bool): execute request asynchronously
88
+
89
+ Returns:
90
+ InstanceBounceStatus
91
+ If the method is called asynchronously, returns the request
92
+ thread.
93
+ """
94
+ kwargs['async_req'] = kwargs.get(
95
+ 'async_req', False
96
+ )
97
+ kwargs['_return_http_data_only'] = kwargs.get(
98
+ '_return_http_data_only', True
99
+ )
100
+ kwargs['_preload_content'] = kwargs.get(
101
+ '_preload_content', True
102
+ )
103
+ kwargs['_request_timeout'] = kwargs.get(
104
+ '_request_timeout', None
105
+ )
106
+ kwargs['_check_input_type'] = kwargs.get(
107
+ '_check_input_type', True
108
+ )
109
+ kwargs['_check_return_type'] = kwargs.get(
110
+ '_check_return_type', True
111
+ )
112
+ kwargs['_host_index'] = kwargs.get('_host_index')
113
+ kwargs['service'] = \
114
+ service
115
+ kwargs['instance'] = \
116
+ instance
117
+ return self.call_with_http_info(**kwargs)
118
+
119
+ self.bounce_status_instance = Endpoint(
120
+ settings={
121
+ 'response_type': (InstanceBounceStatus,),
122
+ 'auth': [],
123
+ 'endpoint_path': '/services/{service}/{instance}/bounce_status',
124
+ 'operation_id': 'bounce_status_instance',
125
+ 'http_method': 'GET',
126
+ 'servers': None,
127
+ },
128
+ params_map={
129
+ 'all': [
130
+ 'service',
131
+ 'instance',
132
+ ],
133
+ 'required': [
134
+ 'service',
135
+ 'instance',
136
+ ],
137
+ 'nullable': [
138
+ ],
139
+ 'enum': [
140
+ ],
141
+ 'validation': [
142
+ ]
143
+ },
144
+ root_map={
145
+ 'validations': {
146
+ },
147
+ 'allowed_values': {
148
+ },
149
+ 'openapi_types': {
150
+ 'service':
151
+ (str,),
152
+ 'instance':
153
+ (str,),
154
+ },
155
+ 'attribute_map': {
156
+ 'service': 'service',
157
+ 'instance': 'instance',
158
+ },
159
+ 'location_map': {
160
+ 'service': 'path',
161
+ 'instance': 'path',
162
+ },
163
+ 'collection_format_map': {
164
+ }
165
+ },
166
+ headers_map={
167
+ 'accept': [
168
+ 'application/json'
169
+ ],
170
+ 'content_type': [],
171
+ },
172
+ api_client=api_client,
173
+ callable=__bounce_status_instance
174
+ )
175
+
176
+ def __delay_instance(
177
+ self,
178
+ service,
179
+ instance,
180
+ **kwargs
181
+ ):
182
+ """Get the possible reasons for a deployment delay for a marathon service.instance # noqa: E501
183
+
184
+ This method makes a synchronous HTTP request by default. To make an
185
+ asynchronous HTTP request, please pass async_req=True
186
+
187
+ >>> thread = api.delay_instance(service, instance, async_req=True)
188
+ >>> result = thread.get()
189
+
190
+ Args:
191
+ service (str): Service name
192
+ instance (str): Instance name
193
+
194
+ Keyword Args:
195
+ _return_http_data_only (bool): response data without head status
196
+ code and headers. Default is True.
197
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
198
+ will be returned without reading/decoding response data.
199
+ Default is True.
200
+ _request_timeout (float/tuple): timeout setting for this request. If one
201
+ number provided, it will be total request timeout. It can also
202
+ be a pair (tuple) of (connection, read) timeouts.
203
+ Default is None.
204
+ _check_input_type (bool): specifies if type checking
205
+ should be done one the data sent to the server.
206
+ Default is True.
207
+ _check_return_type (bool): specifies if type checking
208
+ should be done one the data received from the server.
209
+ Default is True.
210
+ _host_index (int/None): specifies the index of the server
211
+ that we want to use.
212
+ Default is read from the configuration.
213
+ async_req (bool): execute request asynchronously
214
+
215
+ Returns:
216
+ {str: (bool, date, datetime, dict, float, int, list, str, none_type)}
217
+ If the method is called asynchronously, returns the request
218
+ thread.
219
+ """
220
+ kwargs['async_req'] = kwargs.get(
221
+ 'async_req', False
222
+ )
223
+ kwargs['_return_http_data_only'] = kwargs.get(
224
+ '_return_http_data_only', True
225
+ )
226
+ kwargs['_preload_content'] = kwargs.get(
227
+ '_preload_content', True
228
+ )
229
+ kwargs['_request_timeout'] = kwargs.get(
230
+ '_request_timeout', None
231
+ )
232
+ kwargs['_check_input_type'] = kwargs.get(
233
+ '_check_input_type', True
234
+ )
235
+ kwargs['_check_return_type'] = kwargs.get(
236
+ '_check_return_type', True
237
+ )
238
+ kwargs['_host_index'] = kwargs.get('_host_index')
239
+ kwargs['service'] = \
240
+ service
241
+ kwargs['instance'] = \
242
+ instance
243
+ return self.call_with_http_info(**kwargs)
244
+
245
+ self.delay_instance = Endpoint(
246
+ settings={
247
+ 'response_type': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},),
248
+ 'auth': [],
249
+ 'endpoint_path': '/services/{service}/{instance}/delay',
250
+ 'operation_id': 'delay_instance',
251
+ 'http_method': 'GET',
252
+ 'servers': None,
253
+ },
254
+ params_map={
255
+ 'all': [
256
+ 'service',
257
+ 'instance',
258
+ ],
259
+ 'required': [
260
+ 'service',
261
+ 'instance',
262
+ ],
263
+ 'nullable': [
264
+ ],
265
+ 'enum': [
266
+ ],
267
+ 'validation': [
268
+ ]
269
+ },
270
+ root_map={
271
+ 'validations': {
272
+ },
273
+ 'allowed_values': {
274
+ },
275
+ 'openapi_types': {
276
+ 'service':
277
+ (str,),
278
+ 'instance':
279
+ (str,),
280
+ },
281
+ 'attribute_map': {
282
+ 'service': 'service',
283
+ 'instance': 'instance',
284
+ },
285
+ 'location_map': {
286
+ 'service': 'path',
287
+ 'instance': 'path',
288
+ },
289
+ 'collection_format_map': {
290
+ }
291
+ },
292
+ headers_map={
293
+ 'accept': [
294
+ 'application/json'
295
+ ],
296
+ 'content_type': [],
297
+ },
298
+ api_client=api_client,
299
+ callable=__delay_instance
300
+ )
301
+
302
+ def __get_flink_cluster_config(
303
+ self,
304
+ service,
305
+ instance,
306
+ **kwargs
307
+ ):
308
+ """Get config of a flink cluster # noqa: E501
309
+
310
+ This method makes a synchronous HTTP request by default. To make an
311
+ asynchronous HTTP request, please pass async_req=True
312
+
313
+ >>> thread = api.get_flink_cluster_config(service, instance, async_req=True)
314
+ >>> result = thread.get()
315
+
316
+ Args:
317
+ service (str): Service name
318
+ instance (str): Instance name
319
+
320
+ Keyword Args:
321
+ _return_http_data_only (bool): response data without head status
322
+ code and headers. Default is True.
323
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
324
+ will be returned without reading/decoding response data.
325
+ Default is True.
326
+ _request_timeout (float/tuple): timeout setting for this request. If one
327
+ number provided, it will be total request timeout. It can also
328
+ be a pair (tuple) of (connection, read) timeouts.
329
+ Default is None.
330
+ _check_input_type (bool): specifies if type checking
331
+ should be done one the data sent to the server.
332
+ Default is True.
333
+ _check_return_type (bool): specifies if type checking
334
+ should be done one the data received from the server.
335
+ Default is True.
336
+ _host_index (int/None): specifies the index of the server
337
+ that we want to use.
338
+ Default is read from the configuration.
339
+ async_req (bool): execute request asynchronously
340
+
341
+ Returns:
342
+ FlinkConfig
343
+ If the method is called asynchronously, returns the request
344
+ thread.
345
+ """
346
+ kwargs['async_req'] = kwargs.get(
347
+ 'async_req', False
348
+ )
349
+ kwargs['_return_http_data_only'] = kwargs.get(
350
+ '_return_http_data_only', True
351
+ )
352
+ kwargs['_preload_content'] = kwargs.get(
353
+ '_preload_content', True
354
+ )
355
+ kwargs['_request_timeout'] = kwargs.get(
356
+ '_request_timeout', None
357
+ )
358
+ kwargs['_check_input_type'] = kwargs.get(
359
+ '_check_input_type', True
360
+ )
361
+ kwargs['_check_return_type'] = kwargs.get(
362
+ '_check_return_type', True
363
+ )
364
+ kwargs['_host_index'] = kwargs.get('_host_index')
365
+ kwargs['service'] = \
366
+ service
367
+ kwargs['instance'] = \
368
+ instance
369
+ return self.call_with_http_info(**kwargs)
370
+
371
+ self.get_flink_cluster_config = Endpoint(
372
+ settings={
373
+ 'response_type': (FlinkConfig,),
374
+ 'auth': [],
375
+ 'endpoint_path': '/flink/{service}/{instance}/config',
376
+ 'operation_id': 'get_flink_cluster_config',
377
+ 'http_method': 'GET',
378
+ 'servers': None,
379
+ },
380
+ params_map={
381
+ 'all': [
382
+ 'service',
383
+ 'instance',
384
+ ],
385
+ 'required': [
386
+ 'service',
387
+ 'instance',
388
+ ],
389
+ 'nullable': [
390
+ ],
391
+ 'enum': [
392
+ ],
393
+ 'validation': [
394
+ ]
395
+ },
396
+ root_map={
397
+ 'validations': {
398
+ },
399
+ 'allowed_values': {
400
+ },
401
+ 'openapi_types': {
402
+ 'service':
403
+ (str,),
404
+ 'instance':
405
+ (str,),
406
+ },
407
+ 'attribute_map': {
408
+ 'service': 'service',
409
+ 'instance': 'instance',
410
+ },
411
+ 'location_map': {
412
+ 'service': 'path',
413
+ 'instance': 'path',
414
+ },
415
+ 'collection_format_map': {
416
+ }
417
+ },
418
+ headers_map={
419
+ 'accept': [
420
+ 'application/json'
421
+ ],
422
+ 'content_type': [],
423
+ },
424
+ api_client=api_client,
425
+ callable=__get_flink_cluster_config
426
+ )
427
+
428
+ def __get_flink_cluster_job_details(
429
+ self,
430
+ service,
431
+ instance,
432
+ job_id,
433
+ **kwargs
434
+ ):
435
+ """Get details of a flink job in a flink cluster # noqa: E501
436
+
437
+ This method makes a synchronous HTTP request by default. To make an
438
+ asynchronous HTTP request, please pass async_req=True
439
+
440
+ >>> thread = api.get_flink_cluster_job_details(service, instance, job_id, async_req=True)
441
+ >>> result = thread.get()
442
+
443
+ Args:
444
+ service (str): Service name
445
+ instance (str): Instance name
446
+ job_id (str): Job id
447
+
448
+ Keyword Args:
449
+ _return_http_data_only (bool): response data without head status
450
+ code and headers. Default is True.
451
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
452
+ will be returned without reading/decoding response data.
453
+ Default is True.
454
+ _request_timeout (float/tuple): timeout setting for this request. If one
455
+ number provided, it will be total request timeout. It can also
456
+ be a pair (tuple) of (connection, read) timeouts.
457
+ Default is None.
458
+ _check_input_type (bool): specifies if type checking
459
+ should be done one the data sent to the server.
460
+ Default is True.
461
+ _check_return_type (bool): specifies if type checking
462
+ should be done one the data received from the server.
463
+ Default is True.
464
+ _host_index (int/None): specifies the index of the server
465
+ that we want to use.
466
+ Default is read from the configuration.
467
+ async_req (bool): execute request asynchronously
468
+
469
+ Returns:
470
+ FlinkJobDetails
471
+ If the method is called asynchronously, returns the request
472
+ thread.
473
+ """
474
+ kwargs['async_req'] = kwargs.get(
475
+ 'async_req', False
476
+ )
477
+ kwargs['_return_http_data_only'] = kwargs.get(
478
+ '_return_http_data_only', True
479
+ )
480
+ kwargs['_preload_content'] = kwargs.get(
481
+ '_preload_content', True
482
+ )
483
+ kwargs['_request_timeout'] = kwargs.get(
484
+ '_request_timeout', None
485
+ )
486
+ kwargs['_check_input_type'] = kwargs.get(
487
+ '_check_input_type', True
488
+ )
489
+ kwargs['_check_return_type'] = kwargs.get(
490
+ '_check_return_type', True
491
+ )
492
+ kwargs['_host_index'] = kwargs.get('_host_index')
493
+ kwargs['service'] = \
494
+ service
495
+ kwargs['instance'] = \
496
+ instance
497
+ kwargs['job_id'] = \
498
+ job_id
499
+ return self.call_with_http_info(**kwargs)
500
+
501
+ self.get_flink_cluster_job_details = Endpoint(
502
+ settings={
503
+ 'response_type': (FlinkJobDetails,),
504
+ 'auth': [],
505
+ 'endpoint_path': '/flink/{service}/{instance}/jobs/{job_id}',
506
+ 'operation_id': 'get_flink_cluster_job_details',
507
+ 'http_method': 'GET',
508
+ 'servers': None,
509
+ },
510
+ params_map={
511
+ 'all': [
512
+ 'service',
513
+ 'instance',
514
+ 'job_id',
515
+ ],
516
+ 'required': [
517
+ 'service',
518
+ 'instance',
519
+ 'job_id',
520
+ ],
521
+ 'nullable': [
522
+ ],
523
+ 'enum': [
524
+ ],
525
+ 'validation': [
526
+ ]
527
+ },
528
+ root_map={
529
+ 'validations': {
530
+ },
531
+ 'allowed_values': {
532
+ },
533
+ 'openapi_types': {
534
+ 'service':
535
+ (str,),
536
+ 'instance':
537
+ (str,),
538
+ 'job_id':
539
+ (str,),
540
+ },
541
+ 'attribute_map': {
542
+ 'service': 'service',
543
+ 'instance': 'instance',
544
+ 'job_id': 'job_id',
545
+ },
546
+ 'location_map': {
547
+ 'service': 'path',
548
+ 'instance': 'path',
549
+ 'job_id': 'path',
550
+ },
551
+ 'collection_format_map': {
552
+ }
553
+ },
554
+ headers_map={
555
+ 'accept': [
556
+ 'application/json'
557
+ ],
558
+ 'content_type': [],
559
+ },
560
+ api_client=api_client,
561
+ callable=__get_flink_cluster_job_details
562
+ )
563
+
564
+ def __get_flink_cluster_overview(
565
+ self,
566
+ service,
567
+ instance,
568
+ **kwargs
569
+ ):
570
+ """Get overview of a flink cluster # noqa: E501
571
+
572
+ This method makes a synchronous HTTP request by default. To make an
573
+ asynchronous HTTP request, please pass async_req=True
574
+
575
+ >>> thread = api.get_flink_cluster_overview(service, instance, async_req=True)
576
+ >>> result = thread.get()
577
+
578
+ Args:
579
+ service (str): Service name
580
+ instance (str): Instance name
581
+
582
+ Keyword Args:
583
+ _return_http_data_only (bool): response data without head status
584
+ code and headers. Default is True.
585
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
586
+ will be returned without reading/decoding response data.
587
+ Default is True.
588
+ _request_timeout (float/tuple): timeout setting for this request. If one
589
+ number provided, it will be total request timeout. It can also
590
+ be a pair (tuple) of (connection, read) timeouts.
591
+ Default is None.
592
+ _check_input_type (bool): specifies if type checking
593
+ should be done one the data sent to the server.
594
+ Default is True.
595
+ _check_return_type (bool): specifies if type checking
596
+ should be done one the data received from the server.
597
+ Default is True.
598
+ _host_index (int/None): specifies the index of the server
599
+ that we want to use.
600
+ Default is read from the configuration.
601
+ async_req (bool): execute request asynchronously
602
+
603
+ Returns:
604
+ FlinkClusterOverview
605
+ If the method is called asynchronously, returns the request
606
+ thread.
607
+ """
608
+ kwargs['async_req'] = kwargs.get(
609
+ 'async_req', False
610
+ )
611
+ kwargs['_return_http_data_only'] = kwargs.get(
612
+ '_return_http_data_only', True
613
+ )
614
+ kwargs['_preload_content'] = kwargs.get(
615
+ '_preload_content', True
616
+ )
617
+ kwargs['_request_timeout'] = kwargs.get(
618
+ '_request_timeout', None
619
+ )
620
+ kwargs['_check_input_type'] = kwargs.get(
621
+ '_check_input_type', True
622
+ )
623
+ kwargs['_check_return_type'] = kwargs.get(
624
+ '_check_return_type', True
625
+ )
626
+ kwargs['_host_index'] = kwargs.get('_host_index')
627
+ kwargs['service'] = \
628
+ service
629
+ kwargs['instance'] = \
630
+ instance
631
+ return self.call_with_http_info(**kwargs)
632
+
633
+ self.get_flink_cluster_overview = Endpoint(
634
+ settings={
635
+ 'response_type': (FlinkClusterOverview,),
636
+ 'auth': [],
637
+ 'endpoint_path': '/flink/{service}/{instance}/overview',
638
+ 'operation_id': 'get_flink_cluster_overview',
639
+ 'http_method': 'GET',
640
+ 'servers': None,
641
+ },
642
+ params_map={
643
+ 'all': [
644
+ 'service',
645
+ 'instance',
646
+ ],
647
+ 'required': [
648
+ 'service',
649
+ 'instance',
650
+ ],
651
+ 'nullable': [
652
+ ],
653
+ 'enum': [
654
+ ],
655
+ 'validation': [
656
+ ]
657
+ },
658
+ root_map={
659
+ 'validations': {
660
+ },
661
+ 'allowed_values': {
662
+ },
663
+ 'openapi_types': {
664
+ 'service':
665
+ (str,),
666
+ 'instance':
667
+ (str,),
668
+ },
669
+ 'attribute_map': {
670
+ 'service': 'service',
671
+ 'instance': 'instance',
672
+ },
673
+ 'location_map': {
674
+ 'service': 'path',
675
+ 'instance': 'path',
676
+ },
677
+ 'collection_format_map': {
678
+ }
679
+ },
680
+ headers_map={
681
+ 'accept': [
682
+ 'application/json'
683
+ ],
684
+ 'content_type': [],
685
+ },
686
+ api_client=api_client,
687
+ callable=__get_flink_cluster_overview
688
+ )
689
+
690
+ def __instance_set_state(
691
+ self,
692
+ service,
693
+ instance,
694
+ desired_state,
695
+ **kwargs
696
+ ):
697
+ """Change state of service_name.instance_name # noqa: E501
698
+
699
+ This method makes a synchronous HTTP request by default. To make an
700
+ asynchronous HTTP request, please pass async_req=True
701
+
702
+ >>> thread = api.instance_set_state(service, instance, desired_state, async_req=True)
703
+ >>> result = thread.get()
704
+
705
+ Args:
706
+ service (str): Service name
707
+ instance (str): Instance name
708
+ desired_state (str): Desired state
709
+
710
+ Keyword Args:
711
+ _return_http_data_only (bool): response data without head status
712
+ code and headers. Default is True.
713
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
714
+ will be returned without reading/decoding response data.
715
+ Default is True.
716
+ _request_timeout (float/tuple): timeout setting for this request. If one
717
+ number provided, it will be total request timeout. It can also
718
+ be a pair (tuple) of (connection, read) timeouts.
719
+ Default is None.
720
+ _check_input_type (bool): specifies if type checking
721
+ should be done one the data sent to the server.
722
+ Default is True.
723
+ _check_return_type (bool): specifies if type checking
724
+ should be done one the data received from the server.
725
+ Default is True.
726
+ _host_index (int/None): specifies the index of the server
727
+ that we want to use.
728
+ Default is read from the configuration.
729
+ async_req (bool): execute request asynchronously
730
+
731
+ Returns:
732
+ None
733
+ If the method is called asynchronously, returns the request
734
+ thread.
735
+ """
736
+ kwargs['async_req'] = kwargs.get(
737
+ 'async_req', False
738
+ )
739
+ kwargs['_return_http_data_only'] = kwargs.get(
740
+ '_return_http_data_only', True
741
+ )
742
+ kwargs['_preload_content'] = kwargs.get(
743
+ '_preload_content', True
744
+ )
745
+ kwargs['_request_timeout'] = kwargs.get(
746
+ '_request_timeout', None
747
+ )
748
+ kwargs['_check_input_type'] = kwargs.get(
749
+ '_check_input_type', True
750
+ )
751
+ kwargs['_check_return_type'] = kwargs.get(
752
+ '_check_return_type', True
753
+ )
754
+ kwargs['_host_index'] = kwargs.get('_host_index')
755
+ kwargs['service'] = \
756
+ service
757
+ kwargs['instance'] = \
758
+ instance
759
+ kwargs['desired_state'] = \
760
+ desired_state
761
+ return self.call_with_http_info(**kwargs)
762
+
763
+ self.instance_set_state = Endpoint(
764
+ settings={
765
+ 'response_type': None,
766
+ 'auth': [],
767
+ 'endpoint_path': '/services/{service}/{instance}/state/{desired_state}',
768
+ 'operation_id': 'instance_set_state',
769
+ 'http_method': 'POST',
770
+ 'servers': None,
771
+ },
772
+ params_map={
773
+ 'all': [
774
+ 'service',
775
+ 'instance',
776
+ 'desired_state',
777
+ ],
778
+ 'required': [
779
+ 'service',
780
+ 'instance',
781
+ 'desired_state',
782
+ ],
783
+ 'nullable': [
784
+ ],
785
+ 'enum': [
786
+ ],
787
+ 'validation': [
788
+ ]
789
+ },
790
+ root_map={
791
+ 'validations': {
792
+ },
793
+ 'allowed_values': {
794
+ },
795
+ 'openapi_types': {
796
+ 'service':
797
+ (str,),
798
+ 'instance':
799
+ (str,),
800
+ 'desired_state':
801
+ (str,),
802
+ },
803
+ 'attribute_map': {
804
+ 'service': 'service',
805
+ 'instance': 'instance',
806
+ 'desired_state': 'desired_state',
807
+ },
808
+ 'location_map': {
809
+ 'service': 'path',
810
+ 'instance': 'path',
811
+ 'desired_state': 'path',
812
+ },
813
+ 'collection_format_map': {
814
+ }
815
+ },
816
+ headers_map={
817
+ 'accept': [],
818
+ 'content_type': [],
819
+ },
820
+ api_client=api_client,
821
+ callable=__instance_set_state
822
+ )
823
+
824
+ def __list_flink_cluster_jobs(
825
+ self,
826
+ service,
827
+ instance,
828
+ **kwargs
829
+ ):
830
+ """Get list of flink jobs in a flink cluster # noqa: E501
831
+
832
+ This method makes a synchronous HTTP request by default. To make an
833
+ asynchronous HTTP request, please pass async_req=True
834
+
835
+ >>> thread = api.list_flink_cluster_jobs(service, instance, async_req=True)
836
+ >>> result = thread.get()
837
+
838
+ Args:
839
+ service (str): Service name
840
+ instance (str): Instance name
841
+
842
+ Keyword Args:
843
+ _return_http_data_only (bool): response data without head status
844
+ code and headers. Default is True.
845
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
846
+ will be returned without reading/decoding response data.
847
+ Default is True.
848
+ _request_timeout (float/tuple): timeout setting for this request. If one
849
+ number provided, it will be total request timeout. It can also
850
+ be a pair (tuple) of (connection, read) timeouts.
851
+ Default is None.
852
+ _check_input_type (bool): specifies if type checking
853
+ should be done one the data sent to the server.
854
+ Default is True.
855
+ _check_return_type (bool): specifies if type checking
856
+ should be done one the data received from the server.
857
+ Default is True.
858
+ _host_index (int/None): specifies the index of the server
859
+ that we want to use.
860
+ Default is read from the configuration.
861
+ async_req (bool): execute request asynchronously
862
+
863
+ Returns:
864
+ FlinkJobs
865
+ If the method is called asynchronously, returns the request
866
+ thread.
867
+ """
868
+ kwargs['async_req'] = kwargs.get(
869
+ 'async_req', False
870
+ )
871
+ kwargs['_return_http_data_only'] = kwargs.get(
872
+ '_return_http_data_only', True
873
+ )
874
+ kwargs['_preload_content'] = kwargs.get(
875
+ '_preload_content', True
876
+ )
877
+ kwargs['_request_timeout'] = kwargs.get(
878
+ '_request_timeout', None
879
+ )
880
+ kwargs['_check_input_type'] = kwargs.get(
881
+ '_check_input_type', True
882
+ )
883
+ kwargs['_check_return_type'] = kwargs.get(
884
+ '_check_return_type', True
885
+ )
886
+ kwargs['_host_index'] = kwargs.get('_host_index')
887
+ kwargs['service'] = \
888
+ service
889
+ kwargs['instance'] = \
890
+ instance
891
+ return self.call_with_http_info(**kwargs)
892
+
893
+ self.list_flink_cluster_jobs = Endpoint(
894
+ settings={
895
+ 'response_type': (FlinkJobs,),
896
+ 'auth': [],
897
+ 'endpoint_path': '/flink/{service}/{instance}/jobs',
898
+ 'operation_id': 'list_flink_cluster_jobs',
899
+ 'http_method': 'GET',
900
+ 'servers': None,
901
+ },
902
+ params_map={
903
+ 'all': [
904
+ 'service',
905
+ 'instance',
906
+ ],
907
+ 'required': [
908
+ 'service',
909
+ 'instance',
910
+ ],
911
+ 'nullable': [
912
+ ],
913
+ 'enum': [
914
+ ],
915
+ 'validation': [
916
+ ]
917
+ },
918
+ root_map={
919
+ 'validations': {
920
+ },
921
+ 'allowed_values': {
922
+ },
923
+ 'openapi_types': {
924
+ 'service':
925
+ (str,),
926
+ 'instance':
927
+ (str,),
928
+ },
929
+ 'attribute_map': {
930
+ 'service': 'service',
931
+ 'instance': 'instance',
932
+ },
933
+ 'location_map': {
934
+ 'service': 'path',
935
+ 'instance': 'path',
936
+ },
937
+ 'collection_format_map': {
938
+ }
939
+ },
940
+ headers_map={
941
+ 'accept': [
942
+ 'application/json'
943
+ ],
944
+ 'content_type': [],
945
+ },
946
+ api_client=api_client,
947
+ callable=__list_flink_cluster_jobs
948
+ )
949
+
950
+ def __list_instances(
951
+ self,
952
+ service,
953
+ **kwargs
954
+ ):
955
+ """List instances of service_name # noqa: E501
956
+
957
+ This method makes a synchronous HTTP request by default. To make an
958
+ asynchronous HTTP request, please pass async_req=True
959
+
960
+ >>> thread = api.list_instances(service, async_req=True)
961
+ >>> result = thread.get()
962
+
963
+ Args:
964
+ service (str): Service name
965
+
966
+ Keyword Args:
967
+ _return_http_data_only (bool): response data without head status
968
+ code and headers. Default is True.
969
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
970
+ will be returned without reading/decoding response data.
971
+ Default is True.
972
+ _request_timeout (float/tuple): timeout setting for this request. If one
973
+ number provided, it will be total request timeout. It can also
974
+ be a pair (tuple) of (connection, read) timeouts.
975
+ Default is None.
976
+ _check_input_type (bool): specifies if type checking
977
+ should be done one the data sent to the server.
978
+ Default is True.
979
+ _check_return_type (bool): specifies if type checking
980
+ should be done one the data received from the server.
981
+ Default is True.
982
+ _host_index (int/None): specifies the index of the server
983
+ that we want to use.
984
+ Default is read from the configuration.
985
+ async_req (bool): execute request asynchronously
986
+
987
+ Returns:
988
+ InlineResponse2001
989
+ If the method is called asynchronously, returns the request
990
+ thread.
991
+ """
992
+ kwargs['async_req'] = kwargs.get(
993
+ 'async_req', False
994
+ )
995
+ kwargs['_return_http_data_only'] = kwargs.get(
996
+ '_return_http_data_only', True
997
+ )
998
+ kwargs['_preload_content'] = kwargs.get(
999
+ '_preload_content', True
1000
+ )
1001
+ kwargs['_request_timeout'] = kwargs.get(
1002
+ '_request_timeout', None
1003
+ )
1004
+ kwargs['_check_input_type'] = kwargs.get(
1005
+ '_check_input_type', True
1006
+ )
1007
+ kwargs['_check_return_type'] = kwargs.get(
1008
+ '_check_return_type', True
1009
+ )
1010
+ kwargs['_host_index'] = kwargs.get('_host_index')
1011
+ kwargs['service'] = \
1012
+ service
1013
+ return self.call_with_http_info(**kwargs)
1014
+
1015
+ self.list_instances = Endpoint(
1016
+ settings={
1017
+ 'response_type': (InlineResponse2001,),
1018
+ 'auth': [],
1019
+ 'endpoint_path': '/services/{service}',
1020
+ 'operation_id': 'list_instances',
1021
+ 'http_method': 'GET',
1022
+ 'servers': None,
1023
+ },
1024
+ params_map={
1025
+ 'all': [
1026
+ 'service',
1027
+ ],
1028
+ 'required': [
1029
+ 'service',
1030
+ ],
1031
+ 'nullable': [
1032
+ ],
1033
+ 'enum': [
1034
+ ],
1035
+ 'validation': [
1036
+ ]
1037
+ },
1038
+ root_map={
1039
+ 'validations': {
1040
+ },
1041
+ 'allowed_values': {
1042
+ },
1043
+ 'openapi_types': {
1044
+ 'service':
1045
+ (str,),
1046
+ },
1047
+ 'attribute_map': {
1048
+ 'service': 'service',
1049
+ },
1050
+ 'location_map': {
1051
+ 'service': 'path',
1052
+ },
1053
+ 'collection_format_map': {
1054
+ }
1055
+ },
1056
+ headers_map={
1057
+ 'accept': [
1058
+ 'application/json'
1059
+ ],
1060
+ 'content_type': [],
1061
+ },
1062
+ api_client=api_client,
1063
+ callable=__list_instances
1064
+ )
1065
+
1066
+ def __list_services_for_cluster(
1067
+ self,
1068
+ **kwargs
1069
+ ):
1070
+ """List service names and service instance names on the current cluster # noqa: E501
1071
+
1072
+ This method makes a synchronous HTTP request by default. To make an
1073
+ asynchronous HTTP request, please pass async_req=True
1074
+
1075
+ >>> thread = api.list_services_for_cluster(async_req=True)
1076
+ >>> result = thread.get()
1077
+
1078
+
1079
+ Keyword Args:
1080
+ _return_http_data_only (bool): response data without head status
1081
+ code and headers. Default is True.
1082
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
1083
+ will be returned without reading/decoding response data.
1084
+ Default is True.
1085
+ _request_timeout (float/tuple): timeout setting for this request. If one
1086
+ number provided, it will be total request timeout. It can also
1087
+ be a pair (tuple) of (connection, read) timeouts.
1088
+ Default is None.
1089
+ _check_input_type (bool): specifies if type checking
1090
+ should be done one the data sent to the server.
1091
+ Default is True.
1092
+ _check_return_type (bool): specifies if type checking
1093
+ should be done one the data received from the server.
1094
+ Default is True.
1095
+ _host_index (int/None): specifies the index of the server
1096
+ that we want to use.
1097
+ Default is read from the configuration.
1098
+ async_req (bool): execute request asynchronously
1099
+
1100
+ Returns:
1101
+ InlineResponse200
1102
+ If the method is called asynchronously, returns the request
1103
+ thread.
1104
+ """
1105
+ kwargs['async_req'] = kwargs.get(
1106
+ 'async_req', False
1107
+ )
1108
+ kwargs['_return_http_data_only'] = kwargs.get(
1109
+ '_return_http_data_only', True
1110
+ )
1111
+ kwargs['_preload_content'] = kwargs.get(
1112
+ '_preload_content', True
1113
+ )
1114
+ kwargs['_request_timeout'] = kwargs.get(
1115
+ '_request_timeout', None
1116
+ )
1117
+ kwargs['_check_input_type'] = kwargs.get(
1118
+ '_check_input_type', True
1119
+ )
1120
+ kwargs['_check_return_type'] = kwargs.get(
1121
+ '_check_return_type', True
1122
+ )
1123
+ kwargs['_host_index'] = kwargs.get('_host_index')
1124
+ return self.call_with_http_info(**kwargs)
1125
+
1126
+ self.list_services_for_cluster = Endpoint(
1127
+ settings={
1128
+ 'response_type': (InlineResponse200,),
1129
+ 'auth': [],
1130
+ 'endpoint_path': '/services',
1131
+ 'operation_id': 'list_services_for_cluster',
1132
+ 'http_method': 'GET',
1133
+ 'servers': None,
1134
+ },
1135
+ params_map={
1136
+ 'all': [
1137
+ ],
1138
+ 'required': [],
1139
+ 'nullable': [
1140
+ ],
1141
+ 'enum': [
1142
+ ],
1143
+ 'validation': [
1144
+ ]
1145
+ },
1146
+ root_map={
1147
+ 'validations': {
1148
+ },
1149
+ 'allowed_values': {
1150
+ },
1151
+ 'openapi_types': {
1152
+ },
1153
+ 'attribute_map': {
1154
+ },
1155
+ 'location_map': {
1156
+ },
1157
+ 'collection_format_map': {
1158
+ }
1159
+ },
1160
+ headers_map={
1161
+ 'accept': [
1162
+ 'application/json'
1163
+ ],
1164
+ 'content_type': [],
1165
+ },
1166
+ api_client=api_client,
1167
+ callable=__list_services_for_cluster
1168
+ )
1169
+
1170
+ def __mesh_instance(
1171
+ self,
1172
+ service,
1173
+ instance,
1174
+ **kwargs
1175
+ ):
1176
+ """Get mesh status for service_name.instance_name # noqa: E501
1177
+
1178
+ This method makes a synchronous HTTP request by default. To make an
1179
+ asynchronous HTTP request, please pass async_req=True
1180
+
1181
+ >>> thread = api.mesh_instance(service, instance, async_req=True)
1182
+ >>> result = thread.get()
1183
+
1184
+ Args:
1185
+ service (str): Service name
1186
+ instance (str): Instance name
1187
+
1188
+ Keyword Args:
1189
+ include_envoy (bool): Include Envoy information. [optional] if omitted the server will use the default value of True
1190
+ _return_http_data_only (bool): response data without head status
1191
+ code and headers. Default is True.
1192
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
1193
+ will be returned without reading/decoding response data.
1194
+ Default is True.
1195
+ _request_timeout (float/tuple): timeout setting for this request. If one
1196
+ number provided, it will be total request timeout. It can also
1197
+ be a pair (tuple) of (connection, read) timeouts.
1198
+ Default is None.
1199
+ _check_input_type (bool): specifies if type checking
1200
+ should be done one the data sent to the server.
1201
+ Default is True.
1202
+ _check_return_type (bool): specifies if type checking
1203
+ should be done one the data received from the server.
1204
+ Default is True.
1205
+ _host_index (int/None): specifies the index of the server
1206
+ that we want to use.
1207
+ Default is read from the configuration.
1208
+ async_req (bool): execute request asynchronously
1209
+
1210
+ Returns:
1211
+ InstanceMeshStatus
1212
+ If the method is called asynchronously, returns the request
1213
+ thread.
1214
+ """
1215
+ kwargs['async_req'] = kwargs.get(
1216
+ 'async_req', False
1217
+ )
1218
+ kwargs['_return_http_data_only'] = kwargs.get(
1219
+ '_return_http_data_only', True
1220
+ )
1221
+ kwargs['_preload_content'] = kwargs.get(
1222
+ '_preload_content', True
1223
+ )
1224
+ kwargs['_request_timeout'] = kwargs.get(
1225
+ '_request_timeout', None
1226
+ )
1227
+ kwargs['_check_input_type'] = kwargs.get(
1228
+ '_check_input_type', True
1229
+ )
1230
+ kwargs['_check_return_type'] = kwargs.get(
1231
+ '_check_return_type', True
1232
+ )
1233
+ kwargs['_host_index'] = kwargs.get('_host_index')
1234
+ kwargs['service'] = \
1235
+ service
1236
+ kwargs['instance'] = \
1237
+ instance
1238
+ return self.call_with_http_info(**kwargs)
1239
+
1240
+ self.mesh_instance = Endpoint(
1241
+ settings={
1242
+ 'response_type': (InstanceMeshStatus,),
1243
+ 'auth': [],
1244
+ 'endpoint_path': '/services/{service}/{instance}/mesh_status',
1245
+ 'operation_id': 'mesh_instance',
1246
+ 'http_method': 'GET',
1247
+ 'servers': None,
1248
+ },
1249
+ params_map={
1250
+ 'all': [
1251
+ 'service',
1252
+ 'instance',
1253
+ 'include_envoy',
1254
+ ],
1255
+ 'required': [
1256
+ 'service',
1257
+ 'instance',
1258
+ ],
1259
+ 'nullable': [
1260
+ ],
1261
+ 'enum': [
1262
+ ],
1263
+ 'validation': [
1264
+ ]
1265
+ },
1266
+ root_map={
1267
+ 'validations': {
1268
+ },
1269
+ 'allowed_values': {
1270
+ },
1271
+ 'openapi_types': {
1272
+ 'service':
1273
+ (str,),
1274
+ 'instance':
1275
+ (str,),
1276
+ 'include_envoy':
1277
+ (bool,),
1278
+ },
1279
+ 'attribute_map': {
1280
+ 'service': 'service',
1281
+ 'instance': 'instance',
1282
+ 'include_envoy': 'include_envoy',
1283
+ },
1284
+ 'location_map': {
1285
+ 'service': 'path',
1286
+ 'instance': 'path',
1287
+ 'include_envoy': 'query',
1288
+ },
1289
+ 'collection_format_map': {
1290
+ }
1291
+ },
1292
+ headers_map={
1293
+ 'accept': [
1294
+ 'application/json'
1295
+ ],
1296
+ 'content_type': [],
1297
+ },
1298
+ api_client=api_client,
1299
+ callable=__mesh_instance
1300
+ )
1301
+
1302
+ def __status_instance(
1303
+ self,
1304
+ service,
1305
+ instance,
1306
+ **kwargs
1307
+ ):
1308
+ """Get status of service_name.instance_name # noqa: E501
1309
+
1310
+ This method makes a synchronous HTTP request by default. To make an
1311
+ asynchronous HTTP request, please pass async_req=True
1312
+
1313
+ >>> thread = api.status_instance(service, instance, async_req=True)
1314
+ >>> result = thread.get()
1315
+
1316
+ Args:
1317
+ service (str): Service name
1318
+ instance (str): Instance name
1319
+
1320
+ Keyword Args:
1321
+ verbose (int): Include verbose status information. [optional]
1322
+ include_envoy (bool): Include Envoy information. [optional]
1323
+ include_mesos (bool): Include Mesos information. [optional]
1324
+ new (bool): Use new version of paasta status for services. [optional]
1325
+ all_namespaces (bool): Search all namespaces for running copies. [optional]
1326
+ _return_http_data_only (bool): response data without head status
1327
+ code and headers. Default is True.
1328
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
1329
+ will be returned without reading/decoding response data.
1330
+ Default is True.
1331
+ _request_timeout (float/tuple): timeout setting for this request. If one
1332
+ number provided, it will be total request timeout. It can also
1333
+ be a pair (tuple) of (connection, read) timeouts.
1334
+ Default is None.
1335
+ _check_input_type (bool): specifies if type checking
1336
+ should be done one the data sent to the server.
1337
+ Default is True.
1338
+ _check_return_type (bool): specifies if type checking
1339
+ should be done one the data received from the server.
1340
+ Default is True.
1341
+ _host_index (int/None): specifies the index of the server
1342
+ that we want to use.
1343
+ Default is read from the configuration.
1344
+ async_req (bool): execute request asynchronously
1345
+
1346
+ Returns:
1347
+ InstanceStatus
1348
+ If the method is called asynchronously, returns the request
1349
+ thread.
1350
+ """
1351
+ kwargs['async_req'] = kwargs.get(
1352
+ 'async_req', False
1353
+ )
1354
+ kwargs['_return_http_data_only'] = kwargs.get(
1355
+ '_return_http_data_only', True
1356
+ )
1357
+ kwargs['_preload_content'] = kwargs.get(
1358
+ '_preload_content', True
1359
+ )
1360
+ kwargs['_request_timeout'] = kwargs.get(
1361
+ '_request_timeout', None
1362
+ )
1363
+ kwargs['_check_input_type'] = kwargs.get(
1364
+ '_check_input_type', True
1365
+ )
1366
+ kwargs['_check_return_type'] = kwargs.get(
1367
+ '_check_return_type', True
1368
+ )
1369
+ kwargs['_host_index'] = kwargs.get('_host_index')
1370
+ kwargs['service'] = \
1371
+ service
1372
+ kwargs['instance'] = \
1373
+ instance
1374
+ return self.call_with_http_info(**kwargs)
1375
+
1376
+ self.status_instance = Endpoint(
1377
+ settings={
1378
+ 'response_type': (InstanceStatus,),
1379
+ 'auth': [],
1380
+ 'endpoint_path': '/services/{service}/{instance}/status',
1381
+ 'operation_id': 'status_instance',
1382
+ 'http_method': 'GET',
1383
+ 'servers': None,
1384
+ },
1385
+ params_map={
1386
+ 'all': [
1387
+ 'service',
1388
+ 'instance',
1389
+ 'verbose',
1390
+ 'include_envoy',
1391
+ 'include_mesos',
1392
+ 'new',
1393
+ 'all_namespaces',
1394
+ ],
1395
+ 'required': [
1396
+ 'service',
1397
+ 'instance',
1398
+ ],
1399
+ 'nullable': [
1400
+ ],
1401
+ 'enum': [
1402
+ ],
1403
+ 'validation': [
1404
+ ]
1405
+ },
1406
+ root_map={
1407
+ 'validations': {
1408
+ },
1409
+ 'allowed_values': {
1410
+ },
1411
+ 'openapi_types': {
1412
+ 'service':
1413
+ (str,),
1414
+ 'instance':
1415
+ (str,),
1416
+ 'verbose':
1417
+ (int,),
1418
+ 'include_envoy':
1419
+ (bool,),
1420
+ 'include_mesos':
1421
+ (bool,),
1422
+ 'new':
1423
+ (bool,),
1424
+ 'all_namespaces':
1425
+ (bool,),
1426
+ },
1427
+ 'attribute_map': {
1428
+ 'service': 'service',
1429
+ 'instance': 'instance',
1430
+ 'verbose': 'verbose',
1431
+ 'include_envoy': 'include_envoy',
1432
+ 'include_mesos': 'include_mesos',
1433
+ 'new': 'new',
1434
+ 'all_namespaces': 'all_namespaces',
1435
+ },
1436
+ 'location_map': {
1437
+ 'service': 'path',
1438
+ 'instance': 'path',
1439
+ 'verbose': 'query',
1440
+ 'include_envoy': 'query',
1441
+ 'include_mesos': 'query',
1442
+ 'new': 'query',
1443
+ 'all_namespaces': 'query',
1444
+ },
1445
+ 'collection_format_map': {
1446
+ }
1447
+ },
1448
+ headers_map={
1449
+ 'accept': [
1450
+ 'application/json'
1451
+ ],
1452
+ 'content_type': [],
1453
+ },
1454
+ api_client=api_client,
1455
+ callable=__status_instance
1456
+ )
1457
+
1458
+ def __task_instance(
1459
+ self,
1460
+ service,
1461
+ instance,
1462
+ task_id,
1463
+ **kwargs
1464
+ ):
1465
+ """Get mesos task of service_name.instance_name by task_id # noqa: E501
1466
+
1467
+ This method makes a synchronous HTTP request by default. To make an
1468
+ asynchronous HTTP request, please pass async_req=True
1469
+
1470
+ >>> thread = api.task_instance(service, instance, task_id, async_req=True)
1471
+ >>> result = thread.get()
1472
+
1473
+ Args:
1474
+ service (str): Service name
1475
+ instance (str): Instance name
1476
+ task_id (str): mesos task id
1477
+
1478
+ Keyword Args:
1479
+ verbose (bool): Return slave and executor for task. [optional]
1480
+ _return_http_data_only (bool): response data without head status
1481
+ code and headers. Default is True.
1482
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
1483
+ will be returned without reading/decoding response data.
1484
+ Default is True.
1485
+ _request_timeout (float/tuple): timeout setting for this request. If one
1486
+ number provided, it will be total request timeout. It can also
1487
+ be a pair (tuple) of (connection, read) timeouts.
1488
+ Default is None.
1489
+ _check_input_type (bool): specifies if type checking
1490
+ should be done one the data sent to the server.
1491
+ Default is True.
1492
+ _check_return_type (bool): specifies if type checking
1493
+ should be done one the data received from the server.
1494
+ Default is True.
1495
+ _host_index (int/None): specifies the index of the server
1496
+ that we want to use.
1497
+ Default is read from the configuration.
1498
+ async_req (bool): execute request asynchronously
1499
+
1500
+ Returns:
1501
+ {str: (bool, date, datetime, dict, float, int, list, str, none_type)}
1502
+ If the method is called asynchronously, returns the request
1503
+ thread.
1504
+ """
1505
+ kwargs['async_req'] = kwargs.get(
1506
+ 'async_req', False
1507
+ )
1508
+ kwargs['_return_http_data_only'] = kwargs.get(
1509
+ '_return_http_data_only', True
1510
+ )
1511
+ kwargs['_preload_content'] = kwargs.get(
1512
+ '_preload_content', True
1513
+ )
1514
+ kwargs['_request_timeout'] = kwargs.get(
1515
+ '_request_timeout', None
1516
+ )
1517
+ kwargs['_check_input_type'] = kwargs.get(
1518
+ '_check_input_type', True
1519
+ )
1520
+ kwargs['_check_return_type'] = kwargs.get(
1521
+ '_check_return_type', True
1522
+ )
1523
+ kwargs['_host_index'] = kwargs.get('_host_index')
1524
+ kwargs['service'] = \
1525
+ service
1526
+ kwargs['instance'] = \
1527
+ instance
1528
+ kwargs['task_id'] = \
1529
+ task_id
1530
+ return self.call_with_http_info(**kwargs)
1531
+
1532
+ self.task_instance = Endpoint(
1533
+ settings={
1534
+ 'response_type': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},),
1535
+ 'auth': [],
1536
+ 'endpoint_path': '/services/{service}/{instance}/tasks/{task_id}',
1537
+ 'operation_id': 'task_instance',
1538
+ 'http_method': 'GET',
1539
+ 'servers': None,
1540
+ },
1541
+ params_map={
1542
+ 'all': [
1543
+ 'service',
1544
+ 'instance',
1545
+ 'task_id',
1546
+ 'verbose',
1547
+ ],
1548
+ 'required': [
1549
+ 'service',
1550
+ 'instance',
1551
+ 'task_id',
1552
+ ],
1553
+ 'nullable': [
1554
+ ],
1555
+ 'enum': [
1556
+ ],
1557
+ 'validation': [
1558
+ ]
1559
+ },
1560
+ root_map={
1561
+ 'validations': {
1562
+ },
1563
+ 'allowed_values': {
1564
+ },
1565
+ 'openapi_types': {
1566
+ 'service':
1567
+ (str,),
1568
+ 'instance':
1569
+ (str,),
1570
+ 'task_id':
1571
+ (str,),
1572
+ 'verbose':
1573
+ (bool,),
1574
+ },
1575
+ 'attribute_map': {
1576
+ 'service': 'service',
1577
+ 'instance': 'instance',
1578
+ 'task_id': 'task_id',
1579
+ 'verbose': 'verbose',
1580
+ },
1581
+ 'location_map': {
1582
+ 'service': 'path',
1583
+ 'instance': 'path',
1584
+ 'task_id': 'path',
1585
+ 'verbose': 'query',
1586
+ },
1587
+ 'collection_format_map': {
1588
+ }
1589
+ },
1590
+ headers_map={
1591
+ 'accept': [
1592
+ 'application/json'
1593
+ ],
1594
+ 'content_type': [],
1595
+ },
1596
+ api_client=api_client,
1597
+ callable=__task_instance
1598
+ )
1599
+
1600
+ def __tasks_instance(
1601
+ self,
1602
+ service,
1603
+ instance,
1604
+ **kwargs
1605
+ ):
1606
+ """Get mesos tasks of service_name.instance_name # noqa: E501
1607
+
1608
+ This method makes a synchronous HTTP request by default. To make an
1609
+ asynchronous HTTP request, please pass async_req=True
1610
+
1611
+ >>> thread = api.tasks_instance(service, instance, async_req=True)
1612
+ >>> result = thread.get()
1613
+
1614
+ Args:
1615
+ service (str): Service name
1616
+ instance (str): Instance name
1617
+
1618
+ Keyword Args:
1619
+ slave_hostname (str): slave hostname to filter tasks by. [optional]
1620
+ verbose (bool): Return slave and executor for task. [optional]
1621
+ _return_http_data_only (bool): response data without head status
1622
+ code and headers. Default is True.
1623
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
1624
+ will be returned without reading/decoding response data.
1625
+ Default is True.
1626
+ _request_timeout (float/tuple): timeout setting for this request. If one
1627
+ number provided, it will be total request timeout. It can also
1628
+ be a pair (tuple) of (connection, read) timeouts.
1629
+ Default is None.
1630
+ _check_input_type (bool): specifies if type checking
1631
+ should be done one the data sent to the server.
1632
+ Default is True.
1633
+ _check_return_type (bool): specifies if type checking
1634
+ should be done one the data received from the server.
1635
+ Default is True.
1636
+ _host_index (int/None): specifies the index of the server
1637
+ that we want to use.
1638
+ Default is read from the configuration.
1639
+ async_req (bool): execute request asynchronously
1640
+
1641
+ Returns:
1642
+ InstanceTasks
1643
+ If the method is called asynchronously, returns the request
1644
+ thread.
1645
+ """
1646
+ kwargs['async_req'] = kwargs.get(
1647
+ 'async_req', False
1648
+ )
1649
+ kwargs['_return_http_data_only'] = kwargs.get(
1650
+ '_return_http_data_only', True
1651
+ )
1652
+ kwargs['_preload_content'] = kwargs.get(
1653
+ '_preload_content', True
1654
+ )
1655
+ kwargs['_request_timeout'] = kwargs.get(
1656
+ '_request_timeout', None
1657
+ )
1658
+ kwargs['_check_input_type'] = kwargs.get(
1659
+ '_check_input_type', True
1660
+ )
1661
+ kwargs['_check_return_type'] = kwargs.get(
1662
+ '_check_return_type', True
1663
+ )
1664
+ kwargs['_host_index'] = kwargs.get('_host_index')
1665
+ kwargs['service'] = \
1666
+ service
1667
+ kwargs['instance'] = \
1668
+ instance
1669
+ return self.call_with_http_info(**kwargs)
1670
+
1671
+ self.tasks_instance = Endpoint(
1672
+ settings={
1673
+ 'response_type': (InstanceTasks,),
1674
+ 'auth': [],
1675
+ 'endpoint_path': '/services/{service}/{instance}/tasks',
1676
+ 'operation_id': 'tasks_instance',
1677
+ 'http_method': 'GET',
1678
+ 'servers': None,
1679
+ },
1680
+ params_map={
1681
+ 'all': [
1682
+ 'service',
1683
+ 'instance',
1684
+ 'slave_hostname',
1685
+ 'verbose',
1686
+ ],
1687
+ 'required': [
1688
+ 'service',
1689
+ 'instance',
1690
+ ],
1691
+ 'nullable': [
1692
+ ],
1693
+ 'enum': [
1694
+ ],
1695
+ 'validation': [
1696
+ ]
1697
+ },
1698
+ root_map={
1699
+ 'validations': {
1700
+ },
1701
+ 'allowed_values': {
1702
+ },
1703
+ 'openapi_types': {
1704
+ 'service':
1705
+ (str,),
1706
+ 'instance':
1707
+ (str,),
1708
+ 'slave_hostname':
1709
+ (str,),
1710
+ 'verbose':
1711
+ (bool,),
1712
+ },
1713
+ 'attribute_map': {
1714
+ 'service': 'service',
1715
+ 'instance': 'instance',
1716
+ 'slave_hostname': 'slave_hostname',
1717
+ 'verbose': 'verbose',
1718
+ },
1719
+ 'location_map': {
1720
+ 'service': 'path',
1721
+ 'instance': 'path',
1722
+ 'slave_hostname': 'query',
1723
+ 'verbose': 'query',
1724
+ },
1725
+ 'collection_format_map': {
1726
+ }
1727
+ },
1728
+ headers_map={
1729
+ 'accept': [
1730
+ 'application/json'
1731
+ ],
1732
+ 'content_type': [],
1733
+ },
1734
+ api_client=api_client,
1735
+ callable=__tasks_instance
1736
+ )