1. Home
  2. Corporate Node
  3. SOAP requests
  4. addSlaves

addSlaves

Operation addSlaves is used to add new slaves.

If CNode is working in master mode (more info in How to run? page), we can add new slave (station which can copy of user application can be run) to CNode-master using addSlaves request.

Request should contain pair of network addresses – internal CNode address and SOAP address – usually IP addresses will be the same, and ports will differ.
Operation progress and result can be checked using getTaskStatus request. When slave is successfully added, user is able to run copy of own CNode on it.

Example SOAP request:

<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="ns1">
   <soapenv:Header/>
   <soapenv:Body>
      <ns1:addSlaves soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
         <newSlaves xsi:type="ns1:slaveLocationList">
            <!--Zero or more repetitions:-->
            <item xsi:type="ns1:slaveLocation">
               <soapAddress xsi:type="ns1:ipLocation">
                  <ip xsi:type="xsd:string">192.168.3.192</ip>
                  <port xsi:type="xsd:unsignedShort">9600</port>
               </soapAddress>
               <applicationAddress xsi:type="ns1:ipLocation">
                  <ip xsi:type="xsd:string">192.168.3.192</ip>
                  <port xsi:type="xsd:unsignedShort">30200</port>
               </applicationAddress>
            </item>
         </newSlaves>
      </ns1:addSlaves>
   </soapenv:Body>
</soapenv:Envelope>

Example SOAP response:

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns1="ns1">
   <SOAP-ENV:Header/>
   <SOAP-ENV:Body SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
      <ns1:addSlavesResponse>
         <return xsi:type="ns1:vuiSoapTaskIdResponse">
            <requestStatus>SUCCESS</requestStatus>
            <requestStatusDescription>Request succeeded.</requestStatusDescription>
            <taskId>0B3LCA6254A12E5GEB0MF4F6LH</taskId>
         </return>
      </ns1:addSlavesResponse>
   </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Request parameters:

ParameterTypeDescriptionRequired?
newSlavesslaveLocationListList of slaves to be addedYes
createNewSlaveTaskIdstringIdentifier of the task that run script which creates slaveYes

Response parameters:

nametypedescription
taskIdstringidentifier of created task
requestStatusstringresult of request
requestStatusDescriptionstringstatus description

An example of JSON in a parameter ‘additionalInfo’ in the response of the operation ‘getTaskStatus’:

{
   "success": [
      {
         "soapAddress": {
            "ip": "192.168.3.192",
            "port": "9600"
         },
         "applicationAddress": {
            "ip": "192.168.3.192",
            "port": "30200"
         },
         "machineId": "00001111AAAAFFFF"
      }
   ],
   "failed": [
      {
         "soapAddress": {
            "ip": "192.168.3.192",
            "port": "9601"
         },
         "applicationAddress": {
            "ip": "192.168.3.192",
            "port": "30201"
         },
         "machineId": "00001111AAAABBBB"
      }
   ],
   "createNewSlaveTaskId": "8VF1305F100KEWS87F3N8UA04C"
}
Was this article helpful to you? Yes No

How can we help?