管理私有云:WebSphere CloudBurst Appliance 命令行界面简介
2009-09-28 00:00:00 来源:WEB开发网清单 6. 使用 JSON 创建一个新用户 - 命令
>>> cloudburst.users << {"username":"newuser", "fullname":"Pattern Deployer",
... "password":"password", "email":"newuser@mycompany.com"}
清单 7. 使用 JSON 创建一个新用户 - 输出
{
"currentmessage": "RM02013",
"currentmessage_text": "User has not logged in yet",
"currentstatus": "RM01062",
"currentstatus_text": "Inactive",
"email": "newuser@mycompany.com",
"fullname": "Pattern Deployer",
"groups": (nested object),
"id": 3,
"parts": (nested object),
"password": (write-only),
"patterns": (nested object),
"roles": (nested object),
"scripts": (nested object),
"username": "newuser",
"virtualimages": (nested object),
"virtualsystems": (nested object)
}
CLI 还提供了一个非常方便的 help 函数,您可以对资源、资源集合和这些项的方法调用该函数:
对于资源和资源集合,help 函数提供了项的简短摘要以及可用的属性和方法。
对于方法,help 提供了方法摘要和方法接受的输入。
清单 8 和 9 展示了如何使用 help 方法找到与某个管理程序资源相关的属性和方法。
清单 8. 使用 help 函数 - 命令
>>> help(cloudburst.hypervisors[0])
清单 9. 使用 help 函数 - 输出
A Hypervisor object represents a particular hypervisor defined on the
CloudBurst appliance. Use the Hypervisor object to query and
manipulate the hypervisor definition on the appliance. Attributes of
the hypervisor and relationships between the hypervisor and other
resources on the CloudBurst appliance are represented as Jython
attributes on the Hypervisor object. Manipulate these Jython
attributes using standard Jython mechanisms to make changes to the
corresponding data on the CloudBurst appliance.
Additional help is available for the following methods:
acceptCertificate, __contains__, __delattr__, delete, discover, __eq__,
__hash__, isMaintenance, isStarted, isStatusTransient, maintenance,
__nonzero__, refresh, __repr__, start, __str__, __unicode__, waitFor
Additional help is available for the following properties:
address, certificate, certified, cloud, created, currentmessage,
currentmessage_text, currentstatus, currentstatus_text, desiredstatus,
desiredstatus_text, id, name, networks, password, storage, type, updated,
userid
Remember to append an underscore to the property name when asking for
help using a specific instance of a resource rather than the class.
For example, "help(cloudburst.pattern.name)" or "help(mypattern.name_)"
will work, but "help(mypattern.name)" will resolve the name of the pattern
referenced by mypattern and attempt to provide help for the resulting
string rather than the property itself.
- ››管理/var/spool/clientmqueue/下的大文件
- ››WebSphere Application Server 7.0 XML Feature P...
- ››WebSphere 反向投资者: 解决 WebSphere Applicati...
- ››WebSphere sMash 的创新应用,第 2 部分: 借助包装...
- ››Websphere MQ v6集群的负载均衡新功能
- ››WebSphere Process Server V6.0.2 集群,第 2 部分...
- ››WebSphere Process Server V6.0.2 集群,第 1 部分...
- ››WebSphere MQ性能调优浅谈
- ››WebSphere配置资源库管理
- ››WebSphere中的SSL/TLS:用法、配置和性能
- ››websphere ejb远程/本地调用总结
- ››WebSphere Application Server对SIP的支持
更多精彩
赞助商链接