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 -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanlxcPushImage(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 booleansetResult(boolean res) Changes the mocked result for the following calls.Methods inherited from class net.ssehub.easy.instantiation.core.model.defaultInstantiators.AbstractFileInstantiator
determineTargetPath, toString
-
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:
trueif 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
-