diff options
author | George Kraft <george.kraft@calxeda.com> | 2012-08-20 13:45:32 -0500 |
---|---|---|
committer | George Kraft <george.kraft@calxeda.com> | 2012-08-20 13:45:32 -0500 |
commit | 05a1b9f6360d68a1e27e773948592de91842229c (patch) | |
tree | fd919262061d8d6863d060ed8642a3a973838a8b | |
parent | 4c1bba85b91670d9e45d400bdb4bc2b6da015e1e (diff) | |
download | cxmanage-05a1b9f6360d68a1e27e773948592de91842229c.tar.gz |
Replace some lingering instances of "slot" with "partition"
-rw-r--r-- | cxmanage/infodump.py | 4 | ||||
-rw-r--r-- | cxmanage_test/controller_test.py | 2 | ||||
-rw-r--r-- | cxmanage_test/target_test.py | 28 |
3 files changed, 17 insertions, 17 deletions
diff --git a/cxmanage/infodump.py b/cxmanage/infodump.py index e9cd5cb..4a3890a 100644 --- a/cxmanage/infodump.py +++ b/cxmanage/infodump.py @@ -196,8 +196,8 @@ def print_ubootenv(tftp, target): print '[ U-Boot Environment ]' try: fwinfo = target.get_firmware_info() - slot = target._get_slot(fwinfo, "UBOOTENV", "ACTIVE") - ubootenv = target._download_ubootenv(tftp, slot) + partition = target._get_partition(fwinfo, "UBOOTENV", "ACTIVE") + ubootenv = target._download_ubootenv(tftp, partition) for variable in sorted(ubootenv.variables): print '%s=%s' % (variable, ubootenv.variables[variable]) except Exception as e: diff --git a/cxmanage_test/controller_test.py b/cxmanage_test/controller_test.py index 7420100..2a9296b 100644 --- a/cxmanage_test/controller_test.py +++ b/cxmanage_test/controller_test.py @@ -302,7 +302,7 @@ class DummyTarget: def mc_reset(self): self.executed.append("mc_reset") - def update_firmware(self, tftp, images, slot_arg): + def update_firmware(self, tftp, images, partition_arg): self.executed.append(("update_firmware", images)) time.sleep(random.randint(0, 2)) diff --git a/cxmanage_test/target_test.py b/cxmanage_test/target_test.py index 30f32c6..760e624 100644 --- a/cxmanage_test/target_test.py +++ b/cxmanage_test/target_test.py @@ -308,28 +308,28 @@ class DummyBMC(LanBMC): return [x.fwinfo for x in self.partitions] - def update_firmware(self, filename, slot_id, image_type, tftp_address): - """ Download a file from a TFTP server to a given slot. + def update_firmware(self, filename, partition, image_type, tftp_addr): + """ Download a file from a TFTP server to a given partition. Make sure the image type matches. """ self.executed.append(("update_firmware", filename, - slot_id, image_type, tftp_address)) - self.partitions[slot_id].updates += 1 + partition, image_type, tftp_addr)) + self.partitions[partition].updates += 1 class Result: def __init__(self): self.tftp_handle_id = 0 return Result() - def retrieve_firmware(self, filename, slot_id, image_type, tftp_address): + def retrieve_firmware(self, filename, partition, image_type, tftp_addr): self.executed.append(("retrieve_firmware", filename, - slot_id, image_type, tftp_address)) - self.partitions[slot_id].retrieves += 1 + partition, image_type, tftp_addr)) + self.partitions[partition].retrieves += 1 # Upload blank image to tftp work_dir = tempfile.mkdtemp(prefix="cxmanage_test-") open("%s/%s" % (work_dir, filename), "w").write(create_simg("")) - address, port = tftp_address.split(":") + address, port = tftp_addr.split(":") port = int(port) tftp = ExternalTftp(address, port) tftp.put_file("%s/%s" % (work_dir, filename), filename) @@ -348,9 +348,9 @@ class DummyBMC(LanBMC): self.status = "Complete" return Result() - def check_firmware(self, slot_id): - self.executed.append(("check_firmware", slot_id)) - self.partitions[slot_id].checks += 1 + def check_firmware(self, partition): + self.executed.append(("check_firmware", partition)) + self.partitions[partition].checks += 1 class Result: def __init__(self): @@ -358,9 +358,9 @@ class DummyBMC(LanBMC): self.error = None return Result() - def activate_firmware(self, slot_id): - self.executed.append(("activate_firmware", slot_id)) - self.partitions[slot_id].activates += 1 + def activate_firmware(self, partition): + self.executed.append(("activate_firmware", partition)) + self.partitions[partition].activates += 1 def sdr_list(self): """ Get sensor info from the node. """ |