Fixing PEP8 issues

This commit is contained in:
Elia El Lazkani 2019-03-09 22:18:58 -05:00
parent ec2cb57d96
commit d687562608

View file

@ -77,7 +77,7 @@ def get_ingresses(api, namespace):
def json_dump(object_list):
return json.dumps(object_list)
def print_list(k8s_object_list):
_k8s_object_list = []
for k8s_object in k8s_object_list.items:
@ -105,22 +105,10 @@ def get_client(kubeconfig, context):
k8s_types = {
"deployments": {
"function": get_deployments,
"api": get_extensions
},
"services": {
"function": get_services,
"api": get_core_api_v1
},
"pods": {
"function": get_pods,
"api": get_core_api_v1
},
"ingresses": {
"function": get_ingresses,
"api": get_extensions
}
"deployments": {"function": get_deployments, "api": get_extensions},
"services": {"function": get_services, "api": get_core_api_v1},
"pods": {"function": get_pods, "api": get_core_api_v1},
"ingresses": {"function": get_ingresses, "api": get_extensions},
}
@ -130,7 +118,9 @@ def main():
api = None
if parser.type in k8s_types.keys():
api = k8s_types[parser.type]["api"](_client)
k8s_object_list = k8s_types[parser.type]["function"](api, parser.namespace)
k8s_object_list = k8s_types[parser.type]["function"](
api, parser.namespace
)
print_list(k8s_object_list)