public class CloudFoundryClient extends Object implements CloudFoundryOperations
| Constructor and Description |
|---|
CloudFoundryClient(CloudControllerClient cc)
Construct a client with a pre-configured CloudControllerClient
|
CloudFoundryClient(CloudCredentials credentials,
URL cloudControllerUrl)
Construct client without a default org and space.
|
CloudFoundryClient(CloudCredentials credentials,
URL cloudControllerUrl,
boolean trustSelfSignedCerts) |
CloudFoundryClient(CloudCredentials credentials,
URL cloudControllerUrl,
CloudSpace sessionSpace)
Construct a client with a default CloudSpace.
|
CloudFoundryClient(CloudCredentials credentials,
URL cloudControllerUrl,
CloudSpace sessionSpace,
boolean trustSelfSignedCerts) |
CloudFoundryClient(CloudCredentials credentials,
URL cloudControllerUrl,
CloudSpace sessionSpace,
HttpProxyConfiguration httpProxyConfiguration) |
CloudFoundryClient(CloudCredentials credentials,
URL cloudControllerUrl,
CloudSpace sessionSpace,
HttpProxyConfiguration httpProxyConfiguration,
boolean trustSelfSignedCerts) |
CloudFoundryClient(CloudCredentials credentials,
URL cloudControllerUrl,
HttpProxyConfiguration httpProxyConfiguration) |
CloudFoundryClient(CloudCredentials credentials,
URL cloudControllerUrl,
HttpProxyConfiguration httpProxyConfiguration,
boolean trustSelfSignedCerts) |
CloudFoundryClient(CloudCredentials credentials,
URL cloudControllerUrl,
String orgName,
String spaceName)
Construct a client with a default space name and org name.
|
CloudFoundryClient(CloudCredentials credentials,
URL cloudControllerUrl,
String orgName,
String spaceName,
boolean trustSelfSignedCerts) |
CloudFoundryClient(CloudCredentials credentials,
URL cloudControllerUrl,
String orgName,
String spaceName,
HttpProxyConfiguration httpProxyConfiguration) |
CloudFoundryClient(CloudCredentials credentials,
URL cloudControllerUrl,
String orgName,
String spaceName,
HttpProxyConfiguration httpProxyConfiguration,
boolean trustSelfSignedCerts) |
CloudFoundryClient(URL cloudControllerUrl)
Construct client for anonymous user.
|
CloudFoundryClient(URL cloudControllerUrl,
boolean trustSelfSignedCerts) |
CloudFoundryClient(URL cloudControllerUrl,
HttpProxyConfiguration httpProxyConfiguration) |
CloudFoundryClient(URL cloudControllerUrl,
HttpProxyConfiguration httpProxyConfiguration,
boolean trustSelfSignedCerts) |
| 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 |
associateAuditorWithSpace(String spaceName)
Associate current user to the space auditors role
|
void |
associateAuditorWithSpace(String orgName,
String spaceName)
Associate current user to the space auditors role
|
void |
associateAuditorWithSpace(String orgName,
String spaceName,
String userGuid)
Associate a user to the space auditors role
|
void |
associateDeveloperWithSpace(String spaceName)
Associate current user to the space developer role
|
void |
associateDeveloperWithSpace(String orgName,
String spaceName)
Associate current user to the space developer role
|
void |
associateDeveloperWithSpace(String orgName,
String spaceName,
String userGuid)
Associate a user to the space developer role
|
void |
associateManagerWithSpace(String spaceName)
Associate current user to the space managers role
|
void |
associateManagerWithSpace(String orgName,
String spaceName)
Associate current user to the space managers role
|
void |
associateManagerWithSpace(String orgName,
String spaceName,
String userGuid)
Associate a user to the space managers role
|
void |
bindRunningSecurityGroup(String securityGroupName)
Bind a security group to the list of security groups to be used for running applications.
|
void |
bindSecurityGroup(String orgName,
String spaceName,
String securityGroupName)
Bind a security group to a space.
|
void |
bindService(String appName,
String serviceName)
Associate (provision) a service with an application.
|
void |
bindStagingSecurityGroup(String securityGroupName)
Bind a security group to the list of security groups to be used for staging applications.
|
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 |
createQuota(CloudQuota quota)
Create quota
|
void |
createSecurityGroup(CloudSecurityGroup securityGroup)
Create a new CloudSecurityGroup.
|
void |
createSecurityGroup(String name,
InputStream jsonRulesFile)
Create a new CloudSecurityGroup using a JSON rules file.
|
void |
createService(CloudService service)
Create a service.
|
void |
createServiceBroker(CloudServiceBroker serviceBroker)
Create a service broker.
|
void |
createSpace(String spaceName)
Create a space with the specified name
|
void |
createUserProvidedService(CloudService service,
Map<String,Object> credentials)
Create a user-provided service.
|
void |
createUserProvidedService(CloudService service,
Map<String,Object> credentials,
String syslogDrainUrl)
Create a user-provided service for logging.
|
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.
|
List<CloudRoute> |
deleteOrphanedRoutes()
Delete routes that do not have any application which is assigned to them.
|
void |
deleteQuota(String quotaName)
Delete quota by name
|
void |
deleteRoute(String host,
String domainName)
Delete a registered route from the space of the current session.
|
void |
deleteSecurityGroup(String securityGroupName)
Deletes the security group with the given name.
|
void |
deleteService(String service)
Delete cloud service.
|
void |
deleteServiceBroker(String name)
Delete a service broker.
|
void |
deleteSpace(String spaceName)
Delete a space with the specified name
|
CloudApplication |
getApplication(String appName)
Get cloud application with the specified name.
|
CloudApplication |
getApplication(UUID appGuid)
Get cloud application with the specified GUID.
|
Map<String,Object> |
getApplicationEnvironment(String appName)
Get application environment variables for the app with the specified name.
|
Map<String,Object> |
getApplicationEnvironment(UUID appGuid)
Get application environment variables for the app with the specified GUID.
|
List<CloudEvent> |
getApplicationEvents(String appName)
Get application events.
|
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.
|
List<CloudEvent> |
getEvents()
Get system events.
|
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.
|
Map<String,CloudUser> |
getOrganizationUsers(String orgName)
Get all users in the specified organization
|
CloudOrganization |
getOrgByName(String orgName,
boolean required)
Get the organization with the specified name.
|
List<CloudDomain> |
getPrivateDomains()
Get list of all private domains.
|
CloudQuota |
getQuotaByName(String quotaName,
boolean required)
Get quota by name
|
List<CloudQuota> |
getQuotas()
Get quota definitions
|
List<ApplicationLog> |
getRecentLogs(String appName)
Stream recent log entries.
|
List<CloudRoute> |
getRoutes(String domainName)
Get the info for all routes for a domain.
|
List<CloudSecurityGroup> |
getRunningSecurityGroups()
List security groups in the set of security groups for running applications.
|
CloudSecurityGroup |
getSecurityGroup(String securityGroupName)
Get a specific security group by name.
|
List<CloudSecurityGroup> |
getSecurityGroups()
Get a List of all application security groups.
|
CloudService |
getService(String service)
Get cloud service.
|
CloudServiceBroker |
getServiceBroker(String name)
Get a service broker.
|
List<CloudServiceBroker> |
getServiceBrokers()
Get all service brokers.
|
CloudServiceInstance |
getServiceInstance(String service)
Get a service instance.
|
List<CloudServiceOffering> |
getServiceOfferings()
Get all service offerings.
|
List<CloudService> |
getServices()
Get list of cloud services.
|
List<CloudDomain> |
getSharedDomains()
Get list of all shared domains.
|
CloudSpace |
getSpace(String spaceName)
Get space name with the specified name.
|
List<UUID> |
getSpaceAuditors(String spaceName)
Get list of space auditor UUID for the space.
|
List<UUID> |
getSpaceAuditors(String orgName,
String spaceName)
Get list of space auditor UUID for the space.
|
List<UUID> |
getSpaceDevelopers(String spaceName)
Get list of space developer UUID for the space.
|
List<UUID> |
getSpaceDevelopers(String orgName,
String spaceName)
Get list of space developer UUID for the space.
|
List<UUID> |
getSpaceManagers(String spaceName)
Get list of space manager UUID for the space.
|
List<UUID> |
getSpaceManagers(String orgName,
String spaceName)
Get list of space manager UUID for the space.
|
List<CloudSpace> |
getSpaces()
Get list of CloudSpaces for the current cloud.
|
List<CloudSpace> |
getSpacesBoundToSecurityGroup(String securityGroupName)
Gets all the spaces that are bound to the given security group.
|
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.
|
List<CloudSecurityGroup> |
getStagingSecurityGroups()
Lists security groups in the staging set for applications.
|
org.springframework.security.oauth2.common.OAuth2AccessToken |
login()
Login using the credentials already set for the client.
|
void |
logout()
Logout closing the current session.
|
void |
openFile(String appName,
int instanceIndex,
String filePath,
ClientHttpResponseCallback callback)
Provide the content of a file from the deployed application via callbacks.
|
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)
Delete a private domain in the current organization.
|
void |
rename(String appName,
String newName)
Rename an application.
|
StartingInfo |
restartApplication(String appName)
Restart application.
|
void |
setQuotaToOrg(String orgName,
String quotaName)
Set quota to organization
|
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 |
unbindRunningSecurityGroup(String securityGroupName)
Unbind a security group from the set of security groups for running applications.
|
void |
unbindSecurityGroup(String orgName,
String spaceName,
String securityGroupName)
Unbind a security group from a space.
|
void |
unbindService(String appName,
String serviceName)
Un-associate (unprovision) a service from an application.
|
void |
unbindStagingSecurityGroup(String securityGroupName)
Unbind a security group from the set of security groups for staging applications.
|
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 |
updateQuota(CloudQuota quota,
String name)
Update Quota definition
|
void |
updateSecurityGroup(CloudSecurityGroup securityGroup)
Update an existing security group.
|
void |
updateSecurityGroup(String name,
InputStream jsonRulesFile)
Updates a existing CloudSecurityGroup using a JSON rules file.
|
void |
updateServiceBroker(CloudServiceBroker serviceBroker)
Update a service broker (unchanged forces catalog refresh).
|
void |
updateServicePlanVisibilityForBroker(String name,
boolean visibility)
Service plans are private by default when a service broker's catalog is
fetched/updated.
|
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 to Cloud Foundry.
|
void |
uploadApplication(String appName,
String fileName,
InputStream inputStream)
Upload an application to Cloud Foundry.
|
void |
uploadApplication(String appName,
String fileName,
InputStream inputStream,
UploadStatusCallback callback)
Upload an application to Cloud Foundry.
|
public CloudFoundryClient(URL cloudControllerUrl)
public CloudFoundryClient(URL cloudControllerUrl, boolean trustSelfSignedCerts)
public CloudFoundryClient(URL cloudControllerUrl, HttpProxyConfiguration httpProxyConfiguration)
public CloudFoundryClient(URL cloudControllerUrl, HttpProxyConfiguration httpProxyConfiguration, boolean trustSelfSignedCerts)
public CloudFoundryClient(CloudCredentials credentials, URL cloudControllerUrl)
public CloudFoundryClient(CloudCredentials credentials, URL cloudControllerUrl, boolean trustSelfSignedCerts)
public CloudFoundryClient(CloudCredentials credentials, URL cloudControllerUrl, HttpProxyConfiguration httpProxyConfiguration)
public CloudFoundryClient(CloudCredentials credentials, URL cloudControllerUrl, HttpProxyConfiguration httpProxyConfiguration, boolean trustSelfSignedCerts)
public CloudFoundryClient(CloudCredentials credentials, URL cloudControllerUrl, CloudSpace sessionSpace)
public CloudFoundryClient(CloudCredentials credentials, URL cloudControllerUrl, CloudSpace sessionSpace, boolean trustSelfSignedCerts)
public CloudFoundryClient(CloudCredentials credentials, URL cloudControllerUrl, CloudSpace sessionSpace, HttpProxyConfiguration httpProxyConfiguration)
public CloudFoundryClient(CloudCredentials credentials, URL cloudControllerUrl, CloudSpace sessionSpace, HttpProxyConfiguration httpProxyConfiguration, boolean trustSelfSignedCerts)
public CloudFoundryClient(CloudCredentials credentials, URL cloudControllerUrl, String orgName, String spaceName)
public CloudFoundryClient(CloudCredentials credentials, URL cloudControllerUrl, String orgName, String spaceName, boolean trustSelfSignedCerts)
public CloudFoundryClient(CloudCredentials credentials, URL cloudControllerUrl, String orgName, String spaceName, HttpProxyConfiguration httpProxyConfiguration)
public CloudFoundryClient(CloudCredentials credentials, URL cloudControllerUrl, String orgName, String spaceName, HttpProxyConfiguration httpProxyConfiguration, boolean trustSelfSignedCerts)
public CloudFoundryClient(CloudControllerClient cc)
public void setResponseErrorHandler(org.springframework.web.client.ResponseErrorHandler errorHandler)
CloudFoundryOperationssetResponseErrorHandler in interface CloudFoundryOperationspublic URL getCloudControllerUrl()
CloudFoundryOperationsgetCloudControllerUrl in interface CloudFoundryOperationspublic CloudInfo getCloudInfo()
CloudFoundryOperationsgetCloudInfo in interface CloudFoundryOperationspublic List<CloudSpace> getSpaces()
CloudFoundryOperationsgetSpaces in interface CloudFoundryOperationspublic List<CloudOrganization> getOrganizations()
CloudFoundryOperationsgetOrganizations in interface CloudFoundryOperationspublic void register(String email, String password)
CloudFoundryOperationsregister in interface CloudFoundryOperationsemail - the email accountpassword - the passwordpublic void updatePassword(String newPassword)
CloudFoundryOperationsupdatePassword in interface CloudFoundryOperationsnewPassword - the new passwordpublic void updatePassword(CloudCredentials credentials, String newPassword)
CloudFoundryOperationsupdatePassword in interface CloudFoundryOperationscredentials - current credentialsnewPassword - the new passwordpublic void unregister()
CloudFoundryOperationsunregister in interface CloudFoundryOperationspublic org.springframework.security.oauth2.common.OAuth2AccessToken login()
CloudFoundryOperationslogin in interface CloudFoundryOperationspublic void logout()
CloudFoundryOperationslogout in interface CloudFoundryOperationspublic List<CloudApplication> getApplications()
CloudFoundryOperationsgetApplications in interface CloudFoundryOperationspublic CloudApplication getApplication(String appName)
CloudFoundryOperationsgetApplication in interface CloudFoundryOperationsappName - name of the apppublic CloudApplication getApplication(UUID appGuid)
CloudFoundryOperationsgetApplication in interface CloudFoundryOperationsappGuid - GUID of the apppublic Map<String,Object> getApplicationEnvironment(UUID appGuid)
CloudFoundryOperationsgetApplicationEnvironment in interface CloudFoundryOperationsappGuid - GUID of the apppublic Map<String,Object> getApplicationEnvironment(String appName)
CloudFoundryOperationsgetApplicationEnvironment in interface CloudFoundryOperationsappName - name of the apppublic ApplicationStats getApplicationStats(String appName)
CloudFoundryOperationsgetApplicationStats in interface CloudFoundryOperationsappName - name of the apppublic void createApplication(String appName, Staging staging, Integer memory, List<String> uris, List<String> serviceNames)
CloudFoundryOperationscreateApplication in interface CloudFoundryOperationsappName - application namestaging - staging infomemory - memory to use in MBuris - list of URIs for the appserviceNames - list of service names to bind to apppublic void createApplication(String appName, Staging staging, Integer disk, Integer memory, List<String> uris, List<String> serviceNames)
CloudFoundryOperationscreateApplication in interface CloudFoundryOperationsappName - 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 apppublic void createService(CloudService service)
CloudFoundryOperationscreateService in interface CloudFoundryOperationsservice - cloud service infopublic void createUserProvidedService(CloudService service, Map<String,Object> credentials)
CloudFoundryOperationscreateUserProvidedService in interface CloudFoundryOperationsservice - cloud service infocredentials - the user-provided service credentialspublic void createUserProvidedService(CloudService service, Map<String,Object> credentials, String syslogDrainUrl)
CloudFoundryOperationscreateUserProvidedService in interface CloudFoundryOperationsservice - cloud service infocredentials - the user-provided service credentialssyslogDrainUrl - for a logging servicepublic List<CloudRoute> deleteOrphanedRoutes()
CloudFoundryOperationsdeleteOrphanedRoutes in interface CloudFoundryOperationspublic void uploadApplication(String appName, String file) throws IOException
CloudFoundryOperationsuploadApplication in interface CloudFoundryOperationsappName - application namefile - path to the application archive or folderIOExceptionpublic void uploadApplication(String appName, File file) throws IOException
CloudFoundryOperationsuploadApplication in interface CloudFoundryOperationsappName - the application namefile - the application archive or folderIOExceptionpublic void uploadApplication(String appName, File file, UploadStatusCallback callback) throws IOException
CloudFoundryOperationsuploadApplication in interface CloudFoundryOperationsappName - the application namefile - the application archivecallback - a callback interface used to provide progress information or nullIOExceptionpublic void uploadApplication(String appName, String fileName, InputStream inputStream) throws IOException
CloudFoundryOperationsuploadApplication in interface CloudFoundryOperationsappName - the application namefileName - the logical name of the application fileinputStream - the InputStream to read fromIOExceptionpublic void uploadApplication(String appName, String fileName, InputStream inputStream, UploadStatusCallback callback) throws IOException
CloudFoundryOperationsuploadApplication in interface CloudFoundryOperationsappName - the application namefileName - the logical name of the application fileinputStream - the InputStream to read fromcallback - a callback interface used to provide progress information or nullIOExceptionpublic void uploadApplication(String appName, ApplicationArchive archive) throws IOException
CloudFoundryOperationsuploadApplication in interface CloudFoundryOperationsappName - the application namearchive - the application archiveIOExceptionpublic void uploadApplication(String appName, ApplicationArchive archive, UploadStatusCallback callback) throws IOException
CloudFoundryOperationsuploadApplication in interface CloudFoundryOperationsappName - the application namearchive - the application archivecallback - a callback interface used to provide progress information or nullIOExceptionpublic StartingInfo startApplication(String appName)
CloudFoundryOperationsstartApplication in interface CloudFoundryOperationsappName - name of applicationpublic void debugApplication(String appName, CloudApplication.DebugMode mode)
CloudFoundryOperationsdebugApplication in interface CloudFoundryOperationsappName - name of applicationmode - debug mode infopublic void stopApplication(String appName)
CloudFoundryOperationsstopApplication in interface CloudFoundryOperationsappName - name of applicationpublic StartingInfo restartApplication(String appName)
CloudFoundryOperationsrestartApplication in interface CloudFoundryOperationsappName - name of applicationpublic void deleteApplication(String appName)
CloudFoundryOperationsdeleteApplication in interface CloudFoundryOperationsappName - name of applicationpublic void deleteAllApplications()
CloudFoundryOperationsdeleteAllApplications in interface CloudFoundryOperationspublic void deleteAllServices()
CloudFoundryOperationsdeleteAllServices in interface CloudFoundryOperationspublic void updateApplicationDiskQuota(String appName, int disk)
CloudFoundryOperationsupdateApplicationDiskQuota in interface CloudFoundryOperationsappName - name of applicationdisk - new disk setting in MBpublic void updateApplicationMemory(String appName, int memory)
CloudFoundryOperationsupdateApplicationMemory in interface CloudFoundryOperationsappName - name of applicationmemory - new memory setting in MBpublic void updateApplicationInstances(String appName, int instances)
CloudFoundryOperationsupdateApplicationInstances in interface CloudFoundryOperationsappName - name of applicationinstances - number of instances to usepublic void updateApplicationServices(String appName, List<String> services)
CloudFoundryOperationsupdateApplicationServices in interface CloudFoundryOperationsappName - name of appplicationservices - list of services that should be bound to apppublic void updateApplicationStaging(String appName, Staging staging)
CloudFoundryOperationsupdateApplicationStaging in interface CloudFoundryOperationsappName - name of appplicationstaging - staging information for the apppublic void updateApplicationUris(String appName, List<String> uris)
CloudFoundryOperationsupdateApplicationUris in interface CloudFoundryOperationsappName - name of applicationuris - list of URIs the app should usepublic void updateApplicationEnv(String appName, Map<String,String> env)
CloudFoundryOperationsupdateApplicationEnv in interface CloudFoundryOperationsappName - name of applicationenv - map of environment settingspublic void updateApplicationEnv(String appName, List<String> env)
CloudFoundryOperationsupdateApplicationEnv in interface CloudFoundryOperationsappName - name of applicationenv - list of environment settingspublic List<CloudEvent> getEvents()
CloudFoundryOperationsgetEvents in interface CloudFoundryOperationspublic List<CloudEvent> getApplicationEvents(String appName)
CloudFoundryOperationsgetApplicationEvents in interface CloudFoundryOperationsappName - name of applicationpublic Map<String,String> getLogs(String appName)
CloudFoundryOperationsgetLogs in interface CloudFoundryOperationsappName - name of the applicationpublic StreamingLogToken streamLogs(String appName, ApplicationLogListener listener)
CloudFoundryOperationsstreamLogs in interface CloudFoundryOperationsappName - the name of the applicationlistener - listener object to be notifiedpublic List<ApplicationLog> getRecentLogs(String appName)
CloudFoundryOperationsgetRecentLogs in interface CloudFoundryOperationsappName - the name of the applicationpublic Map<String,String> getCrashLogs(String appName)
CloudFoundryOperationsgetCrashLogs in interface CloudFoundryOperationsappName - name of the applicationpublic String getStagingLogs(StartingInfo info, int offset)
CloudFoundryOperationsgetStagingLogs in interface CloudFoundryOperationsinfo - starting information containing staging log file URL. Obtained
after starting an application.offset - starting position from where content should be retrieved.public String getFile(String appName, int instanceIndex, String filePath)
CloudFoundryOperationsgetFile in interface CloudFoundryOperationsappName - name of the applicationinstanceIndex - instance indexfilePath - path to the filepublic String getFile(String appName, int instanceIndex, String filePath, int startPosition)
CloudFoundryOperationsgetFile in interface CloudFoundryOperationsappName - name of the applicationinstanceIndex - instance indexfilePath - path to the filestartPosition - the starting position of the file contents (inclusive)public String getFile(String appName, int instanceIndex, String filePath, int startPosition, int endPosition)
CloudFoundryOperationsgetFile in interface CloudFoundryOperationsappName - 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)public void openFile(String appName, int instanceIndex, String filePath, ClientHttpResponseCallback callback)
CloudFoundryOperationsopenFile in interface CloudFoundryOperationsappName - name of the applicationinstanceIndex - instance indexfilePath - path to the filecallback - callback object to receive file contentspublic String getFileTail(String appName, int instanceIndex, String filePath, int length)
CloudFoundryOperationsgetFileTail in interface CloudFoundryOperationsappName - name of the applicationinstanceIndex - instance indexfilePath - path to the filelength - the length of the file contents to retrievepublic List<CloudService> getServices()
CloudFoundryOperationsgetServices in interface CloudFoundryOperationspublic List<CloudServiceBroker> getServiceBrokers()
CloudFoundryOperationsgetServiceBrokers in interface CloudFoundryOperationspublic CloudServiceBroker getServiceBroker(String name)
CloudFoundryOperationsgetServiceBroker in interface CloudFoundryOperationsname - the service broker namepublic void createServiceBroker(CloudServiceBroker serviceBroker)
CloudFoundryOperationscreateServiceBroker in interface CloudFoundryOperationsserviceBroker - cloud service broker infopublic void updateServiceBroker(CloudServiceBroker serviceBroker)
CloudFoundryOperationsupdateServiceBroker in interface CloudFoundryOperationsserviceBroker - cloud service broker infopublic void deleteServiceBroker(String name)
CloudFoundryOperationsdeleteServiceBroker in interface CloudFoundryOperationsname - the service broker namepublic void updateServicePlanVisibilityForBroker(String name, boolean visibility)
CloudFoundryOperationsupdateServicePlanVisibilityForBroker in interface CloudFoundryOperationsname - the service broker namevisibility - true for public, false for privatepublic CloudService getService(String service)
CloudFoundryOperationsgetService in interface CloudFoundryOperationsservice - name of servicepublic CloudServiceInstance getServiceInstance(String service)
CloudFoundryOperationsgetServiceInstance in interface CloudFoundryOperationsservice - name of the service instancepublic void deleteService(String service)
CloudFoundryOperationsdeleteService in interface CloudFoundryOperationsservice - name of servicepublic List<CloudServiceOffering> getServiceOfferings()
CloudFoundryOperationsgetServiceOfferings in interface CloudFoundryOperationspublic void bindService(String appName, String serviceName)
CloudFoundryOperationsbindService in interface CloudFoundryOperationsappName - the application nameserviceName - the service namepublic void unbindService(String appName, String serviceName)
CloudFoundryOperationsunbindService in interface CloudFoundryOperationsappName - the application nameserviceName - the service namepublic InstancesInfo getApplicationInstances(String appName)
CloudFoundryOperationsgetApplicationInstances in interface CloudFoundryOperationsappName - name of application.public InstancesInfo getApplicationInstances(CloudApplication app)
CloudFoundryOperationsgetApplicationInstances in interface CloudFoundryOperationsapp - the application.public CrashesInfo getCrashes(String appName)
CloudFoundryOperationsgetCrashes in interface CloudFoundryOperationsappName - name of applicationpublic List<CloudStack> getStacks()
CloudFoundryOperationsgetStacks in interface CloudFoundryOperationspublic CloudStack getStack(String name)
CloudFoundryOperationsgetStack in interface CloudFoundryOperationsname - the name of the stack to getpublic void rename(String appName, String newName)
CloudFoundryOperationsrename in interface CloudFoundryOperationsappName - the current namenewName - the new namepublic List<CloudDomain> getDomainsForOrg()
CloudFoundryOperationsgetDomainsForOrg in interface CloudFoundryOperationspublic List<CloudDomain> getPrivateDomains()
CloudFoundryOperationsgetPrivateDomains in interface CloudFoundryOperationspublic List<CloudDomain> getSharedDomains()
CloudFoundryOperationsgetSharedDomains in interface CloudFoundryOperationspublic List<CloudDomain> getDomains()
CloudFoundryOperationsgetDomains in interface CloudFoundryOperationspublic CloudDomain getDefaultDomain()
CloudFoundryOperationsgetDefaultDomain in interface CloudFoundryOperationspublic void addDomain(String domainName)
CloudFoundryOperationsaddDomain in interface CloudFoundryOperationsdomainName - the domain to addpublic void deleteDomain(String domainName)
CloudFoundryOperationsdeleteDomain in interface CloudFoundryOperationsdomainName - the domain to deletepublic void removeDomain(String domainName)
CloudFoundryOperationsremoveDomain in interface CloudFoundryOperationsdomainName - the domain to removepublic List<CloudRoute> getRoutes(String domainName)
CloudFoundryOperationsgetRoutes in interface CloudFoundryOperationsdomainName - the domain the routes belong topublic void addRoute(String host, String domainName)
CloudFoundryOperationsaddRoute in interface CloudFoundryOperationshost - the host of the route to registerdomainName - the domain of the route to registerpublic void deleteRoute(String host, String domainName)
CloudFoundryOperationsdeleteRoute in interface CloudFoundryOperationshost - the host of the route to deletedomainName - the domain of the route to deletepublic void registerRestLogListener(RestLogCallback callBack)
CloudFoundryOperationsregisterRestLogListener in interface CloudFoundryOperationscallBack - the callback to be registeredpublic void unRegisterRestLogListener(RestLogCallback callBack)
CloudFoundryOperationsunRegisterRestLogListener in interface CloudFoundryOperationscallBack - the callback to be un-registeredpublic CloudOrganization getOrgByName(String orgName, boolean required)
CloudFoundryOperationsgetOrgByName in interface CloudFoundryOperationsorgName - name of organizationrequired - if true, and organization is not found, throw an exceptionpublic List<CloudQuota> getQuotas()
CloudFoundryOperationsgetQuotas in interface CloudFoundryOperationspublic CloudQuota getQuotaByName(String quotaName, boolean required)
CloudFoundryOperationsgetQuotaByName in interface CloudFoundryOperationspublic void setQuotaToOrg(String orgName, String quotaName)
CloudFoundryOperationssetQuotaToOrg in interface CloudFoundryOperationspublic void createQuota(CloudQuota quota)
CloudFoundryOperationscreateQuota in interface CloudFoundryOperationspublic void deleteQuota(String quotaName)
CloudFoundryOperationsdeleteQuota in interface CloudFoundryOperationspublic void updateQuota(CloudQuota quota, String name)
CloudFoundryOperationsupdateQuota in interface CloudFoundryOperationspublic void createSpace(String spaceName)
CloudFoundryOperationscreateSpace in interface CloudFoundryOperationspublic void deleteSpace(String spaceName)
CloudFoundryOperationsdeleteSpace in interface CloudFoundryOperationsspaceName - name of the spacepublic CloudSpace getSpace(String spaceName)
CloudFoundryOperationsgetSpace in interface CloudFoundryOperationsspaceName - name of the spacepublic List<UUID> getSpaceManagers(String spaceName)
CloudFoundryOperationsgetSpaceManagers in interface CloudFoundryOperationsspaceName - name of the spacepublic List<UUID> getSpaceDevelopers(String spaceName)
CloudFoundryOperationsgetSpaceDevelopers in interface CloudFoundryOperationsspaceName - name of the spacepublic List<UUID> getSpaceAuditors(String spaceName)
CloudFoundryOperationsgetSpaceAuditors in interface CloudFoundryOperationsspaceName - name of the spacepublic List<UUID> getSpaceManagers(String orgName, String spaceName)
CloudFoundryOperationsgetSpaceManagers in interface CloudFoundryOperationsorgName - name of the organization containing the spacespaceName - name of the spacepublic List<UUID> getSpaceDevelopers(String orgName, String spaceName)
CloudFoundryOperationsgetSpaceDevelopers in interface CloudFoundryOperationsorgName - name of the organization containing the spacespaceName - name of the spacepublic List<UUID> getSpaceAuditors(String orgName, String spaceName)
CloudFoundryOperationsgetSpaceAuditors in interface CloudFoundryOperationsorgName - name of the organization containing the spacespaceName - name of the spacepublic void associateManagerWithSpace(String spaceName)
CloudFoundryOperationsassociateManagerWithSpace in interface CloudFoundryOperationsspaceName - name of the spacepublic void associateDeveloperWithSpace(String spaceName)
CloudFoundryOperationsassociateDeveloperWithSpace in interface CloudFoundryOperationsspaceName - name of the spacepublic void associateAuditorWithSpace(String spaceName)
CloudFoundryOperationsassociateAuditorWithSpace in interface CloudFoundryOperationsspaceName - name of the spacepublic void associateManagerWithSpace(String orgName, String spaceName)
CloudFoundryOperationsassociateManagerWithSpace in interface CloudFoundryOperationsorgName - name of the organization containing the spacespaceName - name of the spacepublic void associateDeveloperWithSpace(String orgName, String spaceName)
CloudFoundryOperationsassociateDeveloperWithSpace in interface CloudFoundryOperationsorgName - name of the organization containing the spacespaceName - name of the spacepublic void associateAuditorWithSpace(String orgName, String spaceName)
CloudFoundryOperationsassociateAuditorWithSpace in interface CloudFoundryOperationsorgName - name of the organization containing the spacespaceName - name of the spacepublic void associateManagerWithSpace(String orgName, String spaceName, String userGuid)
CloudFoundryOperationsassociateManagerWithSpace in interface CloudFoundryOperationsorgName - name of the organization containing the spacespaceName - name of the spaceuserGuid - guid of the user. If null, use current user. To retrieve user guid, use getOrganizationUsers and search for usernamepublic void associateDeveloperWithSpace(String orgName, String spaceName, String userGuid)
CloudFoundryOperationsassociateDeveloperWithSpace in interface CloudFoundryOperationsorgName - name of the organization containing the spacespaceName - name of the spaceuserGuid - guid of the user. If null, use current user. To retrieve user guid, use getOrganizationUsers and search for usernamepublic void associateAuditorWithSpace(String orgName, String spaceName, String userGuid)
CloudFoundryOperationsassociateAuditorWithSpace in interface CloudFoundryOperationsorgName - name of the organization containing the spacespaceName - name of the spaceuserGuid - guid of the user. If null, use current user. To retrieve user guid, use getOrganizationUsers and search for usernamepublic List<CloudSecurityGroup> getSecurityGroups()
CloudFoundryOperationsgetSecurityGroups in interface CloudFoundryOperationsCloudSecurityGroups in the systempublic CloudSecurityGroup getSecurityGroup(String securityGroupName)
CloudFoundryOperationsgetSecurityGroup in interface CloudFoundryOperationssecurityGroupName - The name of the security groupnull if no security groups exist with the
given namepublic void createSecurityGroup(CloudSecurityGroup securityGroup)
CloudFoundryOperationscreateSecurityGroup in interface CloudFoundryOperationspublic void createSecurityGroup(String name, InputStream jsonRulesFile)
CloudFoundryOperationscf create-security-group SECURITY-GROUP PATH-TO-RULES-FILE
when using the cf command line. See the Application Security Group documentation for more details.
Example JSON-formatted rules file:
[
{
"protocol":"tcp",
"destination":"10.0.11.0/24",
"ports":"1-65535"
},
{
"protocol":"udp",
"destination":"10.0.11.0/24",
"ports":"1-65535"
}
]
This method requires the logged in user to have admin permissions in the cloud controller.createSecurityGroup in interface CloudFoundryOperationsname - the name for the security groupjsonRulesFile - An input stream that has a single array with JSON objects inside describing the ruleshttp://docs.cloudfoundry.org/adminguide/app-sec-groups.htmlpublic void updateSecurityGroup(CloudSecurityGroup securityGroup)
CloudFoundryOperationsupdateSecurityGroup in interface CloudFoundryOperationspublic void updateSecurityGroup(String name, InputStream jsonRulesFile)
CloudFoundryOperationscf update-security-group SECURITY-GROUP PATH-TO-RULES-FILE
when using the cf command line. See the Application Security Group documentation for more details.
Example JSON-formatted rules file:
[
{
"protocol":"tcp",
"destination":"10.0.11.0/24",
"ports":"1-65535"
},
{
"protocol":"udp",
"destination":"10.0.11.0/24",
"ports":"1-65535"
}
]
This method requires the logged in user to have admin permissions in the cloud controller.updateSecurityGroup in interface CloudFoundryOperationsjsonRulesFile - An input stream that has a single array with JSON objects inside describing the ruleshttp://docs.cloudfoundry.org/adminguide/app-sec-groups.htmlpublic void deleteSecurityGroup(String securityGroupName)
CloudFoundryOperationsdeleteSecurityGroup in interface CloudFoundryOperationspublic List<CloudSecurityGroup> getStagingSecurityGroups()
CloudFoundryOperationsgetStagingSecurityGroups in interface CloudFoundryOperationspublic void bindStagingSecurityGroup(String securityGroupName)
CloudFoundryOperationsbindStagingSecurityGroup in interface CloudFoundryOperationspublic void unbindStagingSecurityGroup(String securityGroupName)
CloudFoundryOperationsunbindStagingSecurityGroup in interface CloudFoundryOperationspublic List<CloudSecurityGroup> getRunningSecurityGroups()
CloudFoundryOperationsgetRunningSecurityGroups in interface CloudFoundryOperationspublic void bindRunningSecurityGroup(String securityGroupName)
CloudFoundryOperationsbindRunningSecurityGroup in interface CloudFoundryOperationspublic void unbindRunningSecurityGroup(String securityGroupName)
CloudFoundryOperationsunbindRunningSecurityGroup in interface CloudFoundryOperationspublic void bindSecurityGroup(String orgName, String spaceName, String securityGroupName)
CloudFoundryOperationsbindSecurityGroup in interface CloudFoundryOperationsorgName - The name of the organization that the space is in.spaceName - The name of the spacesecurityGroupName - The name of the security group to bind to the spacepublic void unbindSecurityGroup(String orgName, String spaceName, String securityGroupName)
CloudFoundryOperationsunbindSecurityGroup in interface CloudFoundryOperationsorgName - The name of the organization that the space is in.spaceName - The name of the spacesecurityGroupName - The name of the security group to bind to the spacepublic Map<String,CloudUser> getOrganizationUsers(String orgName)
CloudFoundryOperationsgetOrganizationUsers in interface CloudFoundryOperationsorgName - organization namepublic List<CloudSpace> getSpacesBoundToSecurityGroup(String securityGroupName)
CloudFoundryOperationsgetSpacesBoundToSecurityGroup in interface CloudFoundryOperationsCopyright © 2015. All rights reserved.