<?xml version="1.0" encoding="UTF-8"?>
<con:resource name="/resources/hosts" path="/resources/hosts" id="90aed25e-04e1-4451-9576-69802cfc03ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:con="http://eviware.com/soapui/config">
  <con:settings>
    <con:setting id="90aed25e-04e1-4451-9576-69802cfc03eefileName">%2Fresources%2Fhosts</con:setting>
  </con:settings>
  <con:parameters/>
  <con:method name="GET" id="c0b143b2-7237-4f6a-9743-4fc25baae01e" method="GET">
    <con:description>get hosts list
Show all hosts list in TiEM</con:description>
    <con:settings/>
    <con:parameters>
      <con:parameter>
        <con:name>arch</con:name>
        <con:style>QUERY</con:style>
        <con:description xsi:nil="true"/>
      </con:parameter>
      <con:parameter>
        <con:name>hostId</con:name>
        <con:style>QUERY</con:style>
        <con:description xsi:nil="true"/>
      </con:parameter>
      <con:parameter>
        <con:name>hostIp</con:name>
        <con:style>QUERY</con:style>
        <con:description xsi:nil="true"/>
      </con:parameter>
      <con:parameter>
        <con:name>loadStat</con:name>
        <con:style>QUERY</con:style>
        <con:description xsi:nil="true"/>
      </con:parameter>
      <con:parameter>
        <con:name>page</con:name>
        <con:style>QUERY</con:style>
        <con:dataType>integer</con:dataType>
        <con:description>Current page location</con:description>
      </con:parameter>
      <con:parameter>
        <con:name>pageSize</con:name>
        <con:style>QUERY</con:style>
        <con:dataType>integer</con:dataType>
        <con:description>Number of this request</con:description>
      </con:parameter>
      <con:parameter>
        <con:name>purpose</con:name>
        <con:style>QUERY</con:style>
        <con:description xsi:nil="true"/>
      </con:parameter>
      <con:parameter>
        <con:name>rack</con:name>
        <con:style>QUERY</con:style>
        <con:description xsi:nil="true"/>
      </con:parameter>
      <con:parameter>
        <con:name>region</con:name>
        <con:style>QUERY</con:style>
        <con:description xsi:nil="true"/>
      </con:parameter>
      <con:parameter>
        <con:name>status</con:name>
        <con:style>QUERY</con:style>
        <con:description xsi:nil="true"/>
      </con:parameter>
      <con:parameter>
        <con:name>zone</con:name>
        <con:style>QUERY</con:style>
        <con:description xsi:nil="true"/>
      </con:parameter>
    </con:parameters>
    <con:representation type="RESPONSE">
      <con:mediaType>application/json</con:mediaType>
      <con:status>200</con:status>
      <con:params/>
      <con:sampleContent>{
  "controller.ResultWithPage" : {
    "code" : 0,
    "data" : { },
    "message" : "string",
    "page" : {
      "page" : 0,
      "pageSize" : 0,
      "total" : 0
    }
  },
  "data" : {
    "hosts" : [ {
      "arch" : "string",
      "az" : "string",
      "clusterType" : "string",
      "cpuCores" : 0,
      "createTime" : 0,
      "diskType" : "string",
      "disks" : [ {
        "capacity" : 0,
        "diskId" : "string",
        "hostId" : "string",
        "name" : "string",
        "path" : "string",
        "status" : "string",
        "type" : "string"
      } ],
      "freeCpuCores" : 0,
      "freeMemory" : 0,
      "hostId" : "string",
      "hostName" : "string",
      "ip" : "string",
      "kernel" : "string",
      "loadStat" : "string",
      "memory" : 0,
      "nic" : "string",
      "os" : "string",
      "passwd" : "string",
      "purpose" : "string",
      "rack" : "string",
      "region" : "string",
      "reserved" : true,
      "spec" : "string",
      "status" : "string",
      "sysLabels" : [ "string" ],
      "traits" : 0,
      "updateTime" : 0,
      "userName" : "string"
    } ]
  }
}</con:sampleContent>
    </con:representation>
    <con:representation type="REQUEST">
      <con:mediaType>application/json</con:mediaType>
      <con:params/>
    </con:representation>
    <con:request name="Request 1" id="c95001c8-153f-4a58-a802-c49e3c4273a2" mediaType="application/json">
      <con:settings/>
      <con:endpoint>http://172.16.4.134:4100</con:endpoint>
      <con:credentials>
        <con:selectedAuthProfile>No Authorization</con:selectedAuthProfile>
        <con:authType>No Authorization</con:authType>
      </con:credentials>
      <con:parameters/>
    </con:request>
  </con:method>
  <con:method name="POST" id="b7d42dc7-45fe-453e-8f5f-522e6e31aa2e" method="POST">
    <con:description>import hosts by xlsx file
Import a batch of hosts to TiEM</con:description>
    <con:settings/>
    <con:parameters>
      <con:parameter>
        <con:name>hostReserved</con:name>
        <con:value>false</con:value>
        <con:style>QUERY</con:style>
        <con:default>false</con:default>
        <con:description>whether hosts are reserved(won't be allocated) after import</con:description>
      </con:parameter>
      <con:parameter>
        <con:name>skipHostInit</con:name>
        <con:value>false</con:value>
        <con:style>QUERY</con:style>
        <con:default>false</con:default>
        <con:description>whether to skip host init steps</con:description>
      </con:parameter>
      <con:parameter>
        <con:name>ignorewarns</con:name>
        <con:value>false</con:value>
        <con:style>QUERY</con:style>
        <con:default>false</con:default>
        <con:description>whether to ignore warings in init steps</con:description>
      </con:parameter>
      <con:parameter required="true">
        <con:name>file</con:name>
        <con:style>QUERY</con:style>
        <con:description>hosts information in a xlsx file</con:description>
      </con:parameter>
    </con:parameters>
    <con:representation type="RESPONSE">
      <con:mediaType>application/json</con:mediaType>
      <con:status>200</con:status>
      <con:params/>
      <con:sampleContent>{
  "controller.CommonResult" : {
    "code" : 0,
    "data" : { },
    "message" : "string"
  },
  "data" : {
    "flowInfo" : [ {
      "workFlowId" : "string"
    } ],
    "hostIds" : [ "string" ]
  }
}</con:sampleContent>
    </con:representation>
    <con:representation type="REQUEST">
      <con:mediaType>multipart/form-data</con:mediaType>
      <con:params/>
    </con:representation>
    <con:request name="Request 1" id="491da64e-b16e-428e-b478-0a5e60165c8d" mediaType="application/json">
      <con:settings/>
      <con:endpoint>http://172.16.4.134:4100</con:endpoint>
      <con:credentials>
        <con:selectedAuthProfile>No Authorization</con:selectedAuthProfile>
        <con:authType>No Authorization</con:authType>
      </con:credentials>
      <con:parameters/>
    </con:request>
  </con:method>
  <con:method name="DELETE" id="7dfc36c3-02f5-40d2-9c1d-d29bc1ada6f6" method="DELETE">
    <con:description>remove hosts by a list
Remove a batch of hosts</con:description>
    <con:settings/>
    <con:parameters/>
    <con:representation type="REQUEST">
      <con:mediaType>application/json</con:mediaType>
      <con:params/>
      <con:sampleContent>{
  "force" : true,
  "hostIds" : [ "string" ]
}</con:sampleContent>
    </con:representation>
    <con:representation type="RESPONSE">
      <con:mediaType>application/json</con:mediaType>
      <con:status>200</con:status>
      <con:params/>
      <con:sampleContent>{
  "controller.CommonResult" : {
    "code" : 0,
    "data" : { },
    "message" : "string"
  },
  "data" : {
    "flowInfo" : [ {
      "workFlowId" : "string"
    } ]
  }
}</con:sampleContent>
    </con:representation>
    <con:representation type="REQUEST">
      <con:mediaType>application/json</con:mediaType>
      <con:params/>
    </con:representation>
    <con:request name="Request 1" id="cb3e5076-36af-4fd7-a380-bd4002bc38aa" mediaType="application/json">
      <con:settings/>
      <con:endpoint>http://172.16.4.134:4100</con:endpoint>
      <con:request>{
  "force" : true,
  "hostIds" : [ "string" ]
}</con:request>
      <con:credentials>
        <con:selectedAuthProfile>No Authorization</con:selectedAuthProfile>
        <con:authType>No Authorization</con:authType>
      </con:credentials>
      <con:parameters/>
    </con:request>
  </con:method>
</con:resource>
