org.jclouds.cloudstack.features
Interface GlobalHostClient


public interface GlobalHostClient

Provides synchronous access to CloudStack host features.

Author:
Andrei Savu
See Also:
GlobalOfferingAsyncClient,

Method Summary
 Cluster addCluster(long zoneId, String clusterName, Host.ClusterType clusterType, String hypervisor, AddClusterOptions... options)
          Adds a new cluster.
 Host addHost(long zoneId, String url, String hypervisor, String username, String password, AddHostOptions... options)
          Adds a new host.
 Host addSecondaryStorage(String url, AddSecondaryStorageOptions... options)
          Adds secondary storage.
 Long cancelHostMaintenance(long hostId)
          Cancels host maintenance.
 void deleteCluster(long clusterId)
          Deletes a cluster.
 void deleteHost(long hostId, DeleteHostOptions... options)
          Deletes a host.
 Set<Cluster> listClusters(ListClustersOptions... options)
          Lists clusters
 Set<Host> listHosts(ListHostsOptions... options)
          Lists hosts
 Long prepareHostForMaintenance(long hostId)
          Prepares a host for maintenance.
 Long reconnectHost(long hostId)
          Reconnects a host.
 Cluster updateCluster(long clusterId, UpdateClusterOptions... options)
          Updates an existing cluster.
 void updateClusterPassword(long clusterId, String username, String password)
          Update password of a cluster on management server.
 Host updateHost(long hostId, UpdateHostOptions... options)
          Updates a host.
 void updateHostPassword(long hostId, String username, String password)
          Update password of a host on management server.
 

Method Detail

listHosts

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

Host addHost(long zoneId,
             String url,
             String hypervisor,
             String username,
             String password,
             AddHostOptions... options)
Adds a new host.

Parameters:
zoneId - the Zone ID for the host
url - the host URL
hypervisor - hypervisor type of the host
username - the username for the host
password - the password for the host
options - optional arguments
Returns:
the new host.

updateHost

Host updateHost(long hostId,
                UpdateHostOptions... options)
Updates a host.

Parameters:
hostId - the ID of the host to update
options - optional arguments
Returns:
the modified host.

updateHostPassword

void updateHostPassword(long hostId,
                        String username,
                        String password)
Update password of a host on management server.

Parameters:
hostId - the host ID
username - the username for the host
password - the password for the host

deleteHost

void deleteHost(long hostId,
                DeleteHostOptions... options)
Deletes a host.

Parameters:
hostId - the host ID
options - optional arguments

prepareHostForMaintenance

Long prepareHostForMaintenance(long hostId)
Prepares a host for maintenance.

Parameters:
hostId - the host ID
Returns:
a job reference number for tracking this asynchronous job.

cancelHostMaintenance

Long cancelHostMaintenance(long hostId)
Cancels host maintenance.

Parameters:
hostId - the host ID
Returns:
a job reference number for tracking this asynchronous job.

reconnectHost

Long reconnectHost(long hostId)
Reconnects a host.

Parameters:
hostId -
Returns:
a job reference number for tracking this asynchronous job.

addSecondaryStorage

Host addSecondaryStorage(String url,
                         AddSecondaryStorageOptions... options)
Adds secondary storage.

Parameters:
url - the URL for the secondary storage
options - optional arguments
Returns:
the host of the storage.

listClusters

Set<Cluster> listClusters(ListClustersOptions... options)
Lists clusters

Parameters:
options - if present, how to constrain the list
Returns:
clusters matching query, or empty set if no clusters match

addCluster

Cluster addCluster(long zoneId,
                   String clusterName,
                   Host.ClusterType clusterType,
                   String hypervisor,
                   AddClusterOptions... options)
Adds a new cluster.

Parameters:
zoneId - the Zone ID for the cluster
clusterName - the cluster name
clusterType - type of the cluster
hypervisor - hypervisor type of the cluster
options - optional arguments
Returns:
the new cluster.

updateCluster

Cluster updateCluster(long clusterId,
                      UpdateClusterOptions... options)
Updates an existing cluster.

Parameters:
clusterId - the ID of the cluster
options - optional arguments
Returns:
the modified cluster

updateClusterPassword

void updateClusterPassword(long clusterId,
                           String username,
                           String password)
Update password of a cluster on management server.

Parameters:
hostId - the cluster ID
username - the username for the cluster
password - the password for the cluster

deleteCluster

void deleteCluster(long clusterId)
Deletes a cluster.

Parameters:
clusterId - the cluster ID


Copyright © 2009-2012 jclouds. All Rights Reserved.