From 5edcd45ad645b088e99b42be2e8eb80249f17538 Mon Sep 17 00:00:00 2001 From: "Joshua M. Boniface" Date: Mon, 6 Jan 2020 11:43:32 -0500 Subject: [PATCH] Handle non-200 codes in the multi-template return --- client-api/api_lib/pvcapi_provisioner.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/client-api/api_lib/pvcapi_provisioner.py b/client-api/api_lib/pvcapi_provisioner.py index 994b23e4..ebe908e7 100755 --- a/client-api/api_lib/pvcapi_provisioner.py +++ b/client-api/api_lib/pvcapi_provisioner.py @@ -183,8 +183,14 @@ def list_template_storage_disks(name): def template_list(limit): system_templates, code = list_template_system(limit) + if code != 200: + system_templates = [] network_templates, code = list_template_network(limit) + if code != 200: + network_templates = [] storage_templates, code = list_template_storage(limit) + if code != 200: + storage_templates = [] return { "system_templates": system_templates, "network_templates": network_templates, "storage_templates": storage_templates }