public class DefaultSkipperClient extends Object implements SkipperClient
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 |
---|---|
Repository |
addRepository(String name,
String rootUrl,
String sourceUrl)
Add a new Package Repository.
|
CancelResponse |
cancel(CancelRequest cancelRequest)
Sends a cancel request for current release operation
|
protected org.springframework.hateoas.client.Traverson |
createTraverson(String baseUrl,
org.springframework.web.client.RestOperations restOperations) |
void |
delete(String releaseName,
boolean deletePackage)
Delete a specific release.
|
void |
deleteRepository(String name)
Delete a Package Repository.
|
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.
|
org.springframework.hateoas.CollectionModel<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.
|
org.springframework.hateoas.CollectionModel<Deployer> |
listDeployers()
List Platform Deployers
|
org.springframework.hateoas.CollectionModel<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.
|
org.springframework.hateoas.CollectionModel<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 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 org.springframework.hateoas.CollectionModel<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 org.springframework.hateoas.CollectionModel<Release> history(String releaseName)
SkipperClient
history
in interface SkipperClient
releaseName
- the release name of the release to search forpublic Repository addRepository(String name, String rootUrl, String sourceUrl)
SkipperClient
addRepository
in interface SkipperClient
name
- the name of the repositoryrootUrl
- the root URL for the packagesourceUrl
- the source URL for the packagespublic void deleteRepository(String name)
SkipperClient
deleteRepository
in interface SkipperClient
name
- the name of the repositorypublic org.springframework.hateoas.CollectionModel<Repository> listRepositories()
SkipperClient
listRepositories
in interface SkipperClient
public org.springframework.hateoas.CollectionModel<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 packageprotected org.springframework.hateoas.client.Traverson createTraverson(String baseUrl, org.springframework.web.client.RestOperations restOperations)
Copyright © 2019 Pivotal Software, Inc.. All rights reserved.