From 20da6491ca2ff0f1de1dfeec6afca81e90aad8a9 Mon Sep 17 00:00:00 2001 From: Devananda van der Veen Date: Tue, 18 Mar 2014 12:00:47 -0700 Subject: [PATCH] Stop incorrectly returning rescue: supported Rescue interface is not supported by ironic.drivers.modules.pxe, but all the drivers which use the PXEDeploy interface were incorrectly mapping it to their rescue interface as well, leading to the appearance that these drivers supported rescue functionality. This patch corrects this by removing the incorrect driver interface mapping, and deleting the unused stub class PXERescue. Change-Id: Icaa5928f18d72fcb2d26baac2a18606e8c4366c6 Closes-bug: #1294288 --- ironic/drivers/fake.py | 2 -- ironic/drivers/modules/pxe.py | 12 ------------ ironic/drivers/pxe.py | 4 ---- 3 files changed, 18 deletions(-) diff --git a/ironic/drivers/fake.py b/ironic/drivers/fake.py index 5ad8377cd3..3d0d690812 100644 --- a/ironic/drivers/fake.py +++ b/ironic/drivers/fake.py @@ -59,7 +59,6 @@ class FakePXEDriver(base.BaseDriver): def __init__(self): self.power = fake.FakePower() self.deploy = pxe.PXEDeploy() - self.rescue = self.deploy self.vendor = pxe.VendorPassthru() @@ -88,7 +87,6 @@ class FakeSeaMicroDriver(base.BaseDriver): raise exception.DriverNotFound('FakeSeaMicroDriver') self.power = seamicro.Power() self.deploy = fake.FakeDeploy() - self.rescue = self.deploy self.seamicro_vendor = seamicro.VendorPassthru() self.pxe_vendor = pxe.VendorPassthru() self.vendor = seamicro.SeaMicroPXEMultipleVendorInterface( diff --git a/ironic/drivers/modules/pxe.py b/ironic/drivers/modules/pxe.py index 8cf9fd42ef..8a557e3d78 100644 --- a/ironic/drivers/modules/pxe.py +++ b/ironic/drivers/modules/pxe.py @@ -653,18 +653,6 @@ class PXEDeploy(base.DeployInterface): _update_neutron(task, node) -class PXERescue(base.RescueInterface): - - def validate(self, task, node): - pass - - def rescue(self, task, node): - pass - - def unrescue(self, task, node): - pass - - class VendorPassthru(base.VendorInterface): """Interface to mix IPMI and PXE vendor-specific interfaces.""" diff --git a/ironic/drivers/pxe.py b/ironic/drivers/pxe.py index 6c5d279d50..c5560bc1d4 100644 --- a/ironic/drivers/pxe.py +++ b/ironic/drivers/pxe.py @@ -40,7 +40,6 @@ class PXEAndIPMIToolDriver(base.BaseDriver): def __init__(self): self.power = ipmitool.IPMIPower() self.deploy = pxe.PXEDeploy() - self.rescue = self.deploy self.pxe_vendor = pxe.VendorPassthru() self.ipmi_vendor = ipmitool.VendorPassthru() self.mapping = {'pass_deploy_info': self.pxe_vendor, @@ -63,7 +62,6 @@ class PXEAndSSHDriver(base.BaseDriver): def __init__(self): self.power = ssh.SSHPower() self.deploy = pxe.PXEDeploy() - self.rescue = self.deploy self.vendor = pxe.VendorPassthru() @@ -81,7 +79,6 @@ class PXEAndIPMINativeDriver(base.BaseDriver): def __init__(self): self.power = ipminative.NativeIPMIPower() self.deploy = pxe.PXEDeploy() - self.rescue = self.deploy self.pxe_vendor = pxe.VendorPassthru() self.ipmi_vendor = ipminative.VendorPassthru() self.mapping = {'pass_deploy_info': self.pxe_vendor, @@ -105,7 +102,6 @@ class PXEAndSeaMicroDriver(base.BaseDriver): raise exception.DriverNotFound('PXEAndSeaMicroDriver') self.power = seamicro.Power() self.deploy = pxe.PXEDeploy() - self.rescue = self.deploy self.seamicro_vendor = seamicro.VendorPassthru() self.pxe_vendor = pxe.VendorPassthru() self.vendor = seamicro.SeaMicroPXEMultipleVendorInterface(