summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Kraft <george.kraft@calxeda.com>2013-06-24 10:25:56 -0500
committerGeorge Kraft <george.kraft@calxeda.com>2013-06-24 10:25:56 -0500
commit056b2d2f0166ea405dd3047f0aeb604f0c132736 (patch)
tree86b7d998ea0ef12632f3f1c6417b55cd084baf83
parent79db60f312fab7203d5e5b1c3f4fca4c3718744c (diff)
downloadcxmanage-056b2d2f0166ea405dd3047f0aeb604f0c132736.tar.gz
CXMAN-206: Remove unnecessary checks around bmc firmware calls
We're getting proper IPMI errors now.
-rw-r--r--cxmanage_api/node.py12
1 files changed, 0 insertions, 12 deletions
diff --git a/cxmanage_api/node.py b/cxmanage_api/node.py
index 58f0a8a..32f0a07 100644
--- a/cxmanage_api/node.py
+++ b/cxmanage_api/node.py
@@ -674,13 +674,10 @@ class Node(object):
>>> node.config_reset()
:raises IpmiError: If errors in the command occur with BMC communication.
- :raises Exception: If there are errors within the command response.
"""
# Reset CDB
result = self.bmc.reset_firmware()
- if (hasattr(result, "error")):
- raise Exception(result.error)
# Reset ubootenv
fwinfo = self.get_firmware_info()
@@ -1292,8 +1289,6 @@ class Node(object):
self.tftp.put_file(filename, basename)
result = self.bmc.update_firmware(basename, partition_id,
image.type, self.tftp_address)
- if (not hasattr(result, "tftp_handle_id")):
- raise AttributeError("Failed to start firmware upload")
self._wait_for_transfer(result.tftp_handle_id)
# Verify crc and activate
@@ -1318,8 +1313,6 @@ class Node(object):
# Fall back and use TFTP server
result = self.bmc.retrieve_firmware(basename, partition_id,
image_type, self.tftp_address)
- if (not hasattr(result, "tftp_handle_id")):
- raise AttributeError("Failed to start firmware download")
self._wait_for_transfer(result.tftp_handle_id)
self.tftp.get_file(basename, filename)
@@ -1331,17 +1324,12 @@ class Node(object):
"""Wait for a firmware transfer to finish."""
deadline = time.time() + 180
result = self.bmc.get_firmware_status(handle)
- if (not hasattr(result, "status")):
- raise AttributeError('Failed to retrieve firmware transfer status')
while (result.status == "In progress"):
if (time.time() >= deadline):
raise TimeoutError("Transfer timed out after 3 minutes")
time.sleep(1)
result = self.bmc.get_firmware_status(handle)
- if (not hasattr(result, "status")):
- raise AttributeError(
- "Failed to retrieve firmware transfer status")
if (result.status != "Complete"):
raise TransferFailure("Node reported TFTP transfer failure")