Class LxcPushImageMock

java.lang.Object
net.ssehub.easy.instantiation.core.model.defaultInstantiators.AbstractFileInstantiator
net.ssehub.easy.producer.scenario_tests.mocks.LxcPushImageMock
All Implemented Interfaces:
net.ssehub.easy.instantiation.core.model.vilTypes.IVilType

public class LxcPushImageMock extends net.ssehub.easy.instantiation.core.model.defaultInstantiators.AbstractFileInstantiator
Mocks the instantiator to push a LXC image to a repository.
Author:
Luca Schulz
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private static boolean
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static boolean
    lxcPushImage(String imageName, String repository, String newImageName)
    Copies a image from local to trusted remote repository or the other way if imageName consists of remote:image-name.
    static boolean
    setResult(boolean res)
    Changes the mocked result for the following calls.

    Methods inherited from class net.ssehub.easy.instantiation.core.model.defaultInstantiators.AbstractFileInstantiator

    determineTargetPath, toString

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • result

      private static boolean result
  • Constructor Details

    • LxcPushImageMock

      public LxcPushImageMock()
  • Method Details

    • lxcPushImage

      public static boolean lxcPushImage(String imageName, String repository, String newImageName) throws net.ssehub.easy.instantiation.core.model.common.VilException
      Copies a image from local to trusted remote repository or the other way if imageName consists of remote:image-name.
      Parameters:
      imageName - name of the image to be copied, for local images the name is enough for remote images use this syntax: "repository:image-name"
      repository - (destination), the target trusted repository, "repository:"
      newImageName - the image a name for new repository otherwise if empty it will be nameless
      Returns:
      true if removed
      Throws:
      net.ssehub.easy.instantiation.core.model.common.VilException - in case of artifact / parameter problems
    • setResult

      public static boolean setResult(boolean res)
      Changes the mocked result for the following calls.
      Parameters:
      res - the result values
      Returns:
      the original value before calling this method