From b195eb0668e068dfa5b8544ae00add30c9466598 Mon Sep 17 00:00:00 2001 From: "Joshua M. Boniface" Date: Thu, 4 Jul 2019 23:00:53 -0400 Subject: [PATCH] Rename Information get function to match others --- client-common/node.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/client-common/node.py b/client-common/node.py index a4b68f42..82e95ba4 100644 --- a/client-common/node.py +++ b/client-common/node.py @@ -39,7 +39,7 @@ import client_lib.zkhandler as zkhandler import client_lib.common as common import client_lib.vm as pvc_vm -def getInformationFromNode(zk_conn, node_name): +def getNodeInformation(zk_conn, node_name): """ Gather information about a node from the Zookeeper database and return a dict() containing it. """ @@ -84,7 +84,6 @@ def getInformationFromNode(zk_conn, node_name): 'free': node_mem_free } } - return node_information # @@ -226,7 +225,7 @@ def get_info(zk_conn, node): return False, 'ERROR: No node named "{}" is present in the cluster.'.format(node) # Get information about node in a pretty format - node_information = getInformationFromNode(zk_conn, node) + node_information = getNodeInformation(zk_conn, node) if not node_information: return False, 'ERROR: Could not get information about node "{}".'.format(node) @@ -246,11 +245,11 @@ def get_list(zk_conn, limit): limit = limit + '.*' if re.match(limit, node): - node_list.append(getInformationFromNode(zk_conn, node)) + node_list.append(getNodeInformation(zk_conn, node)) except Exception as e: return False, 'Regex Error: {}'.format(e) else: - node_list.append(getInformationFromNode(zk_conn, node)) + node_list.append(getNodeInformation(zk_conn, node)) return True, node_list