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 -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringlxcBuildImage(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 StringChanges the mocked result for the following calls.Methods inherited from class net.ssehub.easy.instantiation.core.model.defaultInstantiators.AbstractFileInstantiator
determineTargetPath, toString
-
Field Details
-
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 storedlxcTemplate- the LXC template to create the image fromimageName- 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
Changes the mocked result for the following calls.- Parameters:
res- the result values- Returns:
- the original value before calling this method
-