Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 586143 Details for
Bug 824129
JON CLI - Parameters to exec command not parsed correctly when using quotes
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
A library script
paas.js (text/javascript), 5.40 KB, created by
Jochen Cordes
on 2012-05-22 19:36:40 UTC
(
hide
)
Description:
A library script
Filename:
MIME Type:
Creator:
Jochen Cordes
Created:
2012-05-22 19:36:40 UTC
Size:
5.40 KB
patch
obsolete
> /** > * */ > > function findGroup(groupName){ > var resourceGroupCriteria = new ResourceGroupCriteria; > var group = null; > > resourceGroupCriteria.addFilterName(groupName); > resourceGroupCriteria.fetchExplicitResources(false); > > var resourceGroups = ResourceGroupManager.findResourceGroupsByCriteria(resourceGroupCriteria); > > if (resourceGroups != null && resourceGroups.size() > 0){ > group = resourceGroups.get(0); > } > > return group; > } > > /** > * */ > > function getResourceType(typeName, pluginName){ > var resourceType = ResourceTypeManager.getResourceTypeByNameAndPlugin(typeName, pluginName); > > return resourceType; > } > > /** > * */ > > function createGroup(groupName, resourceType, description){ > var resourceGroup = new ResourceGroup(groupName, resourceType); > > resourceGroup.setRecursive(false); > resourceGroup.setDescription(description); > > ResourceGroupManager.createResourceGroup(resourceGroup); > } > > /** > * */ > > function deleteGroup(groupId){ > ResourceGroupManager.deleteResourceGroup(groupId); > } > > /** > * */ > function findWebAppServerInstance(webAppServerInstanceName){ > var webAppServerInstanceCriteria = new ResourceCriteria; > var webAppServerInstance = null; > > webAppServerInstanceCriteria.addFilterName(webAppServerInstanceName); > > var webAppServerInstances = ResourceManager.findResourcesByCriteria(webAppServerInstanceCriteria); > > if (webAppServerInstance != null && webAppServerInstances.size() > 0) > webAppServerInstance = webAppServerInstances.get(0); > > return webAppServerInstance; > } > > /** > * */ > > function addWebAppServerInstanceToGroup(webAppServerInstanceName, groupName){ > var webAppServerInstance = findWebAppServerInstance(webAppServerInstanceName); > var group = findGroup(groupName); > > ResourceGroupManager.addResourcesToGroup(group.getId(),[webAppServerInstance.getId()]); > } > > /** > * */ > function stopWebAppServerInstance(webAppServerInstanceName){ > scheduleOperationOnWebAppServerInstance(webAppServerInstanceName, "shutdown"); > } > > /** > * */ > function startWebAppServerInstance(webAppServerInstanceName){ > scheduleOperationOnWebAppServerInstance(webAppServerInstanceName, "startup"); > } > > /** > * * */ > function restartWebAppServerInstance(webAppServerInstanceName){ > scheduleOperationOnWebAppServerInstance(webAppServerInstanceName, "restart"); > } > > /** > * */ > function scheduleOperationOnWebAppServerInstance(webAppServerInstanceName, operationName){ > var webAppServerInstance = findWebAppServerInstance(webAppServerInstanceName); > > if (webAppServerInstance == null) > return; > > var conf = new Configuration; > var schedule = OperationManager.scheduleResourceOperation(webAppServerInstance.getId(), operationName, 0, 0, 0, 0, conf, null); > now we need to wait for all the individual operations on resources to complete > var crit = new GroupOperationHistoryCriteria; > crit.addFilterJobId(new JobId(schedule.jobName, schedule.jobGroup)); > > while (true) { > java.lang.Thread.currentThread().sleep(5000); > > var results = OperationManager.findGroupOperationHistoriesByCriteria(crit); > > if (results.empty) { > throw "Could not find operation history for schedule " + schedule + ". This should not happen."; > } > > var history = results.get(0); > > if (history.status != OperationRequestStatus.INPROGRESS) { > return history; > } > } > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 824129
:
586140
|
586141
| 586143