CS API 测试3

 

//添加二级存储
http://192.168.150.16:8080/client/api?
command=addSecondaryStorage&
zoneId=7e34afc4-61a4-49ee-8858-70522df42abe&
url=nfs%3A%2F%2F192.168.150.6%2Fopt%2Fprimary&response=json&sessionkey=VW3fC%2FX76%2FbQBRncVXlYRzPD520%3D&_=1381470577601

//列出指定二级存储
http://192.168.150.16:8080/client/api?
command=listHosts&type=SecondaryStorage&
id=487f4157-9540-403b-991d-d3e10bf342ea&response=json&sessionkey=VW3fC%2FX76%2FbQBRncVXlYRzPD520%3D&_=1381470163589

//删除二级存储
http://192.168.150.16:8080/client/api?
command=deleteHost&
id=487f4157-9540-403b-991d-d3e10bf342ea&response=json&sessionkey=VW3fC%2FX76%2FbQBRncVXlYRzPD520%3D&_=1381470217076

//主机进入维护模式
http://192.168.150.16:8080/client/api?command=prepareHostForMaintenance&
id=0cdf20ff-bb7d-4d8e-b3d7-30ff9859e3bb&response=json&sessionkey=VW3fC%2FX76%2FbQBRncVXlYRzPD520%3D&_=1381470399276

//主机取消维护模式
http://192.168.150.16:8080/client/api?command=cancelHostMaintenance&
id=0cdf20ff-bb7d-4d8e-b3d7-30ff9859e3bb&response=json&sessionkey=VW3fC%2FX76%2FbQBRncVXlYRzPD520%3D&_=1381470492626

//注册ISO
http://192.168.150.16:8080/client/api?command=registerIso
&response=json
&sessionkey=2HToAVfPaNLdJSNTVutvxcl8VeA%3D
&name=test
&displayText=test
&url=http%3A%2F%2F192.168.150.3%2Fshare%2Fiso%2FLinux%2Fubuntu%2Fubuntu-12.04.1-server-i386.iso
&zoneid=-1
&isextractable=true
&bootable=true
&osTypeId=0949b536-25a3-11e3-998e-005056893a8
&ispublic=true
&isfeatured=true
&_=1381803104124

//更新iso
http://192.168.150.16:8080/client/api?command=updateIso&response=json&sessionkey=H0vHWgShTt2nHMdu2GjLYkW%2B6O0%3D
&id=4365aca9-8ba3-46da-97e8-01244b04e013
&zoneid=7e34afc4-61a4-49ee-8858-70522df42abe
&name=ubuntu
&displaytext=test&
ostypeid=0949b536-25a3-11e3-998e-005056893a8d
&_=1381805482738

//下载iso
http://192.168.150.16:8080/client/api?command=extractIso
&mode=HTTP_DOWNLOAD
&id=4365aca9-8ba3-46da-97e8-01244b04e013
&zoneid=7e34afc4-61a4-49ee-8858-70522df42abe
&response=json&sessionkey=H0vHWgShTt2nHMdu2GjLYkW%2B6O0%3D&_=1381805592434

//删除iso
http://192.168.150.16:8080/client/api?command=deleteIso
&id=4365aca9-8ba3-46da-97e8-01244b04e013
&zoneid=7e34afc4-61a4-49ee-8858-70522df42abe
&response=json
&sessionkey=H0vHWgShTt2nHMdu2GjLYkW%2B6O0%3D
&_=1381805966527


//列出指定iso
http://192.168.150.16:8080/client/api?command=listIsos
&isofilter=self
&id=d3c9fd31-f5f4-4101-98dd-05fa69aed7c9
&zoneid=7e34afc4-61a4-49ee-8858-70522df42abe
&response=json&sessionkey=H0vHWgShTt2nHMdu2GjLYkW%2B6O0%3D&_=1381807756063

//列出操作系统类型
http://192.168.150.16:8080/client/api?command=listOsTypes

//注册iso
http://192.168.150.16:8080/client/api?command=attachIso
&virtualmachineid=eeb11189-a7d1-4b8c-a375-5433eb438ac5
&id=55823d67-8e54-453c-9561-f78ec1448f04
&response=json&sessionkey=S8jv2008m0ZhGiL1w6jbCLvc5X8%3D&_=1382076564067

//取消附加iso
http://192.168.150.16:8080/client/api?command=detachIso
&virtualmachineid=eeb11189-a7d1-4b8c-a375-5433eb438ac5
&response=json&sessionkey=S8jv2008m0ZhGiL1w6jbCLvc5X8%3D&_=1382078322710

//启用zone
http://192.168.150.16:8080/client/api?command=updateZone
&id=9075313f-e52f-47aa-a433-07038e2ef9a3
&allocationstate=Enabled
&response=json&sessionkey=PPf5zxaP2e8BPb%2FkQ5a3iX3VDZU%3D&_=1382082019067

//启用pod
http://192.168.150.16:8080/client/api?command=updatePod
&id=4849da8f-d7fb-4794-8fa5-732f28afc5a2
&allocationstate=Enabled
&response=json&sessionkey=PPf5zxaP2e8BPb%2FkQ5a3iX3VDZU%3D&_=1382085222213


//禁用Pod
http://192.168.150.16:8080/client/api?command=updatePod
&id=4849da8f-d7fb-4794-8fa5-732f28afc5a2
&allocationstate=Disabled
&response=json&sessionkey=PPf5zxaP2e8BPb%2FkQ5a3iX3VDZU%3D&_=1382085539242

//列出zone对应的网络方案
http://192.168.150.16:8080/client/api?command=listNetworkOfferings
&state=Enabled
&guestiptype=Shared
&response=json
&sessionkey=F8HTTXQ2%2FVFMCrg19G0WND%2BCp%2FI%3D&_=1382340940724

//主机启动维护模式 异步
http://192.168.150.16:8080/client/api?
command=prepareHostForMaintenance
&id=c40176e9-de2f-4056-a780-80feec3b43f9
&response=json
&sessionkey=a0WqYp7MMTvAwPoUAZxxNhwtDCU%3D&_=1382348836551

http://192.168.150.16:8080/client/api?command=queryAsyncJobResult
&jobId=ca8e1989-bae8-4bfc-bf2a-07b9a1d9391a
&response=json&sessionkey=Ntwq%2BcNj0XaW214JfJnF%2BuV2GyQ%3D&_=1382424626247

//取消维护模式
http://192.168.150.16:8080/client/api?command=cancelHostMaintenance
&id=0cdf20ff-bb7d-4d8e-b3d7-30ff9859e3bb
&response=json&sessionkey=Ntwq%2BcNj0XaW214JfJnF%2BuV2GyQ%3D&_=1382424715110
http://192.168.150.16:8080/client/api?command=queryAsyncJobResult
&jobId=4ab9a99d-0ecf-4512-88c1-22a0fa2a8f00
&response=json&sessionkey=Ntwq%2BcNj0XaW214JfJnF%2BuV2GyQ%3D&_=1382424718179

192.168.150.4

//删除主机
http://192.168.150.16:8080/client/api?command=deleteHost
&id=0cdf20ff-bb7d-4d8e-b3d7-30ff9859e3bb
&forced=false
&response=json
&sessionkey=Ntwq%2BcNj0XaW214JfJnF%2BuV2GyQ%3D&_=1382424989479

http://192.168.150.16:8080/client/api?command=addHost
&response=json&sessionkey=Ntwq%2BcNj0XaW214JfJnF%2BuV2GyQ%3D
------------------------------------------------------------------------------------------------------------------------

//删除集群
http://192.168.150.16:8080/client/api?command=deleteCluster
&id=25993bf0-8697-4731-9729-4434bb5ea831
&response=json&sessionkey=a0WqYp7MMTvAwPoUAZxxNhwtDCU%3D&_=1382348942855

http://192.168.150.16:8080/client/api?command=deleteHost&
id=c40176e9-de2f-4056-a780-80feec3b43f9
&forced=false
&response=json&sessionkey=a0WqYp7MMTvAwPoUAZxxNhwtDCU%3D&_=1382349038168

//删除集群
http://192.168.150.16:8080/client/api?command=deleteCluster
&id=82cc4042-151d-460b-b528-22c2ae7fc347
&response=json&sessionkey=a0WqYp7MMTvAwPoUAZxxNhwtDCU%3D&_=1382349105894

//添加集群
http://192.168.150.16:8080/client/api?command=addCluster
&zoneId=7e34afc4-61a4-49ee-8858-70522df42abe
&hypervisor=VMware
&clustertype=ExternalManaged
&podId=4ee1d013-12a6-4da2-b1f1-ac347955d2bd
&username=root
&password=vmware
&url=http%3A%2F%2F192.168.150.21%2Fsjcloud%2Fcloud&clustername=192.168.150.21%2Fsjcloud%2Fcloud&response=json&sessionkey=7vTCT8zy9y31tdbf0A7%2BCYIYmQ4%3D&_=1382434977516

转载于:https://www.cnblogs.com/heidsoft/p/3425811.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值