Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Apr 28th, 2012  |  syntax: None  |  size: 1.77 KB  |  hits: 12  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. #!/bin/sh
  2. SERVER_HOST=10.10.10.101
  3. RS_HOST=10.10.10.102
  4. V2V_HOST=10.10.10.103
  5.  
  6. curl --verbose --user admin:xabiquo "http://$SERVER_HOST/api/admin/datacenters/" \
  7.       -X "POST" \
  8.       -H "Content-type:application/xml" \
  9.       -H "Accept:application/xml" \
  10.       -d "<datacenter>
  11.               <name>datacenter_example</name>
  12.               <location>Redwood</location>
  13.               <ramSoft>0</ramSoft>
  14.               <cpuSoft>0</cpuSoft>
  15.               <vlanSoft>0</vlanSoft>
  16.               <remoteServices>
  17.                   <remoteService>
  18.                       <type>VIRTUAL_FACTORY</type>
  19.                       <uri>http://$RS_HOST/virtualfactory</uri>
  20.                   </remoteService>
  21.                   <remoteService>
  22.                       <type>STORAGE_SYSTEM_MONITOR</type>
  23.                       <uri>http://$RS_HOST/ssm</uri>
  24.                   </remoteService>
  25.                   <remoteService>
  26.                       <type>VIRTUAL_SYSTEM_MONITOR</type>
  27.                       <uri>http://$RS_HOST/vsm</uri>
  28.                   </remoteService>
  29.                   <remoteService>
  30.                       <type>NODE_COLLECTOR</type>
  31.                       <uri>http://$RS_HOST/nodecollector</uri>
  32.                   </remoteService>
  33.                   <remoteService>
  34.                       <type>APPLIANCE_MANAGER</type>
  35.                       <uri>http://$RS_HOST/am</uri>
  36.                   </remoteService>
  37.                   <remoteService>
  38.                       <type>DHCP_SERVICE</type>
  39.                       <uri>omapi://$RS_HOST:7911</uri>
  40.                   </remoteService>
  41.                   <remoteService>
  42.                       <type>BPM_SERVICE</type>
  43.                       <uri>tcp://$V2V_HOST:61616</uri>
  44.                   </remoteService>
  45.               </remoteServices>
  46.           </datacenter>"