jonathanvh
Enthusiast
Enthusiast

Cluster from StoragePod

Jump to solution

Is there a way in Orchestrator to see in which cluster(VC:ClusterComputeResource) the StoragePod is located?

0 Kudos
1 Solution

Accepted Solutions
jonathanvh
Enthusiast
Enthusiast

I created a workaround for this

I did a listing of all the datastores in a cluster and checked if the parent of the datastore is a StoragePod.

clusterDatastores = vmCluster.datastore;

var storagePods = Array();

for each (cd in clusterDatastores) {

  if (cd.parent.vimType == "StoragePod") {

  storagePods[storagePods.length] = cd.parent;

  }

}

You will have double entries in the array, but I can fix that.

View solution in original post

0 Kudos
2 Replies
jonathanvh
Enthusiast
Enthusiast

Or is possible to get the sDRS cluster that is located in a cluster?

I have a line of code that returns all the storagePods, but I don't know in which cluster they are located

storagePods = Server.findAllForType("Vc:StoragePod", xpath);

0 Kudos
jonathanvh
Enthusiast
Enthusiast

I created a workaround for this

I did a listing of all the datastores in a cluster and checked if the parent of the datastore is a StoragePod.

clusterDatastores = vmCluster.datastore;

var storagePods = Array();

for each (cd in clusterDatastores) {

  if (cd.parent.vimType == "StoragePod") {

  storagePods[storagePods.length] = cd.parent;

  }

}

You will have double entries in the array, but I can fix that.

View solution in original post

0 Kudos