
from oslo.utils import importutils

from ironic.common import exception
from ironic.common.i18n import _
from ironic.drivers import base
from ironic.drivers.modules.drac import management
from ironic.drivers.modules.drac import power
from ironic.drivers.modules import pxe


class PXEDracDriver(base.BaseDriver):
    """Drac driver using PXE for deploy."""

    def __init__(self):
        if not importutils.try_import('pywsman'):
            raise exception.DriverLoadError(
                    driver=self.__class__.__name__,
                    reason=_('Unable to import pywsman library'))

        self.power = power.DracPower()
        self.deploy = pxe.PXEDeploy()
        self.management = management.DracManagement()


from oslo.utils import importutils

from ironic.common import exception
from ironic.common.i18n import _
from ironic.drivers import base
from ironic.drivers.modules.drac import management
from ironic.drivers.modules.drac import power
from ironic.drivers.modules import pxe


class PXEDracDriver(base.BaseDriver):
    """Drac driver using PXE for deploy."""

    def __init__(self):
        if not importutils.try_import('pywsman'):
            raise exception.DriverLoadError(
                    driver=self.__class__.__name__,
                    reason=_('Unable to import pywsman library'))

        self.power = power.DracPower()
        self.deploy = pxe.PXEDeploy()
        self.management = management.DracManagement()
        self.vendor = pxe.VendorPassthru()

Add the PXE VendorPassthru interface to PXEDracDriver
Add the PXE VendorPassthru interface to PXEDracDriver

Without the PXE VendorPassthru interface to expose the "pass_deploy_info"
method in the vendor_passthru endpoint of the API the DRAC it can't
continue the deployment after the ramdisk is booted.

Closes-Bug: #1379705
Change-Id: I21042cbb95a486742abfcb430471d01cd73b3a4a

  
  from oslo.utils import importutils
  
  from ironic.common import exception
  from ironic.common.i18n import _
  from ironic.drivers import base
  from ironic.drivers.modules.drac import management
  from ironic.drivers.modules.drac import power
  from ironic.drivers.modules import pxe
  
  
  class PXEDracDriver(base.BaseDriver):
      """Drac driver using PXE for deploy."""
  
      def __init__(self):
          if not importutils.try_import('pywsman'):
              raise exception.DriverLoadError(
                      driver=self.__class__.__name__,
                      reason=_('Unable to import pywsman library'))
  
          self.power = power.DracPower()
          self.deploy = pxe.PXEDeploy()
          self.management = management.DracManagement()
+         self.vendor = pxe.VendorPassthru()
  
Add the PXE VendorPassthru interface to PXEDracDriver
## Code Before:

from oslo.utils import importutils

from ironic.common import exception
from ironic.common.i18n import _
from ironic.drivers import base
from ironic.drivers.modules.drac import management
from ironic.drivers.modules.drac import power
from ironic.drivers.modules import pxe


class PXEDracDriver(base.BaseDriver):
    """Drac driver using PXE for deploy."""

    def __init__(self):
        if not importutils.try_import('pywsman'):
            raise exception.DriverLoadError(
                    driver=self.__class__.__name__,
                    reason=_('Unable to import pywsman library'))

        self.power = power.DracPower()
        self.deploy = pxe.PXEDeploy()
        self.management = management.DracManagement()

## Instruction:
Add the PXE VendorPassthru interface to PXEDracDriver
## Code After:

from oslo.utils import importutils

from ironic.common import exception
from ironic.common.i18n import _
from ironic.drivers import base
from ironic.drivers.modules.drac import management
from ironic.drivers.modules.drac import power
from ironic.drivers.modules import pxe


class PXEDracDriver(base.BaseDriver):
    """Drac driver using PXE for deploy."""

    def __init__(self):
        if not importutils.try_import('pywsman'):
            raise exception.DriverLoadError(
                    driver=self.__class__.__name__,
                    reason=_('Unable to import pywsman library'))

        self.power = power.DracPower()
        self.deploy = pxe.PXEDeploy()
        self.management = management.DracManagement()
        self.vendor = pxe.VendorPassthru()
