Quantcast
Channel: VMware Communities: Message List
Viewing all articles
Browse latest Browse all 219257

Re:Catalog Request error:  The value for the field should be among the permitted values

$
0
0

Thank you JimmyJarrett for the response.  I am not seeing how my action can be returning an empty string.  It should only be returning a single string.  Once it has the proper feeder variable (environment), it returns a single string.  When I hit the dropdown, I only see one possible value.  This tells me that the array returned by the action has only a single element. 

 

 

Is this similar to what you were seeing?  Here's my code in the script action.  I don't see how it could possibly be returning more than one value in the array. 

 

var finalOU = new Array();

// Get base OU based on domain
if (domainToJoin) {
   switch(domainToJoin.toUpperCase()) {      case 'myDMZ':         // fall through   {https://stackoverflow.com/questions/6513585/javascript-or-expression-in-a-switch-case}      case 'myDMZ.COM':         var baseOU = "OU=PrivateCloud,OU=Corp,OU=my Resources,DC=mydmz,DC=com";         break;      case 'NA':         // fall through      case 'NA.CONTOSO.COM':         var baseOU = "OU=PrivateCloud,OU=Corp,OU=my Resources,DC=na,DC=contoso,DC=com";         break;      case '':         var baseOU = "An Active Directory domain has not been defined for this blueprint.";         finalOU.push(baseOU);         return finalOU;      default:         throw "Invalid domain name {" + domainToJoin + "} passed into workflow";   }
}

// Get direct parent OU based on Environment
if (serverEnvironment) {
   switch(serverEnvironment.toUpperCase()) {      case 'LB':         var parentOU = "OU=Lab,";         break;      case 'DT':         var parentOU = "OU=DevTest,";         break;      case 'PT':         var parentOU = "OU=ProductTest,";         break;      case 'PL':         var parentOU = "OU=ProdLike,";         break;      case 'DR':         var parentOU = "OU=DR,";         break;      case 'PD':         var parentOU = "OU=Prod,";         break;      case '':         var parentOU = "Please select an Environment";         finalOU.push(parentOU);         return finalOU;      default:         throw "Invalid Environment Selection {" + serverEnvironment + "} passed into workflow";   }
}

var OUpath = parentOU + baseOU
finalOU.push(OUpath);

System.log("OU Determination...");
System.log("Domain to Join: {" + domainToJoin + "}");
System.log("Server Environment: {" + serverEnvironment + "}");
System.log("Final OU determined: {" + finalOU + "}");

return finalOU;

Viewing all articles
Browse latest Browse all 219257

Trending Articles



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