您的位置:首页 > 其它

如何使用RED HAT CLOUDFORMS REST API 简述

2017-06-02 15:47 295 查看
点击打开链接 https://access.redhat.com/documentation/en-us/red_hat_cloudforms/4.1/html-single/red_hat_cloudforms_rest_api/


Provision Request
POST
/api/provision_requests
 
Provision Requests
POST
/api/provision_requests
举例说明,结合使用文档简述:

POST=> https://cfme.ose.org/api/provision_requests
POST  clone_vm_restapi
 https://cfme.ose.org/api/provision_requests 
HEADERS

X-Auth-Token      /  61564cce0a16cd53b9243826dae44a5e
Content-Type     /   application/x-www-form-urlencoded
Authorization    /   Basic YWRtaW46c21hcnR2bQ==

BODY


{"version": "1.1",
"template_fields": {
"guid": "8bba4394-e05f-11e6-8900-0050568176b3",
"request_type": "template"
},
"vm_fields": { --哪此字段放在这里,文档都有说明,并且字段类型,默认值都有说明
"sysprep_server_license_mode": "perServer",
"sysprep_identification": "domain",
"sysprep_per_server_max_connections": "5",
"sysprep_workgroup_name": "WORKGROUP",
"addr_mode": "dhcp",
"sysprep_change_sid": true,
"sysprep_auto_logon": true,
"sysprep_enabled": "disabled",
"sysprep_auto_logon_count": 1,
"placement_auto": true,
"number_of_vms": 1,
"vm_name": "01test-shl-lei",
"provision_type": "vmware",
"vm_auto_start": true,
"retirement": 0,
"retirement_warn": 604800,
"vlan": "VM Network",
"disk_format": "thin",
"cpu_limit": -1,
"memory_limit": -1,
"number_of_sockets": 1,
"cores_per_socket": 1,
"cpu_reserve": 0,
"vm_memory": "2048",
"memory_reserve": 0,
"network_adapters": 1,
"schedule_type": "immediately"
},
"requester": {
"owner_first_name": "d",
"owner_last_name": "b",
"owner_email": "db@test.com",
"auto_approve": true,
"placement_auto": false
},
"tags": {},
"additional_values": {
"placement_dc_name": 200000000000012,
"placement_cluster_name": 200000000000001,
"placement_rp_name": 200000000000001,
"placement_folder_name": 200000000000010,
"placement_host_name": 200000000000004,
"placement_ds_name": 200000000000019
},
"ems_custom_attributes": null,
"miq_custom_attributes": null
}




内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: