Class DummyCloudImage
- java.lang.Object
-
- jetbrains.buildServer.clouds.fakeCloud.DummyCloudImage
-
- All Implemented Interfaces:
CloudErrorProvider,CloudImage
public class DummyCloudImage extends Object implements CloudImage
-
-
Field Summary
Fields Modifier and Type Field Description IntegermyAgentPoolIdStringmyIdMap<String,DummyCloudInstance>myInstances
-
Constructor Summary
Constructors Constructor Description DummyCloudImage()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CloudInstancefindInstanceById(String id)Finds instance by instanceIdIntegergetAgentPoolId()Internal agent pool id associated with this cloud image.CloudErrorInfogetErrorInfo()Returns error information of there was an error.StringgetId()Returns the identifier of this image, in the vendor-specific form.Collection<? extends CloudInstance>getInstances()Returns all instances of the image.StringgetName()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface jetbrains.buildServer.clouds.CloudImage
getInstancesLimit, getPriority, getProfileId, getRunningInstancesCount
-
-
-
-
Field Detail
-
myId
public String myId
-
myInstances
public Map<String,DummyCloudInstance> myInstances
-
myAgentPoolId
public Integer myAgentPoolId
-
-
Method Detail
-
getId
@NotNull public String getId()
Description copied from interface:CloudImageReturns the identifier of this image, in the vendor-specific form.
Images with different ids are considered different images.
Must be unique within the profile.- Specified by:
getIdin interfaceCloudImage- Returns:
- image identifier.
-
getName
@NotNull public String getName()
- Specified by:
getNamein interfaceCloudImage- Returns:
- human readable image name
-
getInstances
@NotNull public Collection<? extends CloudInstance> getInstances()
Description copied from interface:CloudImageReturns all instances of the image. The method should either return an unmodifiable snapshot of the instances or a thread-safe collection.- Specified by:
getInstancesin interfaceCloudImage- Returns:
- instances
-
findInstanceById
@Nullable public CloudInstance findInstanceById(@NotNull String id)
Description copied from interface:CloudImageFinds instance by instanceId- Specified by:
findInstanceByIdin interfaceCloudImage- Parameters:
id- id- Returns:
- instance or null
-
getAgentPoolId
@Nullable public Integer getAgentPoolId()
Description copied from interface:CloudImageInternal agent pool id associated with this cloud image.
If this feature is not implemented, the function must return null.
Must useCloudImageData.getAgentPoolId()if returns non-null value.- Specified by:
getAgentPoolIdin interfaceCloudImage- Returns:
- internal pool id
-
getErrorInfo
@Nullable public CloudErrorInfo getErrorInfo()
Description copied from interface:CloudErrorProviderReturns error information of there was an error. If not null value is returned, object is treated as errorneous, and will not be used. Returned error description will be shown in the IU. Object may change the returned value to null to indicate correct state.- Specified by:
getErrorInfoin interfaceCloudErrorProvider- Returns:
- error info or null
-
-