How Do I Obtain the VM Specifications Template Information over an Interface on the ServiceCenter Server

8

【Product�?
ManageOne ServiceCenter

【Version�?
3.X

【Question�?
How do I obtain the VM specifications template information over an interface on the ServiceCenter server?

【Answer�?
The VM specifications template information is as follows:
curl -i -k -X GET 'https://162.162.167.2:543/goku/rest/v1.5/237ad39f47154084b339be69b3b766dd/vm-flavors?cloud-infra=36&azid=az1.dc1&isFromChange=true' -H "User-Agent:HttpClient" -H "Content-Type:application/json" -H "Accept:application/json" -H "X-Auth-User-ID: 8044e196d6a84e998d71bfbf82426e6d" -H "X-HW-Cloud-Auth-Token: d2NjX2NyeXB0ATQxNDU1MzVGNDM0MjQzOzQ1Mzk0NDQ0MzEzMDQ0MzgzMTMxNDYzMTM4MzUzMTQ0MzQ0MzM1NDU0NjM3MzEzOTM3MzIzNzQyNDQ0NjQ0NDE7OzMxMzAzMDMwO0RBNTg2OEI4NDlGMjI0MkM2MDE3QzREMjJBQkJERDA2OzYwODg5MzBDOTkxN0M0RTE7"

----End

Other related questions:
How Do I Query the VM List over an Interface on the ServiceCenter Server
【Product�? ManageOne ServiceCenter 【Version�? 3.X 【Question�? How do I query the VM list over an interface on the ServiceCenter server? 【Answer�? Example curl command of querying the VM list: curl -i -k -X POST 'https://162.162.167.2:543/goku/rest/v1.5/237ad39f47154084b339be69b3b766dd/vms/action?cloud-infra=36' -H "User-Agent:HttpClient" -H "Content-Type:application/json" -H "Accept:application/json" -H "X-Auth-User-ID: 8044e196d6a84e998d71bfbf82426e6d" -H "X-HW-Cloud-Auth-Token: d2NjX2NyeXB0ATQxNDU1MzVGNDM0MjQzOzQyMzg0MzM0NDQ0NTM3MzgzNTQyMzczMTQyNDU0NTMwMzEzNzMwMzEzMzQ1MzUzMDM0NDMzNzMwNDI0MTQzMzU7OzMxMzAzMDMwOzVBRTYwQ0E3QTBDRTQxMTBCREY3QTBENkRCQjIzNjcxO0Q3NzJFRUJCRjhENjBGNjc7" -d'{"list":{"start":"","limit":11,"detail":0,"notTagsAny":"__type_baremetal","status":[""],"detailLevel":1,"availableZoneId":"","condition":""}}'' The following parameters may vary depending on the site planning: ad39f47154084b339be69b3b766dd: specifies the ID of a VDC. X-Auth-User-ID: specifies the ID of a user account. The long string after X-HW-Cloud-Auth-Token specifies 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 Unmount a Cloud Hard Disk over an Interface on the ServiceCenter Server
【Product�? ManageOne ServiceCenter 【Version�? 3.X 【Question�? How do I unmount a cloud hard disk over an interface on the ServiceCetner server? 【Answer�? Example curl command of unmounting 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:d2NjX2NyeXB0ATQxNDU1MzVGNDM0MjQzOzQ1MzkzOTQ0NDQ0NDM5NDQzODMzMzk0NTM2MzY0NjQ0MzgzMTQxMzAzODM5MzYzODM1NDIzNDMyMzI0MjQ2Mzk7OzMxMzAzMDMwO0Q1RUVBRUUwRjU2Nzg2QTM3Q0ZBRkI3QkIwNTBEQUQwOzgzNzFBNzlENjM4OUZERkM7" -d '{"unmount":{"vmId":"d8c31d9d-fd34-49e4-ab74-6071985b887b"}}' The following parameters may vary depending on the site planning: In the URL: [8c428de14e8a473c81651359f8780de5 indicates the VDC ID. vmID indicates the VM ID. b9e96968-38f2-48ce-ba76-6d802b6d2af7 indicates the ID of the cloud hard disk to be unmounted. X-Auth-User-ID indicates the user ID. The long string after X-HW-Cloud-Auth-Token indicates the token ID. d8c31d9d-fd34-49e4-ab74-6071985b887b indicates ID of the VM where the cloud hard disk is to be unmounted. ----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 View Volumes Mounted to a ServiceCenter VM over an Interface Called by Running the curl Command
【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

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