summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Kraft <george.kraft@calxeda.com>2013-05-02 15:46:47 -0500
committerGeorge Kraft <george.kraft@calxeda.com>2013-05-02 15:46:47 -0500
commitcf91b8c60633b9f30d1ba268a069628e56f9c527 (patch)
treed584e0d25a523d75f3879841eabb5f12da2ce9aa
parent4c0c22eba553dc986a9fe834f019149fbfb9cb0d (diff)
downloadcxmanage-cf91b8c60633b9f30d1ba268a069628e56f9c527.tar.gz
Node: Remove get_node_link_map
Duplicates the functionality of get_fabric_linkmap
-rw-r--r--cxmanage_api/node.py55
1 files changed, 0 insertions, 55 deletions
diff --git a/cxmanage_api/node.py b/cxmanage_api/node.py
index f22eed6..26fc35b 100644
--- a/cxmanage_api/node.py
+++ b/cxmanage_api/node.py
@@ -935,61 +935,6 @@ class Node(object):
return results
- def get_node_link_map(self):
- """Gets THIS node's link map.
-
- >>> node.get_node_link_map()
- {
- "Link 1: Node 6\n",
- "Link 3: Node 5\n",
- "Link 4: Node 7\n",
- }
-
- :return: list of link map entries
- :rtype: list of strings
-
- :raises IpmiError: If the IPMI command fails.
- :raises TftpException: If the TFTP transfer fails.
-
- """
- filename = temp_file()
- basename = os.path.basename(filename)
-
- try:
- result = self.bmc.fabric_info_get_link_map(basename)
- if hasattr(result, "error"):
- raise IpmiError(result.error)
- self.ecme_tftp.get_file(basename, filename)
- except (IpmiError, TftpException):
- # Fall back and use our tftp server
- try:
- result = self.bmc.fabric_config_get_link_map(basename, self.tftp_address)
- except IpmiError as e:
- raise IpmiError(self._parse_ipmierror(e))
- if hasattr(result, "error"):
- raise IpmiError(result.error)
-
- deadline = time.time() + 10
- while time.time() < deadline:
- try:
- time.sleep(1)
- self.tftp.get_file(src=basename, dest=filename)
- if (os.path.getsize(filename) > 0):
- break
- except (TftpException, IOError):
- pass
-
- # Parse addresses from ipinfo file
- results = []
- for line in open(filename):
- results.append (line)
-
- # Make sure we found something
- if (not results):
- raise TftpException("Node failed to reach TFTP server")
-
- return results
-
def get_node_depth_chart(self):
"""Gets THIS node's depth chart.