diff options
author | George Kraft <george.kraft@calxeda.com> | 2013-05-02 15:24:31 -0500 |
---|---|---|
committer | George Kraft <george.kraft@calxeda.com> | 2013-05-02 15:24:31 -0500 |
commit | 4c0c22eba553dc986a9fe834f019149fbfb9cb0d (patch) | |
tree | 09a3a87aa0571af007194bdf96ba4e043a64bfd6 | |
parent | a9464db8689fc76cd21809cc0bb7f1ecfb3ca007 (diff) | |
download | cxmanage-4c0c22eba553dc986a9fe834f019149fbfb9cb0d.tar.gz |
Node: Remove get_node_routing_table
Since it duplicates the functionality of get_fabric_routing_table
-rw-r--r-- | cxmanage_api/node.py | 67 |
1 files changed, 0 insertions, 67 deletions
diff --git a/cxmanage_api/node.py b/cxmanage_api/node.py index b25a37b..f22eed6 100644 --- a/cxmanage_api/node.py +++ b/cxmanage_api/node.py @@ -935,73 +935,6 @@ class Node(object): return results - def get_node_routing_table(self): - """Gets THIS node's routing table. - - >>> node.get_node_routing_table() - { - "Node 0: rt - 0.0.0.0.2", - "Node 1: rt - 0.0.0.0.2", - "Node 2: rt - 0.0.0.0.2", - "Node 3: rt - 0.0.0.0.2", - "Node 4: rt - 0.0.0.0.2", - "Node 5: rt - 0.0.0.0.2", - "Node 6: rt - 0.0.0.0.2", - "Node 7: rt - 0.0.0.0.2", - "Node 8: rt - 0.0.0.0.2", - "Node 9: rt - 0.0.0.0.2", - "Node 10: rt - 0.0.0.0.2", - "Node 11: rt - 0.0.0.0.2", - "Node 12: rt - 0.0.0.3.2", - "Node 13: rt - 0.0.0.2.0", - "Node 14: rt - 0.0.0.2.3", - } - - :return: list of routing table 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_routing_table(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_routing_table(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_link_map(self): """Gets THIS node's link map. |