
Untitled
By: a guest on
Apr 28th, 2012 | syntax:
None | size: 1.77 KB | hits: 12 | expires: Never
#!/bin/sh
SERVER_HOST=10.10.10.101
RS_HOST=10.10.10.102
V2V_HOST=10.10.10.103
curl --verbose --user admin:xabiquo "http://$SERVER_HOST/api/admin/datacenters/" \
-X "POST" \
-H "Content-type:application/xml" \
-H "Accept:application/xml" \
-d "<datacenter>
<name>datacenter_example</name>
<location>Redwood</location>
<ramSoft>0</ramSoft>
<cpuSoft>0</cpuSoft>
<vlanSoft>0</vlanSoft>
<remoteServices>
<remoteService>
<type>VIRTUAL_FACTORY</type>
<uri>http://$RS_HOST/virtualfactory</uri>
</remoteService>
<remoteService>
<type>STORAGE_SYSTEM_MONITOR</type>
<uri>http://$RS_HOST/ssm</uri>
</remoteService>
<remoteService>
<type>VIRTUAL_SYSTEM_MONITOR</type>
<uri>http://$RS_HOST/vsm</uri>
</remoteService>
<remoteService>
<type>NODE_COLLECTOR</type>
<uri>http://$RS_HOST/nodecollector</uri>
</remoteService>
<remoteService>
<type>APPLIANCE_MANAGER</type>
<uri>http://$RS_HOST/am</uri>
</remoteService>
<remoteService>
<type>DHCP_SERVICE</type>
<uri>omapi://$RS_HOST:7911</uri>
</remoteService>
<remoteService>
<type>BPM_SERVICE</type>
<uri>tcp://$V2V_HOST:61616</uri>
</remoteService>
</remoteServices>
</datacenter>"