Class LxcBuildImageMock

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

public class LxcBuildImageMock extends net.ssehub.easy.instantiation.core.model.defaultInstantiators.AbstractFileInstantiator
Mocks the instantiator to build LXC images.
Author:
Luca Schulz
  • Field Summary

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

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static String
    lxcBuildImage(net.ssehub.easy.instantiation.core.model.artifactModel.Path baseDirectory, net.ssehub.easy.instantiation.core.model.artifactModel.Path lxcTemplate, String imageName)
    Executes a specific LXC Template, builds an image and imports it to LXD.
    static String
    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 String result
  • Constructor Details

    • LxcBuildImageMock

      public LxcBuildImageMock()
  • Method Details

    • lxcBuildImage

      public static String lxcBuildImage(net.ssehub.easy.instantiation.core.model.artifactModel.Path baseDirectory, net.ssehub.easy.instantiation.core.model.artifactModel.Path lxcTemplate, String imageName) throws net.ssehub.easy.instantiation.core.model.common.VilException
      Executes a specific LXC Template, builds an image and imports it to LXD.
      Parameters:
      baseDirectory - the base directory for the build context(.tar.xz) will be stored
      lxcTemplate - the LXC template to create the image from
      imageName - name of the image
      Returns:
      the image fingerprint, may be null/undefined
      Throws:
      net.ssehub.easy.instantiation.core.model.common.VilException - in case of artifact / parameter problems
    • setResult

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