How Do I View Volumes Mounted to a ServiceCenter VM over an Interface Called by Running the curl Command

10

【Product�?
ManageOne ServiceCenter

【Version�?
3.X

【Question�?
How do I view volumes mounted to a ServiceCenter VM over an interface called by running the curl command?

【Answer�?
Example of viewing the volumes mounted to a VM over an interface:
curl -i -k -X GET 'https://192.168.51.14:543/goku/rest/v1.5/8c428de14e8a473c81651359f8780de5/vms/d8c31d9d-fd34-49e4-ab74-6071985b887b?cloud-infra=37&detailLevel=7' -H "User-Agent:HttpClient" -H "Content-Type:application/json" -H "Accept:application/json" -H "X-Auth-User-ID:3a526aa3134348ba9b8b00613e165eed" -H "X-HW-Cloud-Auth-Token:d2NjX2NyeXB0ATQxNDU1MzVGNDM0MjQzOzQ1MzkzOTQ0NDQ0NDM5NDQzODMzMzk0NTM2MzY0NjQ0MzgzMTQxMzAzODM5MzYzODM1NDIzNDMyMzI0MjQ2Mzk7OzMxMzAzMDMwO0Q1RUVBRUUwRjU2Nzg2QTM3Q0ZBRkI3QkIwNTBEQUQwOzgzNzFBNzlENjM4OUZERkM7" -d '{"cloud-infra":"37","detailLevel":"7"}'

[8c428de14e8a473c81651359f8780de5 indicates the VDC ID. d8c31d9d-fd34-49e4-ab74-6071985b887b indicates the VM ID. 3a526aa3134348ba9b8b00613e165eed indicates the account ID. The long string after X-HW-Cloud-Auth-Token is the token ID.]

----End

Other related questions:
How Do I View Volumes in a VDC over an Interface Called by Running the curl Command
【Product�? ManageOne ServiceCenter 【Version�? 3.X 【Question�? How do I view volumes in a VDC over an interface called by running the curl command? 【Answer�? Example of viewing all volumes in a VDC over an interface: curl -i -k -X POST 'https://192.168.51.14:543/goku/rest/v1.5/8c428de14e8a473c81651359f8780de5/volumes/action?cloud-infra=37' -H "User-Agent:HttpClient" -H "Content-Type:application/json" -H "Accept:application/json" -H "X-Auth-User-ID:3a526aa3134348ba9b8b00613e165eed" -H "X-HW-Cloud-Auth-Token:d2NjX2NyeXB0ATQxNDU1MzVGNDM0MjQzOzM4MzEzMTMzMzU0MzQ0MzA0MjQxNDIzNDMxNDUzODQ0MzIzMTQzMzYzNzMxMzQzMzMzMzMzMzM1MzQzODMwMzE7OzMxMzAzMDMwOzVDNjc4NDY3RUU5MzNDOUM0QzBCNDkzQTgwRENFRUZGO0U4OUU2ODYwMUU5M0UzNUI7" -d '{"list":{"start":null,"limit":10}}' The following parameters may vary depending on the site planning: [8c428de14e8a473c81651359f8780de5 indicates the VDC ID. X-Auth-User-ID indicates the user ID. The long string after X-HW-Cloud-Auth-Token indicates the token ID.] ----End

How Do I Create a ServiceCenter VM over an Interface Called by Running the curl Command
【Product�? ManageOne ServiceCenter 【Version�? 3.X 【Question�? How do I create a ServiceCenter VM over an interface called by running the curl command? 【Answer�? Example of creating a VM over an interface: curl -i -k -X POST 'https://162.162.226.188:543/goku/rest/v1.5/1f4ce7b64fcc4621bb77982139723587/orders' -H "User-Agent:HttpClient" -H "Content-Type:application/json" -H "Accept:application/json" -H "X-Auth-User-ID:679e6b0a99564352b6622dd965ac2d18" -H "X-HW-Cloud-Auth-Token:d2NjX2NyeXB0ATQxNDU1MzVGNDM0MjQzOzMzNDM0MzM1NDUzOTQzNDY0NjQ1MzAzODQ1NDMzNDM5NDY0MzM3MzkzMTM4MzkzODM0NDM0MjMzMzkzNzM4NDE7OzMxMzAzMDMwOzhDQUMzODM3MjAzQTg2NkE0NjkzRjM3OTk4Mjc3NTI2OzQxODUyQTNEQ0VFRTdDQ0Y7" -d '{"apply":{"serviceOfferingId":"default-service-offering-corevm","params":"{\"cloudInfraId\":\"38\",\"availableZoneId\":\"az1.dc1\",\"templateId\":\"62c3b355-8adc-42c4-b42e-05100c9b3681\",\"templateInfo\":{\"vmtName\":\"image_local_oc\",\"osType\":\"Linux\",\"osVersion\":\"Novell SUSE Linux Enterprise Server 11 SP3 64bit\"},\"isSupportDr\":false,\"vpcId\":\"7a1f4af8-71b9-43e5-a753-ca2f75a64515\",\"vpcName\":\"vpcL1\",\"vmSpec\":{\"id\":\"a922fdc0-3d69-4887-b0f5-4dce2c9e3bfb\",\"name\":\"flavor_local_oc\",\"cpu\":{\"count\":16},\"memory\":{\"count\":32768},\"diskTotalSize\":1500,\"userVols\":[],\"nics\":[{\"networkType\":\"vpcNetwork\",\"$$hashKey\":\"object:1064\",\"networkID\":\"fd8b8fdd-4a55-42f4-9e5b-9f1b383deeec\",\"networkViewName\":\"netL1 (DHCP allocation / 13.13.13.0 / VXLAN ID: 9988)\",\"ipv4\":\"\",\"ipv6\":\"\",\"vpcNetworkType\":\"inner\",\"portTypeId\":\"normal\",\"portType\":\"normal\",\"portTypeName\":\"Common software switch\",\"Qos\":{},\"qosId\":\"\"}],\"isStartFromVolume\":false,\"slaLabels\":[]},\"vmUniqueInfo\":[{\"customNic\":[{}]}],\"businessTag\":{\"id\":\"\",\"name\":\"\"},\"count\":1,\"fspVersion\":\"6.0\",\"numaOpts\":0,\"name\":\"ygq001\",\"vmAttribute\":{\"serverGroupId\":\"\",\"serverGroupName\":\"\",\"serverGroupPolicy\":\"\"}}","tenancy":"0","isValid":"false"},"comments":""}' [count indicates the number of VMs to be created. templateId indicates the VM template ID. isSupportDr indicates whether to support DR. vpcId indicates the VPC ID. vpcName indicates the VPC name. networkID indicates the network ID. mediaType indicates the storage SLA.] ----End

How Do I Mount a ServiceCenter Cloud Hard Disk over an Interface Called by Running the curl Command
【Product�? ManageOne ServiceCenter 【Version�? 3.X 【Question�? How do I mount a ServiceCenter cloud hard disk over an interface called by running the curl command? 【Answer�? Example of mounting a cloud hard disk over an interface: curl -i -k -X POST 'https://192.168.51.14:543/goku/rest/v1.5/8c428de14e8a473c81651359f8780de5/volumes/b9e96968-38f2-48ce-ba76-6d802b6d2af7/action?cloud-infra=37' -H "User-Agent:HttpClient" -H "Content-Type:application/json" -H "Accept:application/json" -H "X-Auth-User-ID:3a526aa3134348ba9b8b00613e165eed" -H "X-HW-Cloud-Auth-Token:d2NjX2NyeXB0ATQxNDU1MzVGNDM0MjQzOzM3MzYzMzQ1NDYzMjMxNDY0MjM1MzYzMTQxMzU0MzQ1MzYzMzM0MzczNTQ2NDEzMjM4MzgzNzQ2Mzk0MTMwNDM7OzMxMzAzMDMwOzE1OTg3QzNDNTRDNkYwQkY4QjE3OTVGNDBDREZDNkFGOzQzRTRDQjFENzlGRjI4QkU7" -d '{"mount":{"vmId":"ae873bbb-1d04-485e-81df-e55dab0a4f01"}}' [8c428de14e8a473c81651359f8780de5 indicates the VDC ID. b9e96968-38f2-48ce-ba76-6d802b6d2af7 indicates the cloud hard disk ID. vmId (eg:ae873bbb-1d04-485e-81df-e55dab0a4f01) indicates the VM ID.] ----End

How Do I Obtain the ServiceCenter Token over an Interface Called by Running the curl Command
【Product�? ManageOne ServiceCenter 【Version�? 3.X 【Question�? How do I obtain the ServiceCenter token over an interface called by running the curl command? 【Answer�? Example of obtaining the token over an interface: Obtaining the token as user Cloud_admin curl -i -k -X POST 'https://162.162.226.188:643/goku/rest/v1.5/tokens' -H "User-Agent:HttpClient" -H "Content-Type:application/json" -H "Accept:application/json" -d '{"userName":"cloud_admin","password":"FusionSphere123","loginScene":"1"}' Obtaining the token as a VDC administrator curl -i -k -X POST 'https://162.162.226.166:543/goku/rest/v1.5/tokens' -H "User-Agent:HttpClient" -H "Content-Type:application/json" -H "Accept:application/json" -d '{"userName":"ygq_user16601","password":"Huawei@1234","loginScene":"2"}' ----End

How Do I Create ServiceCenter Cloud Hard Disks over an Interface Called by Running the curl Command
【Product�? ManageOne ServiceCenter 【Version�? 3.X 【Question�? How do I create ServiceCenter cloud hard disks over an interface called by running the curl command? 【Answer�? Example of creating cloud hard disks over an interface: curl -i -k -X POST 'https://192.168.51.14:543/goku/rest/v1.5/8c428de14e8a473c81651359f8780de5/orders' -H "User-Agent:HttpClient" -H "Content-Type:application/json" -H "Accept:application/json" -H "X-Auth-User-ID:3a526aa3134348ba9b8b00613e165eed" -H "X-HW-Cloud-Auth-Token:d2NjX2NyeXB0ATQxNDU1MzVGNDM0MjQzOzM3MzYzMzQ1NDYzMjMxNDY0MjM1MzYzMTQxMzU0MzQ1MzYzMzM0MzczNTQ2NDEzMjM4MzgzNzQ2Mzk0MTMwNDM7OzMxMzAzMDMwOzE1OTg3QzNDNTRDNkYwQkY4QjE3OTVGNDBDREZDNkFGOzQzRTRDQjFENzlGRjI4QkU7" -d '{"apply":{"serviceOfferingId":"default-service-offering-volume","params":"{\"cloudInfraId\":\"37\",\"availableZoneId\":\"az1.dc1\",\"vmId\":null,\"vmName\":\"\",\"count\":\"1\",\"size\":\"20\",\"name\":\"volume-efa9\",\"type\":\"normal\",\"mediaType\":\"fusionstorage\",\"srcResSize\":1,\"srcRes\":{\"srcResType\":null,\"srcResId\":null,\"srcResName\":null},\"volumeId\":null,\"snapshotId\":null}","tenancy":"0","isValid":"false"},"comments":""}' [8c428de14e8a473c81651359f8780de5 indicates the VDC ID. serviceOfferingId (eg:default-service-offering-volume) indicates the service ID. name (eg:volume-efa9) indicates the cloud hard disk name.] ----End

If you have more questions, you can seek help from following ways:
To iKnow To Live Chat
Scroll to top