How to set priority for HA VM via Python SDK ?

Hi, I want to set priority of Highly Available VM as High via python SDK. I provided information as shown below: vm = self.vms_service.add( vm = types.Vm ( high_availability = types.HighAvailability( enabled = True, priority = 1, ), ), ) As see above priority we have to provide as number but in GUI we can choose drop down menu as ("LOW", "MID" and "HIGH"). I wan to set priority as "HIGH", which integer value I have to set in priority ? I tried with 1 and 3 it shows "LOW" in both cases. Please help me. Thanks, ~Rohit

On 03/23/2017 08:59 AM, TranceWorldLogic . wrote:
Hi,
I want to set priority of Highly Available VM as High via python SDK. I provided information as shown below:
vm = self.vms_service.add( vm = types.Vm ( high_availability = types.HighAvailability( enabled = True, priority = 1, ), ), )
As see above priority we have to provide as number but in GUI we can choose drop down menu as ("LOW", "MID" and "HIGH"). I wan to set priority as "HIGH", which integer value I have to set in priority ? I tried with 1 and 3 it shows "LOW" in both cases.
Please help me.
Thanks, ~Rohit
The priority is a value between 0 and 100, and the mapping to the text displayed in the GUI is the following: 0..25 -> LOW 26..74 -> MID 75..100 -> HIGH In the reverse direction: LOW -> 1 MID -> 50 HIGH -> 100 So if you want to set it to HIGH use 'priority = 100'.
participants (2)
-
Juan Hernández
-
TranceWorldLogic .