INNER CODE UNIT · Python
command_execute
vchinnipilli/kubestriker · kubestriker/__main__.py:158
def command_execute(pods_data, end_point, token):
"""
This function is used to form the command excution url and call the another function to execute
:param pods_data:
:param end_point:
:param token:
:return:
"""
pod_name_list = []
pod_containers_data = {}
pod_namespace_data = {}
for pods_key, pods_value in pods_data.items():
for pod_data in pods_value['items']:
pod_name = pod_data.get('metadata').get('name')
namespace = pod_data.get('metadata').get('namespace')
pod_namespace_data.update({pod_name: namespace})
spec_data = pod_data.get('spec')
if not spec_data: