public class ClusterClient
extends java.lang.Object
Constructor and Description |
---|
ClusterClient(@NotNull retrofit2.Retrofit retrofit)
Constructor.
|
ClusterClient(@NotEmpty java.lang.String url,
java.util.List<okhttp3.Interceptor> interceptors,
GenieNetworkConfiguration genieNetworkConfiguration)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
void |
addCommandsToCluster(java.lang.String clusterId,
java.util.List<java.lang.String> commandIds)
Method to add commands to a cluster.
|
void |
addConfigsToCluster(java.lang.String clusterId,
java.util.Set<java.lang.String> configs)
Method to add configs to a cluster.
|
void |
addDependenciesToCluster(java.lang.String clusterId,
java.util.Set<java.lang.String> dependencies)
Method to add dependencies to a cluster.
|
void |
addTagsToCluster(java.lang.String clusterId,
java.util.Set<java.lang.String> tags)
Method to add tags to a cluster.
|
java.lang.String |
createCluster(Cluster cluster)
Create a cluster ing genie.
|
void |
deleteAllClusters()
Method to delete all clusters from Genie.
|
void |
deleteCluster(java.lang.String clusterId)
Method to delete a cluster from Genie.
|
Cluster |
getCluster(java.lang.String clusterId)
Method to get a Cluster from Genie.
|
java.util.List<Cluster> |
getClusters()
Method to get a list of all the clusters.
|
java.util.List<Cluster> |
getClusters(java.lang.String name,
java.util.List<java.lang.String> statusList,
java.util.List<java.lang.String> tagList,
java.lang.Long minUpdateTime,
java.lang.Long maxUpdateTime)
Method to get a list of all the clusters from Genie for the query parameters specified.
|
java.util.List<Command> |
getCommandsForCluster(java.lang.String clusterId)
Method to get all the commands for a cluster.
|
java.util.Set<java.lang.String> |
getConfigsForCluster(java.lang.String clusterId)
Method to get all the configs for a cluster.
|
java.util.Set<java.lang.String> |
getDependenciesForCluster(java.lang.String clusterId)
Method to get all the dependency files for an cluster.
|
java.util.Set<java.lang.String> |
getTagsForCluster(java.lang.String clusterId)
Method to get all the tags for a cluster.
|
void |
patchCluster(java.lang.String clusterId,
com.github.fge.jsonpatch.JsonPatch patch)
Method to patch a cluster using json patch instructions.
|
void |
removeAllCommandsForCluster(java.lang.String clusterId)
Remove all commands for this cluster.
|
void |
removeAllConfigsForCluster(java.lang.String clusterId)
Remove all configs for this cluster.
|
void |
removeAllDependenciesForCluster(java.lang.String clusterId)
Remove all dependencies for this cluster.
|
void |
removeAllTagsForCluster(java.lang.String clusterId)
Remove all tags for this cluster.
|
void |
removeCommandFromCluster(java.lang.String clusterId,
java.lang.String commandId)
Remove a command from a cluster.
|
void |
removeTagFromCluster(java.lang.String clusterId,
java.lang.String tag)
Remove a tag from a cluster.
|
void |
updateCluster(java.lang.String clusterId,
Cluster cluster)
Method to updated a cluster.
|
void |
updateCommandsForCluster(java.lang.String clusterId,
java.util.List<java.lang.String> commandIds)
Method to update commands for a cluster.
|
void |
updateConfigsForCluster(java.lang.String clusterId,
java.util.Set<java.lang.String> configs)
Method to update configs for a cluster.
|
void |
updateDependenciesForCluster(java.lang.String clusterId,
java.util.Set<java.lang.String> dependencies)
Method to update dependencies for a cluster.
|
void |
updateTagsForCluster(java.lang.String clusterId,
java.util.Set<java.lang.String> tags)
Method to update tags for a cluster.
|
public ClusterClient(@NotNull @NotNull retrofit2.Retrofit retrofit)
retrofit
- The configured Retrofit
client to a Genie server@Deprecated public ClusterClient(@NotEmpty @NotEmpty java.lang.String url, @Nullable java.util.List<okhttp3.Interceptor> interceptors, @Nullable GenieNetworkConfiguration genieNetworkConfiguration) throws GenieClientException
ClusterClient(Retrofit)
url
- The endpoint URL of the Genie API. Not null or emptyinterceptors
- Any interceptors to configure the client with, can include security onesgenieNetworkConfiguration
- The network configuration parameters. Could be nullGenieClientException
- On errorpublic java.lang.String createCluster(Cluster cluster) throws java.io.IOException, GenieClientException
cluster
- A cluster object.GenieClientException
- If the response received is not 2xx.java.io.IOException
- For Network and other IO issues.public java.util.List<Cluster> getClusters() throws java.io.IOException, GenieClientException
GenieClientException
- If the response received is not 2xx.java.io.IOException
- For Network and other IO issues.public java.util.List<Cluster> getClusters(java.lang.String name, java.util.List<java.lang.String> statusList, java.util.List<java.lang.String> tagList, java.lang.Long minUpdateTime, java.lang.Long maxUpdateTime) throws java.io.IOException, GenieClientException
name
- The name of the cluster.statusList
- The list of statuses.tagList
- The list of tags.minUpdateTime
- Minimum Time after which cluster was updated.maxUpdateTime
- Maximum Time before which cluster was updated.GenieClientException
- If the response received is not 2xx.java.io.IOException
- For Network and other IO issues.public Cluster getCluster(java.lang.String clusterId) throws java.io.IOException, GenieClientException
clusterId
- The id of the cluster to get.GenieClientException
- If the response received is not 2xx.java.io.IOException
- For Network and other IO issues.public void deleteCluster(java.lang.String clusterId) throws java.io.IOException, GenieClientException
clusterId
- The id of the cluster.GenieClientException
- If the response received is not 2xx.java.io.IOException
- For Network and other IO issues.public void deleteAllClusters() throws java.io.IOException, GenieClientException
GenieClientException
- If the response received is not 2xx.java.io.IOException
- For Network and other IO issues.public void patchCluster(java.lang.String clusterId, com.github.fge.jsonpatch.JsonPatch patch) throws java.io.IOException, GenieClientException
clusterId
- The id of the cluster.patch
- The patch object specifying all the instructions.GenieClientException
- If the response received is not 2xx.java.io.IOException
- For Network and other IO issues.public void updateCluster(java.lang.String clusterId, Cluster cluster) throws java.io.IOException, GenieClientException
clusterId
- The id of the cluster.cluster
- The updated cluster object to use.GenieClientException
- If the response received is not 2xx.java.io.IOException
- For Network and other IO issues.public java.util.Set<java.lang.String> getConfigsForCluster(java.lang.String clusterId) throws java.io.IOException, GenieClientException
clusterId
- The id of the cluster.GenieClientException
- If the response received is not 2xx.java.io.IOException
- For Network and other IO issues.public void addConfigsToCluster(java.lang.String clusterId, java.util.Set<java.lang.String> configs) throws java.io.IOException, GenieClientException
clusterId
- The id of the cluster.configs
- The set of configs to add.GenieClientException
- If the response received is not 2xx.java.io.IOException
- For Network and other IO issues.public void updateConfigsForCluster(java.lang.String clusterId, java.util.Set<java.lang.String> configs) throws java.io.IOException, GenieClientException
clusterId
- The id of the cluster.configs
- The set of configs to add.GenieClientException
- If the response received is not 2xx.java.io.IOException
- For Network and other IO issues.public void removeAllConfigsForCluster(java.lang.String clusterId) throws java.io.IOException, GenieClientException
clusterId
- The id of the cluster.GenieClientException
- If the response received is not 2xx.java.io.IOException
- For Network and other IO issues.public java.util.Set<java.lang.String> getDependenciesForCluster(java.lang.String clusterId) throws java.io.IOException, GenieClientException
clusterId
- The id of the cluster.GenieClientException
- If the response received is not 2xx.java.io.IOException
- For Network and other IO issuespublic void addDependenciesToCluster(java.lang.String clusterId, java.util.Set<java.lang.String> dependencies) throws java.io.IOException, GenieClientException
clusterId
- The id of the cluster.dependencies
- The set of dependencies to add.GenieClientException
- If the response received is not 2xx.java.io.IOException
- For Network and other IO issuespublic void updateDependenciesForCluster(java.lang.String clusterId, java.util.Set<java.lang.String> dependencies) throws java.io.IOException, GenieClientException
clusterId
- The id of the cluster.dependencies
- The set of dependencies to add.GenieClientException
- If the response received is not 2xx.java.io.IOException
- For Network and other IO issuespublic void removeAllDependenciesForCluster(java.lang.String clusterId) throws java.io.IOException, GenieClientException
clusterId
- The id of the cluster.GenieClientException
- If the response received is not 2xx.java.io.IOException
- For Network and other IO issuespublic java.util.List<Command> getCommandsForCluster(java.lang.String clusterId) throws java.io.IOException, GenieClientException
clusterId
- The id of the cluster.GenieClientException
- If the response received is not 2xx.java.io.IOException
- For Network and other IO issues.public void addCommandsToCluster(java.lang.String clusterId, java.util.List<java.lang.String> commandIds) throws java.io.IOException, GenieClientException
clusterId
- The id of the cluster.commandIds
- The list of commands to add.GenieClientException
- If the response received is not 2xx.java.io.IOException
- For Network and other IO issues.public void updateCommandsForCluster(java.lang.String clusterId, java.util.List<java.lang.String> commandIds) throws java.io.IOException, GenieClientException
clusterId
- The id of the cluster.commandIds
- The set of commands to add.GenieClientException
- If the response received is not 2xx.java.io.IOException
- For Network and other IO issues.public void removeCommandFromCluster(java.lang.String clusterId, java.lang.String commandId) throws java.io.IOException, GenieClientException
clusterId
- The id of the cluster.commandId
- The id of the command to remove.GenieClientException
- If the response received is not 2xx.java.io.IOException
- For Network and other IO issues.public void removeAllCommandsForCluster(java.lang.String clusterId) throws java.io.IOException, GenieClientException
clusterId
- The id of the cluster.GenieClientException
- If the response received is not 2xx.java.io.IOException
- For Network and other IO issues.public java.util.Set<java.lang.String> getTagsForCluster(java.lang.String clusterId) throws java.io.IOException, GenieClientException
clusterId
- The id of the cluster.GenieClientException
- If the response received is not 2xx.java.io.IOException
- For Network and other IO issues.public void addTagsToCluster(java.lang.String clusterId, java.util.Set<java.lang.String> tags) throws java.io.IOException, GenieClientException
clusterId
- The id of the cluster.tags
- The set of tags to add.GenieClientException
- If the response received is not 2xx.java.io.IOException
- For Network and other IO issues.public void updateTagsForCluster(java.lang.String clusterId, java.util.Set<java.lang.String> tags) throws java.io.IOException, GenieClientException
clusterId
- The id of the cluster.tags
- The set of tags to add.GenieClientException
- If the response received is not 2xx.java.io.IOException
- For Network and other IO issues.public void removeTagFromCluster(java.lang.String clusterId, java.lang.String tag) throws java.io.IOException, GenieClientException
clusterId
- The id of the cluster.tag
- The tag to remove.GenieClientException
- If the response received is not 2xx.java.io.IOException
- For Network and other IO issues.public void removeAllTagsForCluster(java.lang.String clusterId) throws java.io.IOException, GenieClientException
clusterId
- The id of the cluster.GenieClientException
- If the response received is not 2xx.java.io.IOException
- For Network and other IO issues.