public class Control
extends java.lang.Object
Constructor and Description |
---|
Control(RestClient client) |
Modifier and Type | Method and Description |
---|---|
ClusterIpInfo |
getClusterIpinfo()
Gets current IP configuration information of the cluster
|
ClusterNetworkReconfigStatus |
getClusterIpReconfigStatus()
Gets IP reconfiguration status of the cluster
|
DbRepairStatus |
getdbhealth()
Gets DB health status of cluster
API call: GET /cluster/dbrepair-status
|
RecoveryStatus |
getRecoveryStatus()
Gets status of recoverMinotiryNode.
|
void |
powerOffCluster()
Powers off all nodes in a ViPR cluster.
|
void |
powerOffCluster(boolean force)
Powers off all nodes in a ViPR cluster.
|
void |
rebootNode(java.lang.String nodeId)
Deprecated.
Replaced by
|
void |
rebootNodeByNodeId(java.lang.String nodeId)
Reboot a virtual machine by node id.
|
void |
rebootNodeByNodeName(java.lang.String nodeName)
Reboot a virtual machine by node name.
|
boolean |
reconfigClusterIps(ClusterIpInfo clusterIpInfo,
boolean powerOff)
Triggers IP reconfiguration with provided IPs.
|
void |
recoverMinorityNode()
Start the minority node recovery process
|
void |
restartService(java.lang.String nodeId,
java.lang.String name)
Deprecated.
Replaced by
|
void |
restartServiceByNodeId(java.lang.String nodeId,
java.lang.String name)
Restart a service on a virtual machine by node id.
|
void |
restartServiceByNodeName(java.lang.String nodeName,
java.lang.String name)
Restart a service on a virtual machine by node name.
|
public Control(RestClient client)
@Deprecated public void restartService(java.lang.String nodeId, java.lang.String name)
API Call: POST /control/service/restart
nodeId
- Virtual machine idname
- Service namerestartServiceByNodeId(String, String)
public void restartServiceByNodeId(java.lang.String nodeId, java.lang.String name)
API Call: POST /control/service/restart
nodeId
- Virtual machine idname
- Service namepublic void restartServiceByNodeName(java.lang.String nodeName, java.lang.String name)
API Call: POST /control/service/restart
nodeName
- Virtual machine namename
- Service name@Deprecated public void rebootNode(java.lang.String nodeId)
API Call: POST /control/node/reboot
nodeId
- Virtual machine idrebootNodeByNodeId(String)
public void rebootNodeByNodeId(java.lang.String nodeId)
API Call: POST /control/node/reboot
nodeId
- Virtual machine idpublic void rebootNodeByNodeName(java.lang.String nodeName)
API Call: POST /control/node/reboot
nodeName
- Virtual machine namepublic void powerOffCluster()
API Call: POST /control/cluster/poweroff
public void powerOffCluster(boolean force)
API Call: POST /control/cluster/poweroff
force
- Set to true to force poweroffpublic void recoverMinorityNode()
API Call: POST /cluster/recovery
public RecoveryStatus getRecoveryStatus()
Cluster recovery status: Current status of the cluster recovery process INIT - triggering recover PREPARING - preparing recovery REPAIRING - repairing db inconsistency.
SYNCING - new node is syncing data FAILED - recovery failed DONE - recovery successful
API Call: GET /cluster/recovery
public ClusterIpInfo getClusterIpinfo()
API Call: GET /cluster/ipinfo
public boolean reconfigClusterIps(ClusterIpInfo clusterIpInfo, boolean powerOff)
API Call: POST /cluster/ipreconfig
clusterIpInfo
- powerOff
- public ClusterNetworkReconfigStatus getClusterIpReconfigStatus()
API Call: GET /cluster/ipreconfig_status
public DbRepairStatus getdbhealth()