1 2 3 4 5 | cbadmin = cloudburst.users.cbadmin[0] for pattern in cloudburst.patterns: if pattern.owner == cbadmin: print pattern |
1 2 | C:\cloudburst\cloudburst.cli\bin>cloudburst.bat -h mycloudburst.com -u cloudburstUser -p password -f findAdminPatterns.jy |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | { "acl": (nested object), "advancedoptions": (nested object), "created": May 13, 2009 1:29:03 PM, "currentmessage": None, "currentmessage_text": None, "currentstatus": "RM01028", "currentstatus_text": "Read-only", "description": "Single server is a WebSphere Application Server topology or pa rt of a WebSphere Application Server Network Deployment topology. The single no de can be used for a development environment, or as part of a multiple node, pro duction environment in which the application configuration is manually duplicate d.", "id": 1, "name": "WebSphere single server", "owner": (nested object), "parts": (nested object), "updated": May 13, 2009 1:29:40 PM, "validationmessage": "RM10051", "validationmessage_text": "OK", "validationstatus": "RM01001", "validationstatus_text": "Defined", "virtualimage": (nested object), "virtualsystems": (nested object) } |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | #first create the new script package newScript = cloudburst.scripts << {'name':'Install My App'} newScript.archive.set('c:\\apps\\myapp\\installMyApp.zip') newScript.command = '${WAS_PROFILE_ROOT}/bin/wsadmin.sh' newScript.location = '/opt/tmp/myapp' newScript.log = '/opt/tmp/myapp/logs' newScript.commandargs = '-f /opt/tmp/myapp/installMyApp.jacl' # now create the cluster pattern patternName = 'My Cluster Pattern' description = 'Cluster with custom application installed' virtualImage = cloudburst.virtualimages['WebSphere Application Server 7.0.0.3'][0] newPattern = cloudburst.patterns << {'name': patternName, 'description': description, 'virtualimage': virtualImage} # create Dmgr part and add script package dmgrPart = cloudburst.parts['Deployment manager'][0] dmgrPpart = newPattern.parts << dmgrPart dmgrPpart.scripts << newScript # add a script that configures the IBM HTTP Server on the same node as the Dmgr dmgrPpart.scripts << cloudburst.scripts['AddIhsNode'][0] # create two custom nodes for the cluster customNodePart = cloudburst.parts['Custom node'][0] customNodePpart = newPattern.parts << customNodePart customNodePpart.count = 2 |
欢迎光临 电子技术论坛_中国专业的电子工程师学习交流社区-中电网技术论坛 (http://bbs.eccn.com/) | Powered by Discuz! 7.0.0 |