Package org.jclouds.cloudstack.features
Interface GlobalHostApi
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Cluster
addCluster(String zoneId, String clusterName, Host.ClusterType clusterType, String hypervisor, AddClusterOptions... options)
Adds a new cluster.Host
addHost(String zoneId, String url, String hypervisor, String username, String password, AddHostOptions... options)
Adds a new host.Host
addSecondaryStorage(String url, AddSecondaryStorageOptions... options)
Adds secondary storage.String
cancelHostMaintenance(String hostId)
Cancels host maintenance.void
deleteCluster(String clusterId)
Deletes a cluster.void
deleteHost(String hostId, DeleteHostOptions... options)
Deletes a host.Set<Cluster>
listClusters(ListClustersOptions... options)
Set<Host>
listHosts(ListHostsOptions... options)
Lists hostsString
prepareHostForMaintenance(String hostId)
Prepares a host for maintenance.String
reconnectHost(String hostId)
Reconnects a host.Cluster
updateCluster(String clusterId, UpdateClusterOptions... options)
Updates an existing cluster.void
updateClusterPassword(String clusterId, String username, String password)
Update password of a cluster on management server.Host
updateHost(String hostId, UpdateHostOptions... options)
Updates a host.void
updateHostPassword(String hostId, String username, String password)
Update password of a host on management server.
-
-
-
Method Detail
-
listHosts
@Named("listHosts") @GET @Consumes("application/json") Set<Host> listHosts(ListHostsOptions... options)
Lists hosts- Parameters:
options
- if present, how to constrain the list.- Returns:
- hosts matching query, or empty set, if no service offerings are found
-
addHost
@Named("addHost") @GET @Consumes("application/json") Host addHost(@QueryParam("zoneid") String zoneId, @QueryParam("url") String url, @QueryParam("hypervisor") String hypervisor, @QueryParam("username") String username, @QueryParam("password") String password, AddHostOptions... options)
Adds a new host.- Parameters:
zoneId
- the Zone ID for the hosturl
- the host URLhypervisor
- hypervisor type of the hostusername
- the username for the hostpassword
- the password for the hostoptions
- optional arguments- Returns:
- the new host.
-
updateHost
@Named("updateHost") @GET @Consumes("application/json") Host updateHost(@QueryParam("id") String hostId, UpdateHostOptions... options)
Updates a host.- Parameters:
hostId
- the ID of the host to updateoptions
- optional arguments- Returns:
- the modified host.
-
updateHostPassword
@Named("updateHostPassword") @GET @Consumes("application/json") void updateHostPassword(@QueryParam("hostid") String hostId, @QueryParam("username") String username, @QueryParam("password") String password)
Update password of a host on management server.- Parameters:
hostId
- the host IDusername
- the username for the hostpassword
- the password for the host
-
deleteHost
@Named("deleteHost") @GET @Consumes("application/json") void deleteHost(@QueryParam("id") String hostId, DeleteHostOptions... options)
Deletes a host.- Parameters:
hostId
- the host IDoptions
- optional arguments
-
prepareHostForMaintenance
@Named("prepareHostForMaintenance") @GET @Consumes("application/json") String prepareHostForMaintenance(@QueryParam("id") String hostId)
Prepares a host for maintenance.- Parameters:
hostId
- the host ID- Returns:
- a job reference number for tracking this asynchronous job.
-
cancelHostMaintenance
@Named("cancelHostMaintenance") @GET @Consumes("application/json") String cancelHostMaintenance(@QueryParam("id") String hostId)
Cancels host maintenance.- Parameters:
hostId
- the host ID- Returns:
- a job reference number for tracking this asynchronous job.
-
reconnectHost
@Named("reconnectHost") @GET @Consumes("application/json") String reconnectHost(@QueryParam("id") String hostId)
Reconnects a host.- Parameters:
hostId
-- Returns:
- a job reference number for tracking this asynchronous job.
-
addSecondaryStorage
@Named("addSecondaryStorage") @GET @Consumes("application/json") Host addSecondaryStorage(@QueryParam("url") String url, AddSecondaryStorageOptions... options)
Adds secondary storage.- Parameters:
url
- the URL for the secondary storageoptions
- optional arguments- Returns:
- the host of the storage.
-
listClusters
@Named("listClusters") @GET @Consumes("application/json") Set<Cluster> listClusters(ListClustersOptions... options)
-
addCluster
@Named("addCluster") @GET @Consumes("application/json") Cluster addCluster(@QueryParam("zoneid") String zoneId, @QueryParam("clustername") String clusterName, @QueryParam("clustertype") Host.ClusterType clusterType, @QueryParam("hypervisor") String hypervisor, AddClusterOptions... options)
Adds a new cluster.- Parameters:
zoneId
- the Zone ID for the clusterclusterName
- the cluster nameclusterType
- type of the clusterhypervisor
- hypervisor type of the clusteroptions
- optional arguments- Returns:
- the new cluster.
-
updateCluster
@Named("updateCluster") @GET @Consumes("application/json") Cluster updateCluster(@QueryParam("id") String clusterId, UpdateClusterOptions... options)
Updates an existing cluster.- Parameters:
clusterId
- the ID of the clusteroptions
- optional arguments- Returns:
- the modified cluster
-
updateClusterPassword
@Named("updateHostPassword") @GET @Consumes("application/json") void updateClusterPassword(@QueryParam("clusterid") String clusterId, @QueryParam("username") String username, @QueryParam("password") String password)
Update password of a cluster on management server.- Parameters:
clusterId
- the cluster IDusername
- the username for the clusterpassword
- the password for the cluster
-
deleteCluster
@Named("deleteCluster") @GET @Consumes("application/json") void deleteCluster(@QueryParam("id") String clusterId)
Deletes a cluster.- Parameters:
clusterId
- the cluster ID
-
-