VMware Cloud Community
lhoreis
Contributor
Contributor
Jump to solution

Rookie question VC:StoragePod check whether SRDS is enabled

Hello all,

I'm a total novice in matters  vRealize Orchestrator and JavaScript and I hope that somebody can provide some initial aid.

While I have quite a lot of working experience with VMware vSphere the API stuff is pretty new to me.

In vRealize Orchestrator I want to create a workflow or maybe an action which uses a datastore cluster of type VC:StoragePod

as input and I want to retrieve some basic information about the give datastore cluster. For example I want to know whether 

SDRS is enabled or something like that.

For storage DRS  I found that in  VcStorageDrsPodConfigSpec there is the attribute "enabled" and there also is a

method called isEnabled. VcStorageDrsPodConfigInfo also has  "enabled" as an attribute.

My problem is that I currently have no clue how to access the attribute "enabled" for a given VC:StoragePod as I don't know

where to start. It would be great if someone can enlighten me how everything is related and connected and how to use it.

Kind regards,

Lars

Tags (2)
Reply
0 Kudos
1 Solution

Accepted Solutions
iiliev
VMware Employee
VMware Employee
Jump to solution

Hi Lars,

Try the following code to check whether storage DRS is enabled or not (the input variable is spod of type VC:StoragePod)

var sdrsEnabled = spod.podStorageDrsEntry.storageDrsConfig.podConfig.enabled;

System.log("Storage DRS enabled: " + sdrsEnabled);

View solution in original post

Reply
0 Kudos
2 Replies
iiliev
VMware Employee
VMware Employee
Jump to solution

Hi Lars,

Try the following code to check whether storage DRS is enabled or not (the input variable is spod of type VC:StoragePod)

var sdrsEnabled = spod.podStorageDrsEntry.storageDrsConfig.podConfig.enabled;

System.log("Storage DRS enabled: " + sdrsEnabled);

Reply
0 Kudos
lhoreis
Contributor
Contributor
Jump to solution

Hello Ilian,

thank you very much for you quick response. It's working ... now I have to understand it.

Regards,

Lars

Reply
0 Kudos