Quantcast
Channel: VMware Communities : All Content - All Communities
Viewing all articles
Browse latest Browse all 180329

Nested Switch Issue with vRO

$
0
0

Does vRO work with nested switch statements for XaaS?   vRO is not differentiating between the case for "osType"   It is either or.  My current workaround is to hardcode 'osversion' to a particular "ValueSet.***" which works but is not extensible since I am locked to that cluster.  I am still learning, and looking for insight on how I can make the below code work.. Or for assistance to convert it into something extensible..

 

Thanks

 

 

// Nested switch
switch(osType){
// code to be executed if osVersion = Windows2012R2             case "Windows2012R2":   switch(reservationPolicy){   // NX Datacenter
case 'NX-Cluster-01':         osversion = "ValueSet.Windows2012R2Standard";    break;        case "NX-Cluster-02":        osversion = "ValueSet.Windows2012R2Standard01";    break;
case "NX-Cluster-03":         osversion = "ValueSet.Windows2012R2Standard02";    break;        case "NX-Cluster-04":        osversion = "ValueSet.Windows2012R2Standard";    break;        case "NX-Cluster-05":        osversion = "ValueSet.Windows2012R2Standard";    break;        }
// code to be executed if osVersion = Windows2016     case "Windows2016":           switch(reservationPolicy){   //AT Datacenter
case "AT-Cluster-01":         osversion = "ValueSet.Windows2016Standard";    break;        case "AT-Cluster-01":        osversion = "ValueSet.Windows2016Standard01";    break;
case "AT-Cluster-01":         osversion = "ValueSet.Windows2016Standard02";    break;        case "AT-Cluster-01":        osversion = "ValueSet.Windows2016Standard";    break;              case "AT-Cluster-01":        osversion = "ValueSet.Windows2016Standard";    break;        }  }

Viewing all articles
Browse latest Browse all 180329

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>