public interface CloudFoundryOperations
Modifier and Type | Method and Description |
---|---|
void |
addDomain(String domainName)
Add a private domain in the current organization.
|
void |
addRoute(String host,
String domainName)
Register a new route to the a domain.
|
void |
bindService(String appName,
String serviceName)
Associate (provision) a service with an application.
|
void |
createApplication(String appName,
Staging staging,
Integer disk,
Integer memory,
List<String> uris,
List<String> serviceNames)
Create application.
|
void |
createApplication(String appName,
Staging staging,
Integer memory,
List<String> uris,
List<String> serviceNames)
Create application.
|
void |
createService(CloudService service)
Create a service.
|
void |
createUserProvidedService(CloudService service,
Map<String,Object> credentials)
Create a user-provided service.
|
void |
debugApplication(String appName,
CloudApplication.DebugMode mode)
Debug application.
|
void |
deleteAllApplications()
Delete all applications.
|
void |
deleteAllServices()
Delete all services.
|
void |
deleteApplication(String appName)
Delete application.
|
void |
deleteDomain(String domainName)
Delete a private domain in the current organization.
|
void |
deleteRoute(String host,
String domainName)
Delete a registered route from the space of the current session.
|
void |
deleteService(String service)
Delete cloud service.
|
CloudApplication |
getApplication(String appName)
Get cloud application with the specified name.
|
InstancesInfo |
getApplicationInstances(CloudApplication app)
Get application instances info for application.
|
InstancesInfo |
getApplicationInstances(String appName)
Get application instances info for application.
|
List<CloudApplication> |
getApplications()
Get all cloud applications.
|
ApplicationStats |
getApplicationStats(String appName)
Get application stats for the app with the specified name.
|
URL |
getCloudControllerUrl()
Get the URL used for the cloud controller.
|
CloudInfo |
getCloudInfo()
Get CloudInfo for the current cloud.
|
CrashesInfo |
getCrashes(String appName)
Get crashes info for application.
|
Map<String,String> |
getCrashLogs(String appName)
Deprecated.
|
CloudDomain |
getDefaultDomain()
Gets the default domain for the current org, which is the first shared domain.
|
List<CloudDomain> |
getDomains()
Get list of all domain shared and private domains.
|
List<CloudDomain> |
getDomainsForOrg()
Get list of all domain registered for the current organization.
|
String |
getFile(String appName,
int instanceIndex,
String filePath)
Get file from the deployed application.
|
String |
getFile(String appName,
int instanceIndex,
String filePath,
int startPosition)
Get a the content, starting at a specific position, of a file from the deployed application.
|
String |
getFile(String appName,
int instanceIndex,
String filePath,
int startPosition,
int endPosition)
Get a range of content of a file from the deployed application.
|
String |
getFileTail(String appName,
int instanceIndex,
String filePath,
int length)
Get a the last bytes, with length as specified, of content of a file from the deployed application.
|
Map<String,String> |
getLogs(String appName)
Deprecated.
|
List<CloudOrganization> |
getOrganizations()
Get list of CloudOrganizations for the current cloud.
|
List<CloudDomain> |
getPrivateDomains()
Get list of all private domains.
|
List<ApplicationLog> |
getRecentLogs(String appName)
Stream recent log entries.
|
List<CloudRoute> |
getRoutes(String domainName)
Get the info for all routes for a domain.
|
CloudService |
getService(String service)
Get cloud service.
|
List<CloudServiceBroker> |
getServiceBrokers()
Get all service brokers.
|
List<CloudServiceOffering> |
getServiceOfferings()
Get all service offerings.
|
List<CloudService> |
getServices()
Get list of cloud services.
|
List<CloudDomain> |
getSharedDomains()
Get list of all shared domains.
|
List<CloudSpace> |
getSpaces()
Get list of CloudSpaces for the current cloud.
|
CloudStack |
getStack(String name)
Get a stack by name.
|
List<CloudStack> |
getStacks()
Get the list of stacks available for staging applications.
|
String |
getStagingLogs(StartingInfo info,
int offset)
Get the staging log while an application is starting.
|
org.springframework.security.oauth2.common.OAuth2AccessToken |
login()
Login using the credentials already set for the client.
|
void |
logout()
Logout closing the current session.
|
void |
register(String email,
String password)
Register new user account with the provided credentials.
|
void |
registerRestLogListener(RestLogCallback callBack)
Register a new RestLogCallback
|
void |
removeDomain(String domainName)
Deprecated.
alias for
deleteDomain(java.lang.String) |
void |
rename(String appName,
String newName)
Rename an application.
|
StartingInfo |
restartApplication(String appName)
Restart application.
|
void |
setResponseErrorHandler(org.springframework.web.client.ResponseErrorHandler errorHandler)
Override the default REST response error handler with a custom error handler.
|
StartingInfo |
startApplication(String appName)
Start application.
|
void |
stopApplication(String appName)
Stop application.
|
StreamingLogToken |
streamLogs(String appName,
ApplicationLogListener listener)
Stream application logs produced after this method is called.
|
void |
unbindService(String appName,
String serviceName)
Un-associate (unprovision) a service from an application.
|
void |
unregister()
Unregister and log out the currently logged in user
|
void |
unRegisterRestLogListener(RestLogCallback callBack)
Un-register a RestLogCallback
|
void |
updateApplicationDiskQuota(String appName,
int disk)
Update application disk quota.
|
void |
updateApplicationEnv(String appName,
List<String> env)
Update application env using a list of strings each with one environment setting.
|
void |
updateApplicationEnv(String appName,
Map<String,String> env)
Update application env using a map where the key specifies the name of the environment variable
and the value the value of the environment variable..
|
void |
updateApplicationInstances(String appName,
int instances)
Update application instances.
|
void |
updateApplicationMemory(String appName,
int memory)
Update application memory.
|
void |
updateApplicationServices(String appName,
List<String> services)
Update application services.
|
void |
updateApplicationStaging(String appName,
Staging staging)
Update application staging information.
|
void |
updateApplicationUris(String appName,
List<String> uris)
Update application URIs.
|
void |
updatePassword(CloudCredentials credentials,
String newPassword)
Update the password for the logged in user using
the username/old_password provided in the credentials.
|
void |
updatePassword(String newPassword)
Update the password for the logged in user.
|
void |
uploadApplication(String appName,
ApplicationArchive archive)
Upload an application to cloud foundry.
|
void |
uploadApplication(String appName,
ApplicationArchive archive,
UploadStatusCallback callback)
Upload an application to cloud foundry.
|
void |
uploadApplication(String appName,
File file)
Upload an application to cloud foundry.
|
void |
uploadApplication(String appName,
File file,
UploadStatusCallback callback)
Upload an application to cloud foundry.
|
void |
uploadApplication(String appName,
String file)
Upload an application.
|
void setResponseErrorHandler(org.springframework.web.client.ResponseErrorHandler errorHandler)
errorHandler
- URL getCloudControllerUrl()
CloudInfo getCloudInfo()
List<CloudSpace> getSpaces()
List<CloudOrganization> getOrganizations()
void register(String email, String password)
email
- the email accountpassword
- the passwordvoid updatePassword(String newPassword)
newPassword
- the new passwordvoid updatePassword(CloudCredentials credentials, String newPassword)
credentials
- current credentialsnewPassword
- the new passwordvoid unregister()
org.springframework.security.oauth2.common.OAuth2AccessToken login()
void logout()
List<CloudApplication> getApplications()
CloudApplication getApplication(String appName)
appName
- name of the appApplicationStats getApplicationStats(String appName)
appName
- name of the appvoid createApplication(String appName, Staging staging, Integer memory, List<String> uris, List<String> serviceNames)
appName
- application namestaging
- staging infomemory
- memory to use in MBuris
- list of URIs for the appserviceNames
- list of service names to bind to appvoid createApplication(String appName, Staging staging, Integer disk, Integer memory, List<String> uris, List<String> serviceNames)
appName
- application namestaging
- staging infodisk
- disk quota to use in MBmemory
- memory to use in MBuris
- list of URIs for the appserviceNames
- list of service names to bind to appvoid createService(CloudService service)
service
- cloud service infovoid createUserProvidedService(CloudService service, Map<String,Object> credentials)
service
- cloud service infocredentials
- the user-provided service credentialsvoid uploadApplication(String appName, String file) throws IOException
appName
- application namefile
- path to the application archive or folderIOException
void uploadApplication(String appName, File file) throws IOException
appName
- the application namefile
- the application archive or folderIOException
void uploadApplication(String appName, File file, UploadStatusCallback callback) throws IOException
appName
- the application namefile
- the application archivecallback
- a callback interface used to provide progress information or nullIOException
void uploadApplication(String appName, ApplicationArchive archive) throws IOException
appName
- the application namearchive
- the application archiveIOException
void uploadApplication(String appName, ApplicationArchive archive, UploadStatusCallback callback) throws IOException
appName
- the application namearchive
- the application archivecallback
- a callback interface used to provide progress information or nullIOException
StartingInfo startApplication(String appName)
appName
- name of applicationvoid debugApplication(String appName, CloudApplication.DebugMode mode)
appName
- name of applicationmode
- debug mode infovoid stopApplication(String appName)
appName
- name of applicationStartingInfo restartApplication(String appName)
appName
- name of applicationvoid deleteApplication(String appName)
appName
- name of applicationvoid deleteAllApplications()
void deleteAllServices()
void updateApplicationDiskQuota(String appName, int disk)
appName
- name of applicationdisk
- new disk setting in MBvoid updateApplicationMemory(String appName, int memory)
appName
- name of applicationmemory
- new memory setting in MBvoid updateApplicationInstances(String appName, int instances)
appName
- name of applicationinstances
- number of instances to usevoid updateApplicationServices(String appName, List<String> services)
appName
- name of appplicationservices
- list of services that should be bound to appvoid updateApplicationStaging(String appName, Staging staging)
appName
- name of appplicationstaging
- staging information for the appvoid updateApplicationUris(String appName, List<String> uris)
appName
- name of applicationuris
- list of URIs the app should usevoid updateApplicationEnv(String appName, Map<String,String> env)
appName
- name of applicationenv
- map of environment settingsvoid updateApplicationEnv(String appName, List<String> env)
appName
- name of applicationenv
- list of environment settingsMap<String,String> getLogs(String appName)
appName
- name of the applicationStreamingLogToken streamLogs(String appName, ApplicationLogListener listener)
appName
- the name of the applicationlistener
- listener object to be notifiedList<ApplicationLog> getRecentLogs(String appName)
appName
- the name of the applicationMap<String,String> getCrashLogs(String appName)
appName
- name of the applicationString getStagingLogs(StartingInfo info, int offset)
info
- starting information containing staging log file URL. Obtained
after starting an application.offset
- starting position from where content should be retrieved.List<CloudStack> getStacks()
CloudStack getStack(String name)
name
- the name of the stack to getString getFile(String appName, int instanceIndex, String filePath)
appName
- name of the applicationinstanceIndex
- instance indexfilePath
- path to the fileString getFile(String appName, int instanceIndex, String filePath, int startPosition)
appName
- name of the applicationinstanceIndex
- instance indexfilePath
- path to the filestartPosition
- the starting position of the file contents (inclusive)String getFile(String appName, int instanceIndex, String filePath, int startPosition, int endPosition)
appName
- name of the applicationinstanceIndex
- instance indexfilePath
- path to the filestartPosition
- the starting position of the file contents (inclusive)endPosition
- the ending position of the file contents (exclusive)String getFileTail(String appName, int instanceIndex, String filePath, int length)
appName
- name of the applicationinstanceIndex
- instance indexfilePath
- path to the filelength
- the length of the file contents to retrieveList<CloudService> getServices()
CloudService getService(String service)
service
- name of servicevoid deleteService(String service)
service
- name of serviceList<CloudServiceOffering> getServiceOfferings()
List<CloudServiceBroker> getServiceBrokers()
void bindService(String appName, String serviceName)
appName
- the application nameserviceName
- the service namevoid unbindService(String appName, String serviceName)
appName
- the application nameserviceName
- the service nameInstancesInfo getApplicationInstances(String appName)
appName
- name of application.InstancesInfo getApplicationInstances(CloudApplication app)
app
- the application.CrashesInfo getCrashes(String appName)
appName
- name of applicationvoid rename(String appName, String newName)
appName
- the current namenewName
- the new nameList<CloudDomain> getDomainsForOrg()
List<CloudDomain> getPrivateDomains()
List<CloudDomain> getSharedDomains()
List<CloudDomain> getDomains()
CloudDomain getDefaultDomain()
void addDomain(String domainName)
domainName
- the domain to addvoid removeDomain(String domainName)
deleteDomain(java.lang.String)
domainName
- the domain to removevoid deleteDomain(String domainName)
domainName
- the domain to deleteList<CloudRoute> getRoutes(String domainName)
domainName
- the domain the routes belong tovoid addRoute(String host, String domainName)
host
- the host of the route to registerdomainName
- the domain of the route to registervoid deleteRoute(String host, String domainName)
host
- the host of the route to deletedomainName
- the domain of the route to deletevoid registerRestLogListener(RestLogCallback callBack)
callBack
- the callback to be registeredvoid unRegisterRestLogListener(RestLogCallback callBack)
callBack
- the callback to be un-registeredCopyright © 2014. All rights reserved.