Class OeconsolZosConsoleManagerImpl

java.lang.Object
dev.galasa.framework.spi.AbstractManager
dev.galasa.zosconsole.oeconsol.manager.OeconsolZosConsoleManagerImpl
All Implemented Interfaces:
IManager, IZosConsoleSpi

public class OeconsolZosConsoleManagerImpl extends AbstractManager implements IZosConsoleSpi
zOS Console Manager implemented using zOS/MF
  • Field Details

  • Constructor Details

    • OeconsolZosConsoleManagerImpl

      public OeconsolZosConsoleManagerImpl()
  • Method Details

    • setZosManager

      public void setZosManager(IZosManagerSpi zosManager)
    • getZosManager

      public IZosManagerSpi getZosManager()
    • setZosUnixCommandManager

      public void setZosUnixCommandManager(IZosUNIXCommandSpi zosUnixCommandManager)
    • getZosUNIXCommand

      public IZosUNIXCommand getZosUNIXCommand(IZosImage image)
    • initialise

      public void initialise(@NotNull @NotNull IFramework framework, @NotNull @NotNull List<IManager> allManagers, @NotNull @NotNull List<IManager> activeManagers, @NotNull @NotNull GalasaTest galasaTest) throws ManagerException
      Description copied from interface: IManager

      Initialise the Manager, if required. The Manager should examine the testClass and see if this manager should participate in the Test Run lifecycle. If the Manager needs to take part, it should add itself to the activeManager. A Manager add itself only to the activeManagers.

      If a Manager is dependent on another Manager, it should look for implementers in allManager and call the youAreRequired method of the other Manager. If the required Manager has not yet been initialised, it should flag the youAreRequired call for when the Manager is initialised

      This will be the only time the testClass is passed to the Manager, so should be preserved

      Specified by:
      initialise in interface IManager
      Overrides:
      initialise in class AbstractManager
      Parameters:
      framework - A fully initialised Framework - preserve it for later use
      allManagers - All Managers found in OSGi
      activeManagers - The Manager should add itself to this list if it is to be activated. Do not add other managers.
      galasaTest - The Test class the framework will be running
      Throws:
      ManagerException - If there is a problem initialising the Manager
    • provisionGenerate

      public void provisionGenerate() throws ManagerException, ResourceUnavailableException
      Description copied from interface: IManager

      Provision resource names, resource pools, settings etc, ready for building.

      No building should occur during this process. Only resolution activities should occur so all managers indicate they have all the resources they require before attempting to build anything. If a manager is unable to acquire any resource, it should throw ResourceUnavailableException and the Test Run will be put into Waiting state for a later retry, if in Automation

      Specified by:
      provisionGenerate in interface IManager
      Overrides:
      provisionGenerate in class AbstractManager
      Throws:
      ManagerException - If anything goes wrong
      ResourceUnavailableException - IF resources are unavailable for this run
    • youAreRequired

      public void youAreRequired(@NotNull @NotNull List<IManager> allManagers, @NotNull @NotNull List<IManager> activeManagers, @NotNull @NotNull GalasaTest galasaTest) throws ManagerException
      Description copied from interface: IManager

      Called if another Manager requires this one. If this Manager has not been initialised yet, this call should be flagged until it the initialise method is called

      If the Manager has previously been intialised, but believed it wasn't required, then it should drive the initialise routines now.

      Specified by:
      youAreRequired in interface IManager
      Overrides:
      youAreRequired in class AbstractManager
      Parameters:
      allManagers - All Managers found in OSGi
      activeManagers - The Manager should add itself to this list if it is to be activated. Do not add other managers.
      galasaTest - The Test class the framework will be running
      Throws:
      ManagerException
    • areYouProvisionalDependentOn

      public boolean areYouProvisionalDependentOn(@NotNull @NotNull IManager otherManager)
      Description copied from interface: IManager
      Is this Manager dependent on the other Manager. Basically, return true if you require the other Manager at all during the provision* lifecycle methods.
      Specified by:
      areYouProvisionalDependentOn in interface IManager
      Overrides:
      areYouProvisionalDependentOn in class AbstractManager
      Parameters:
      otherManager - The other Manager
      Returns:
      true this Manager is provisionally dependent on the other Manager
    • generateZosConsole

      public IZosConsole generateZosConsole(Field field, List<Annotation> annotations) throws ZosManagerException
      Throws:
      ZosManagerException
    • getZosConsole

      @NotNull public @NotNull IZosConsole getZosConsole(IZosImage image) throws ZosConsoleManagerException
      Description copied from interface: IZosConsoleSpi
      Returns a zOS Console instance
      Specified by:
      getZosConsole in interface IZosConsoleSpi
      Parameters:
      image - zOS Image
      Returns:
      an IZosConsole implementation instance
      Throws:
      ZosConsoleManagerException
    • getCredentials

      public ICredentials getCredentials(String credentialsId, IZosImage image) throws ZosConsoleException
      Throws:
      ZosConsoleException