def get_namespace(): r = Runner() r.run_playbook(playbooks=[ K8sObserver.fetch_playbook_path('get_namespace.yaml') ], ) result = r.get_playbook_result() return K8sRepository.create_k8s_namespace_view_model(result)
def get_pods(namespace): r = Runner() r.run_playbook( playbooks=[K8sObserver.fetch_playbook_path('get_pod.yaml')], extra_vars={'namespace': namespace}) result = r.get_playbook_result() return K8sRepository.create_k8s_pods_view_model(result)
def batch_deliver_ssh(): r = Runner() r.run_playbook(playbooks=[ K8sObserver.fetch_playbook_path('batch_deliver_ssh.yaml') ], ) result = r.get_playbook_result() return result