public class Upgrade
extends java.lang.Object
Constructor and Description |
---|
Upgrade(RestClient client) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
cancelDbCheck() |
ClusterInfo |
cancelInstallImage()
Cancels download of an image
|
ClusterInfo |
getClusterInfo()
Shows the cluster information for the local site, excluding all removable versions.
|
ClusterInfo |
getClusterInfo(boolean showAllVersions)
Shows the cluster information with all removable versions.
|
ClusterInfo |
getClusterInfo(java.lang.String siteId)
Shows the cluster information for a specific site, excluding all removable versions.
|
ClusterInfo |
getClusterInfo(java.lang.String siteId,
boolean showAllVersions)
Shows the cluster information of a specific site with all removable versions.
|
java.lang.String |
getClusterState()
Convenience method that gets the cluster state from the cluster info.
|
DbConsistencyStatusRestRep |
getDbCheckState() |
DownloadProgress |
getDownloadProgress()
Provides progress information when an image download is in progress for the local site
|
DownloadProgress |
getDownloadProgress(java.lang.String siteId)
Provides progress information when an image download is in progress for a specific site
|
TargetVersionResponse |
getTargetVersion()
Show the current target version.
|
ClusterInfo |
installImage(java.lang.String version,
boolean force)
Installs an image.
|
ClusterInfo |
removeImage(java.lang.String version)
Remove an image.
|
ClusterInfo |
removeImage(java.lang.String version,
boolean force)
Remove an image.
|
ClusterInfo |
setTargetVersion(java.lang.String version)
Update target version.
|
ClusterInfo |
setTargetVersion(java.lang.String version,
boolean doPrecheck)
Update target version.
|
java.lang.String |
triggerDbCheck() |
public Upgrade(RestClient client)
public ClusterInfo installImage(java.lang.String version, boolean force)
API Call: POST /upgrade/image/install
version
- The version to be installedforce
- If true, image will be installed even if the maximum number
of versions installed are more than MAX_SOFTWARE_VERSIONSpublic ClusterInfo cancelInstallImage()
API Call: POST /upgrade/install/cancel
public DownloadProgress getDownloadProgress()
API Call: POST /upgrade/image/download/progress
public DownloadProgress getDownloadProgress(java.lang.String siteId)
API Call: POST /upgrade/image/download/progress?site=siteId
public ClusterInfo removeImage(java.lang.String version, boolean force)
API Call: POST /upgrade/image/remove
version
- Version to be removedforce
- If true, image will be removed even if the maximum number of versions
installed are less than MAX_SOFTWARE_VERSIONSpublic ClusterInfo removeImage(java.lang.String version)
version
- Version to be removedpublic TargetVersionResponse getTargetVersion()
API Call: GET /upgrade/target-version
public ClusterInfo setTargetVersion(java.lang.String version, boolean doPrecheck)
API Call: PUT /upgrade/target-version
version
- The new version numberdoPrecheck
- If false, skips all multi-VDC/DR pre-checks.public ClusterInfo setTargetVersion(java.lang.String version)
API Call: PUT /upgrade/target-version
version
- The new version numberpublic ClusterInfo getClusterInfo(java.lang.String siteId, boolean showAllVersions)
API Call: GET /upgrade/cluster-state
siteId
- the UUID of the target siteshowAllVersions
- If true, will show all removable versions even though
the installed versions are less than MAX_SOFTWARE_VERSIONSpublic ClusterInfo getClusterInfo(boolean showAllVersions)
API Call: GET /upgrade/cluster-state
showAllVersions
- If true, will show all removable versions even though
the installed versions are less than MAX_SOFTWARE_VERSIONSpublic ClusterInfo getClusterInfo()
public ClusterInfo getClusterInfo(java.lang.String siteId)
siteId
- the UUID of the target sitepublic java.lang.String getClusterState()
public java.lang.String triggerDbCheck()
public DbConsistencyStatusRestRep getDbCheckState()
public java.lang.String cancelDbCheck()