public class DefaultSkipperClient extends Object implements SkipperClient
Modifier and Type | Class and Description |
---|---|
protected static class |
DefaultSkipperClient.DeployersResponseWrapper |
protected static class |
DefaultSkipperClient.HateoasResponseWrapper<T> |
protected static class |
DefaultSkipperClient.PackageMetadatasResponseWrapper |
protected static class |
DefaultSkipperClient.ReleasesResponseWrapper |
protected static class |
DefaultSkipperClient.RepositoriesResponseWrapper |
Modifier and Type | Field and Description |
---|---|
protected org.springframework.web.client.RestTemplate |
restTemplate |
Constructor and Description |
---|
DefaultSkipperClient(String baseUri)
Create a new DefaultSkipperClient given the URL of the Server.
|
DefaultSkipperClient(String baseUri,
org.springframework.web.client.RestTemplate restTemplate)
Create a new DefaultSkipperClient given the base URI of the Server and a preconfigured
RestTemplate.
|
Modifier and Type | Method and Description |
---|---|
CancelResponse |
cancel(CancelRequest cancelRequest)
Sends a cancel request for current release operation
|
void |
delete(String releaseName,
boolean deletePackage)
Delete a specific release.
|
LogInfo |
getLog(String releaseName)
Fetch the logs of the latest release identified by the given name.
|
LogInfo |
getLog(String releaseName,
String appName)
Fetch the logs of the latest release identified by the given release name
and a specific application name inside the release.
|
Template |
getSpringCloudDeployerApplicationTemplate()
Return the template for deploying a Spring Boot Application using skipper.
|
Collection<Release> |
history(String releaseName)
List all releases for the given release name.
|
AboutResource |
info() |
Release |
install(InstallRequest installRequest)
Install the package
|
List<Release> |
list(String releaseNameLike)
List the latest version of releases with status of deployed or failed.
|
Collection<Deployer> |
listDeployers()
List Platform Deployers
|
Collection<Repository> |
listRepositories()
List Package Repositories.
|
String |
manifest(String releaseName)
Return the manifest of the last known release.
|
String |
manifest(String releaseName,
int releaseVersion)
Return a manifest info of a release version.
|
void |
packageDelete(String packageName)
Delete a package
|
Release |
rollback(RollbackRequest rollbackRequest)
Rollback a specific release.
|
Release |
rollback(String releaseName,
int releaseVersion)
Rollback a specific release.
|
Release |
scale(String releaseName,
ScaleRequest scaleRequest)
Scale a release with a given scale request.
|
Collection<PackageMetadata> |
search(String name,
boolean details)
Search for package metadata.
|
Info |
status(String releaseName)
Return a status info of a last known release.
|
Info |
status(String releaseName,
int releaseVersion)
Return a status info of a release version.
|
Release |
upgrade(UpgradeRequest upgradeRequest)
Upgrade a release.
|
PackageMetadata |
upload(UploadRequest uploadRequest)
Upload the package.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
create
public DefaultSkipperClient(String baseUri)
baseUri
- the URL of the Server.public DefaultSkipperClient(String baseUri, org.springframework.web.client.RestTemplate restTemplate)
baseUri
- the URI of the Server.restTemplate
- the template to use to make http calls to the server.public Template getSpringCloudDeployerApplicationTemplate()
SkipperClient
getSpringCloudDeployerApplicationTemplate
in interface SkipperClient
public AboutResource info()
info
in interface SkipperClient
public Info status(String releaseName)
SkipperClient
status
in interface SkipperClient
releaseName
- the release namepublic Info status(String releaseName, int releaseVersion)
SkipperClient
status
in interface SkipperClient
releaseName
- the release namereleaseVersion
- the release versionpublic LogInfo getLog(String releaseName)
SkipperClient
getLog
in interface SkipperClient
releaseName
- the release namepublic LogInfo getLog(String releaseName, String appName)
SkipperClient
getLog
in interface SkipperClient
releaseName
- the release nameappName
- the application namepublic Release scale(String releaseName, ScaleRequest scaleRequest)
SkipperClient
scale
in interface SkipperClient
releaseName
- the release namescaleRequest
- the scale requestpublic String manifest(String releaseName)
SkipperClient
manifest
in interface SkipperClient
releaseName
- the release namepublic String manifest(String releaseName, int releaseVersion)
SkipperClient
manifest
in interface SkipperClient
releaseName
- the release namereleaseVersion
- the release versionpublic Collection<PackageMetadata> search(String name, boolean details)
SkipperClient
search
in interface SkipperClient
name
- optional name with wildcard support for searchingdetails
- boolean flag to fetch all the metadatapublic Release install(InstallRequest installRequest)
SkipperClient
install
in interface SkipperClient
installRequest
- the package install requestRelease
public Release upgrade(UpgradeRequest upgradeRequest)
SkipperClient
upgrade
in interface SkipperClient
upgradeRequest
- the request to upgrade the releaseRelease
public void delete(String releaseName, boolean deletePackage)
SkipperClient
delete
in interface SkipperClient
releaseName
- the release namedeletePackage
- delete package when deleting the releasepublic CancelResponse cancel(CancelRequest cancelRequest)
SkipperClient
cancel
in interface SkipperClient
cancelRequest
- the cancel requestpublic Release rollback(RollbackRequest rollbackRequest)
SkipperClient
rollback
in interface SkipperClient
rollbackRequest
- the rollback requestRelease
public Release rollback(String releaseName, int releaseVersion)
SkipperClient
rollback
in interface SkipperClient
releaseName
- the release namereleaseVersion
- the release versionRelease
SkipperClient.rollback(RollbackRequest)
public List<Release> list(String releaseNameLike)
SkipperClient
list
in interface SkipperClient
releaseNameLike
- the wildcard name of releases to search forpublic Collection<Release> history(String releaseName)
SkipperClient
history
in interface SkipperClient
releaseName
- the release name of the release to search forpublic Collection<Repository> listRepositories()
SkipperClient
listRepositories
in interface SkipperClient
public Collection<Deployer> listDeployers()
SkipperClient
listDeployers
in interface SkipperClient
public PackageMetadata upload(UploadRequest uploadRequest)
SkipperClient
upload
in interface SkipperClient
uploadRequest
- the properties for the package uploadpublic void packageDelete(String packageName)
SkipperClient
packageDelete
in interface SkipperClient
packageName
- the name of the packageCopyright © 2019 Pivotal Software, Inc.. All rights reserved.