Mount datastore on all host via REST API

  • 22 June 2016
  • 2 replies
  • 2198 views

Badge +1
Hello

I'm able to create a storage pool and a container via Rest Api but i don't found the parameters to mount the container on all host (ESXi).

My request :

{"name": "MyContainer","storagePoolId": "777""compressionEnabled": true,}

I have tested to add the parameters"nfsWhitelist": ["esxi1",esxi2","esxi3"] with the ip of the ESxi but it doesn't work.
Maybe the parameter mappedRemoteContainers (java.util.Map, optional), but i found no documentation on that.

Have you an idea ?

Thanks

Alban

2 replies

Badge +1
Hello,

After some tests, i have found with the POST
/containers/datastores/add_datastore

{"containerName": "string","datastoreName": "string","nodeIds": ["string"],"nodeUuids": ["string"],"readOnly": false,"targetPath": "string"}

Alban
Userlevel 7
Badge +30
Have you ever tried to use the console view in google Chrome (i.e google chrome's developer console)?

It has this feature called network tracing, and it can actually show you exactly what is being posted to the REST API when we do this in the GUI.

Thats the best way to track this one down.

Reply