nicsch

updated

11 years ago

N

nicsch

3 Posts

0

2668

October 16th, 2015 02:00

How to add an SDS using the REST interface?

Hi,

I am using Scale IO version 1.32.403.2 and would like to configure my cluster via the gateway using the REST API.

Configuration steps worked well up to the point where I needed to add an SDS.

The REST API Documentation states the following properties as mandatory:

- protectionDomainId

- ipList (name of the property for POST: sdsIpList), which should be a list of SdsIp {"ip", "role"}

I tried to use the following command to add the SDS:

curl -k -v --basic --user admin:$TOKEN -X POST -H "Content-Type: application/json" -d '{"name":"mySDS","sdsIpList":[{"ip":"192.168.0.5","role":"all"}],"protectionDomainId":"8d7b690d00000000","forceClean":"TRUE"}'  https:// /api/types/Sds/instances

This however fails with the following message:

"Wrong command parameters. You can check that you are using the correct parameters, by consulting the help for the command."

The MDM trace log contains:  

15/10 09:21:21.689105 mosEventLog_PostInternal:00555: New event added. Message: "Command add_sds received, User: 'admin'. [60100]". Additional info: "protection_domain with ID 8d7b690d00000000  fault_set N/A New SDS name: N/A Hostnames:   Port: 7072 Devices:   Test mode: 'No test' Test time: 0 Cache is enabled, Cache size: 128 MB, Number of IO Buffs: 1" Severity: Info

15/10 09:21:21.689111 ctrl_CreateTgt:00310: ADD_SDS: No host names provided

15/10 09:21:21.689126 mosEventLog_PostInternal:00555: New event added. Message: "Command add_sds was not successful. Error code: Wrong command parameters. You can check that you are using the correct parameters, by consulting the helpfor the command. [60100]". Additional info: "ID: 0000000000000000" Severity: Warning

I assume that the ipList (or sdsIpList) property is the problem here, but I could not figure out what is wrong with this parameter the way I provided it.

Has anyone succeeded adding SDS using the REST interface? Could you share the code how to do that?

Big thanks in advance!

Have a great weekend,

/Nicolai