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 Integer
myAgentPoolId
String
myId
Map<String,DummyCloudInstance>
myInstances
-
Constructor Summary
Constructors Constructor Description DummyCloudImage()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CloudInstance
findInstanceById(String id)
Finds instance by instanceIdInteger
getAgentPoolId()
Internal agent pool id associated with this cloud image.CloudErrorInfo
getErrorInfo()
Returns error information of there was an error.String
getId()
Returns the identifier of this image, in the vendor-specific form.Collection<? extends CloudInstance>
getInstances()
Returns all instances of the image.String
getName()
-
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:CloudImage
Returns 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:
getId
in interfaceCloudImage
- Returns:
- image identifier.
-
getName
@NotNull public String getName()
- Specified by:
getName
in interfaceCloudImage
- Returns:
- human readable image name
-
getInstances
@NotNull public Collection<? extends CloudInstance> getInstances()
Description copied from interface:CloudImage
Returns all instances of the image. The method should either return an unmodifiable snapshot of the instances or a thread-safe collection.- Specified by:
getInstances
in interfaceCloudImage
- Returns:
- instances
-
findInstanceById
@Nullable public CloudInstance findInstanceById(@NotNull String id)
Description copied from interface:CloudImage
Finds instance by instanceId- Specified by:
findInstanceById
in interfaceCloudImage
- Parameters:
id
- id- Returns:
- instance or null
-
getAgentPoolId
@Nullable public Integer getAgentPoolId()
Description copied from interface:CloudImage
Internal 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:
getAgentPoolId
in interfaceCloudImage
- Returns:
- internal pool id
-
getErrorInfo
@Nullable public CloudErrorInfo getErrorInfo()
Description copied from interface:CloudErrorProvider
Returns 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:
getErrorInfo
in interfaceCloudErrorProvider
- Returns:
- error info or null
-
-