VMware {code} Community
atoka
Contributor
Contributor

Is there vSphere SDK API to perform Storage Array Type Policy(SATP) rule operations?

Hi all,

Is there vSphere SDK API available to perform Storage Array Type Policy(SATP) rule removal and reclaim operation on vCenter Server 6?

I can perform these operations from ESXi console using esxcli commands, but I am not able to figure out how to do it programmatically.

These are the operations that I want to perform:

- esxcli storage nmp satp rule remove

- esxcli storage core claiming reclaim

Any help will be greatly appreciated. Thanks!!

0 Kudos
2 Replies
doskiran
Enthusiast
Enthusiast

Its better to SSH to ESXi host and execute the above esxcli commands remotely using java apis(ganymed-ssh2-build210.jar)
0 Kudos
doskiran
Enthusiast
Enthusiast

Steps:

1) Connects to the remote host using SSH 

    Connection connection = new Connection(esxiHost);

         connection .connect();

2) Execute the command on the remote host using SSH

   Session sessionStr = connection .openSession();

   sessionStr .execCommand(command);

0 Kudos