I have an XaaS Blueprint with a property that retrieves external values from a vRO Action. It determines the OU for a Windows machine based on the user's selection of a different property on the blueprint. The dropdown in the catalog request gets populated nicely with the expected results. When I submit the request, it bombs on this error:
The value for the 'adDomainOU' field should be among the permitted values.
Anyone else have a similar experience? This is vRA 7.3 using the Azure integration, but I'm not sure that this error is coming from the Azure-integration code specifically. Any suggestions / help?
This error is found in catalina.out:
2017-11-09 20:38:10,232 vcac: [component="cafe:composition-service" priority="INFO" thread="tomcat-http--50" tenant="myTenant" context="L9PgP2cl" parent="L9PgP2cl" token="Adk2wby6"] com.vmware.vcac.composition.service.impl.RequestServiceImpl.validate:889 - Received request for requestedObjectId myTenant!::!AzureWindows2012BJ, catalogRequestId null, requestNumber null, resourceId null
2017-11-09 20:38:10,233 vcac: [component="cafe:composition-service" priority="INFO" thread="tomcat-http--50" tenant="myTenant" context="L9PgP2cl" parent="L9PgP2cl" token="Adk2wby6"] com.vmware.vcac.composition.service.impl.RequestServiceImpl.validateRequest:154 - validateRequest for request type [CATALOG_ITEM], requestedobjectid [myTenant!::!AzureWindows2012BJ]
2017-11-09 20:38:10,400 vcac: [component="cafe:catalog" priority="ERROR" thread="tomcat-http--28" tenant="myTenant" context="L9PgP2cl" parent="" token="L9PgP2cl"] com.vmware.vcac.platform.rest.client.error.ResponseErrorHandler.handleRestError:113 - [Rest Error]: {Status code: 400}, {Error code: 11015} , {Error Source: null}, {Error Msg: The value for the 'adDomainOU' field should be among the permitted values.}, {System Msg: The value for the field with id adDomainOU should be among the permitted values.}
2017-11-09 20:38:10,401 vcac: [component="cafe:catalog" priority="WARN" thread="tomcat-http--28" tenant="myTenant" context="L9PgP2cl" parent="" token="L9PgP2cl"] com.vmware.vcac.catalog.provider.gateway.impl.ProviderRequestGatewayImpl.validateRequest:106 - CatalogItemRequest [RequestId="null" CatalogItemId="c22d820d-128e-440b-a044-217cded10134" CatalogItemName="Azure Windows 2012 - BJ" ServiceName="Azure" TenantName="myTenant" SubtenantName="Azure HCPDev"] : The provider [e2022805-a27c-47d0-849e-3655acf93cba] determined that request was invalid
com.vmware.vcac.platform.rest.client.error.RestException: The value for the 'adDomainOU' field should be among the permitted values.
at com.vmware.vcac.platform.rest.client.error.ResponseErrorHandler.mapRestException(ResponseErrorHandler.java:121) ~[platform-rest-client-7.3.0-SNAPSHOT.jar:?]
at com.vmware.vcac.platform.rest.client.error.ResponseErrorHandler.handleRestError(ResponseErrorHandler.java:100) ~[platform-rest-client-7.3.0-SNAPSHOT.jar:?]
at com.vmware.vcac.platform.rest.client.error.ResponseErrorHandler.handleError(ResponseErrorHandler.java:59) ~[platform-rest-client-7.3.0-SNAPSHOT.jar:?]
at org.springframework.web.client.RestTemplate.handleResponse(RestTemplate.java:700) ~[spring-web-4.3.7.RELEASE.jar:4.3.7.RELEASE]
at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:653) ~[spring-web-4.3.7.RELEASE.jar:4.3.7.RELEASE]
at org.springframework.web.client.RestTemplate.execute(RestTemplate.java:613) ~[spring-web-4.3.7.RELEASE.jar:4.3.7.RELEASE]
at org.springframework.web.client.RestTemplate.postForObject(RestTemplate.java:380) ~[spring-web-4.3.7.RELEASE.jar:4.3.7.RELEASE]
at com.vmware.vcac.platform.rest.client.impl.RestClientImpl.post(RestClientImpl.java:394) ~[platform-rest-client-7.3.0-SNAPSHOT.jar:?]
at com.vmware.vcac.catalog.provider.gateway.impl.ProviderRequestGatewayImpl.validateRequest(ProviderRequestGatewayImpl.java:98) [classes/:?]
at com.vmware.vcac.catalog.service.impl.RequestServiceImpl.applyProviderValidation(RequestServiceImpl.java:1142) [classes/:?]
at com.vmware.vcac.catalog.service.impl.RequestServiceImpl.submitRequest(RequestServiceImpl.java:1040) [classes/:?]
at com.vmware.vcac.catalog.service.impl.RequestServiceImpl.createOrUpdateRequest(RequestServiceImpl.java:883) [classes/:?]
at sun.reflect.GeneratedMethodAccessor4640.invoke(Unknown Source) ~[?:?]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_131]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_131]
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:333) [spring-aop-4.3.7.RELEASE.jar:4.3.7.RELEASE]
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190) [spring-aop-4.3.7.RELEASE.jar:4.3.7.RELEASE]
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157) [spring-aop-4.3.7.RELEASE.jar:4.3.7.RELEASE]
at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92) [spring-aop-4.3.7.RELEASE.jar:4.3.7.RELEASE]
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) [spring-aop-4.3.7.RELEASE.jar:4.3.7.RELEASE]
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:213) [spring-aop-4.3.7.RELEASE.jar:4.3.7.RELEASE]
at com.sun.proxy.$Proxy916.createOrUpdateRequest(Unknown Source) [?:?]
at com.vmware.vcac.catalog.controller.consumer.ConsumerRequestController.create(ConsumerRequestController.java:95) [classes/:?]
at com.vmware.vcac.catalog.controller.consumer.ConsumerRequestController$$FastClassBySpringCGLIB$$60f2cac8.invoke(<generated>) [classes/:?]
at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204) [spring-core-4.3.7.RELEASE.jar:4.3.7.RELEASE]
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:721) [spring-aop-4.3.7.RELEASE.jar:4.3.7.RELEASE]
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157) [spring-aop-4.3.7.RELEASE.jar:4.3.7.RELEASE]
at org.springframework.security.access.intercept.aopalliance.MethodSecurityInterceptor.invoke(MethodSecurityInterceptor.java:69) [spring-security-core-4.2.1.RELEASE.jar:4.2.1.RELEASE]
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) [spring-aop-4.3.7.RELEASE.jar:4.3.7.RELEASE]
at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:656) [spring-aop-4.3.7.RELEASE.jar:4.3.7.RELEASE]
at com.vmware.vcac.catalog.controller.consumer.ConsumerRequestController$$EnhancerBySpringCGLIB$$29602f65.create(<generated>) [classes/:?]
at sun.reflect.GeneratedMethodAccessor4687.invoke(Unknown Source) ~[?:?]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_131]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_131]
at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205) [spring-web-4.3.7.RELEASE.jar:4.3.7.RELEASE]
at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:133) [spring-web-4.3.7.RELEASE.jar:4.3.7.RELEASE]
at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:116) [spring-webmvc-4.3.7.RELEASE.jar:4.3.7.RELEASE]
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:827) [spring-webmvc-4.3.7.RELEASE.jar:4.3.7.RELEASE]
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:738) [spring-webmvc-4.3.7.RELEASE.jar:4.3.7.RELEASE]
at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85) [spring-webmvc-4.3.7.RELEASE.jar:4.3.7.RELEASE]
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:963) [spring-webmvc-4.3.7.RELEASE.jar:4.3.7.RELEASE]
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:897) [spring-webmvc-4.3.7.RELEASE.jar:4.3.7.RELEASE]
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970) [spring-webmvc-4.3.7.RELEASE.jar:4.3.7.RELEASE]
at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:872) [spring-webmvc-4.3.7.RELEASE.jar:4.3.7.RELEASE]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:661) [servlet-api.jar:?]
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846) [spring-webmvc-4.3.7.RELEASE.jar:4.3.7.RELEASE]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:742) [servlet-api.jar:?]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) [catalina.jar:8.5.14]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [catalina.jar:8.5.14]
at org.apache.logging.log4j.web.Log4jServletFilter.doFilter(Log4jServletFilter.java:71) [platform-log4j-web-custom-7.3.0-SNAPSHOT.jar:?]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [catalina.jar:8.5.14]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [catalina.jar:8.5.14]
at com.vmware.vcac.platform.metrics.servlet.MetricsAbstractInstrumentedFilter.doFilter(MetricsAbstractInstrumentedFilter.java:95) [platform-metrics-servlet-7.3.0-SNAPSHOT.jar:?]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [catalina.jar:8.5.14]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [catalina.jar:8.5.14]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:317) [spring-security-web-4.2.1.RELEASE.jar:4.2.1.RELEASE]
at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:127) [spring-security-web-4.2.1.RELEASE.jar:4.2.1.RELEASE]
at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:91) [spring-security-web-4.2.1.RELEASE.jar:4.2.1.RELEASE]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) [spring-security-web-4.2.1.RELEASE.jar:4.2.1.RELEASE]
at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:114) [spring-security-web-4.2.1.RELEASE.jar:4.2.1.RELEASE]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) [spring-security-web-4.2.1.RELEASE.jar:4.2.1.RELEASE]
at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:111) [spring-security-web-4.2.1.RELEASE.jar:4.2.1.RELEASE]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) [spring-security-web-4.2.1.RELEASE.jar:4.2.1.RELEASE]
at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:170) [spring-security-web-4.2.1.RELEASE.jar:4.2.1.RELEASE]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) [spring-security-web-4.2.1.RELEASE.jar:4.2.1.RELEASE]
at com.vmware.vcac.authentication.http.spring.BaseTokenAuthenticationFilter.doFilter(BaseTokenAuthenticationFilter.java:45) [platform-security-sso-client-7.3.0-SNAPSHOT.jar:?]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) [spring-security-web-4.2.1.RELEASE.jar:4.2.1.RELEASE]
at org.springframework.security.oauth2.provider.authentication.OAuth2AuthenticationProcessingFilter.doFilter(OAuth2AuthenticationProcessingFilter.java:176) [spring-security-oauth2-2.0.12.RELEASE.jar:?]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) [spring-security-web-4.2.1.RELEASE.jar:4.2.1.RELEASE]
at com.vmware.vcac.authentication.http.tenancy.TenancyContextFilter.doFilterWithTenancyContext(TenancyContextFilter.java:67) [platform-security-sso-client-7.3.0-SNAPSHOT.jar:?]
at com.vmware.vcac.authentication.http.tenancy.TenancyContextFilter.doFilter(TenancyContextFilter.java:54) [platform-security-sso-client-7.3.0-SNAPSHOT.jar:?]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) [spring-security-web-4.2.1.RELEASE.jar:4.2.1.RELEASE]
at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:64) [spring-security-web-4.2.1.RELEASE.jar:4.2.1.RELEASE]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [spring-web-4.3.7.RELEASE.jar:4.3.7.RELEASE]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) [spring-security-web-4.2.1.RELEASE.jar:4.2.1.RELEASE]
at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:56) [spring-security-web-4.2.1.RELEASE.jar:4.2.1.RELEASE]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [spring-web-4.3.7.RELEASE.jar:4.3.7.RELEASE]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) [spring-security-web-4.2.1.RELEASE.jar:4.2.1.RELEASE]
at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:105) [spring-security-web-4.2.1.RELEASE.jar:4.2.1.RELEASE]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) [spring-security-web-4.2.1.RELEASE.jar:4.2.1.RELEASE]
at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:214) [spring-security-web-4.2.1.RELEASE.jar:4.2.1.RELEASE]
at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:177) [spring-security-web-4.2.1.RELEASE.jar:4.2.1.RELEASE]
at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346) [spring-web-4.3.7.RELEASE.jar:4.3.7.RELEASE]
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:262) [spring-web-4.3.7.RELEASE.jar:4.3.7.RELEASE]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [catalina.jar:8.5.14]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [catalina.jar:8.5.14]
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:197) [spring-web-4.3.7.RELEASE.jar:4.3.7.RELEASE]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [spring-web-4.3.7.RELEASE.jar:4.3.7.RELEASE]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [catalina.jar:8.5.14]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [catalina.jar:8.5.14]
at com.vmware.vcac.platform.service.rest.filter.DefaultContentTypeFilter.doFilter(DefaultContentTypeFilter.java:69) [platform-service-config-7.3.0-SNAPSHOT.jar:?]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [catalina.jar:8.5.14]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [catalina.jar:8.5.14]
at com.vmware.vcac.platform.trace.servlet.TraceHttpRequestFilter.doFilter(TraceHttpRequestFilter.java:50) [platform-trace-servlet-7.3.0-SNAPSHOT.jar:?]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [catalina.jar:8.5.14]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [catalina.jar:8.5.14]
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198) [catalina.jar:8.5.14]
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96) [catalina.jar:8.5.14]
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:478) [catalina.jar:8.5.14]
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140) [catalina.jar:8.5.14]
at org.apache.catalina.valves.RemoteIpValve.invoke(RemoteIpValve.java:677) [catalina.jar:8.5.14]
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:80) [catalina.jar:8.5.14]
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:624) [catalina.jar:8.5.14]
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87) [catalina.jar:8.5.14]
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342) [catalina.jar:8.5.14]
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:799) [tomcat-coyote.jar:8.5.14]
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) [tomcat-coyote.jar:8.5.14]
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:861) [tomcat-coyote.jar:8.5.14]
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1455) [tomcat-coyote.jar:8.5.14]
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) [tomcat-coyote.jar:8.5.14]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:1.8.0_131]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:1.8.0_131]
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-util.jar:8.5.14]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_131]
lately I was observing similar error with my XaaS blueprint (only when used as Nested) in vRA 7.2
this was with String/Array type variable and was happening only when I didn't set any default values to variable.
what is datatype of adDomainOU and are you having it with some default value in your XaaS blueprint? if not, try it with some default value and see if that helps.
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;
Thank you npadmani for the reply.
The vRO action is returning a type of: Array/string.
The value of the property on the blueprint is string, and I have specified a default value of "Invalid Default Value":
This default value never shows in the catalog, as the vRO action runs immediately when the catalog request is opened. On a fresh catalog request, before the feeder property 'Environment' is selected, the action returns this (Environment is undefined, so the parent OU is undefined):
Once an Environment is selected, the vRO action returns a proper value:
The value of the OU field changes appropriately if/when the Environment property selection is changed:
The vRO action appears to be working properly. Everything looks good until I hit submit, and then vRA complains about the value of this field.
How are you passing these form values through to the Azure request? The error is a 400 (bad request) response from the Azure REST API itself. If I had to guess, it's because of improperly formed JSON, passing a field name ('adDomainJoin') that isn't valid. So my question is once the adDomainJoin field gets set in your request form, what is the mechanism that takes that, does some processing, and puts it into a request to Azure? Are you doing this along with the machine provisioning request or as a post-deploy action via software component/install extension?
From the JSON template examples I can find, joining a machine to the domain would need to be done through the virtual machine extensions, which are modeled in vRO with the AzureVirtualMachineExtension object, which are tied to the AzureVirtualMachine object in the AzureVirtualMachine.extensions member.
An example JSON extension template to add a machine to a domain is as follows (this is from a template and so has parameter names still in it):
{
"apiVersion": "2015-06-15",
"type": "Microsoft.Compute/virtualMachines/extensions",
"name": "[concat(parameters('dnsLabelPrefix'),'/joindomain')]",
"location": "[resourceGroup().location]",
"dependsOn": [
"[concat('Microsoft.Compute/virtualMachines/', parameters('dnsLabelPrefix'))]"
],
"properties": {
"publisher": "Microsoft.Compute",
"type": "JsonADDomainExtension",
"typeHandlerVersion": "1.3",
"autoUpgradeMinorVersion": true,
"settings": {
"Name": "[parameters('domainToJoin')]",
"OUPath": "[parameters('ouPath')]",
"User": "[concat(parameters('domainToJoin'), '\\', parameters('domainUsername'))]",
"Restart": "true",
"Options": "[parameters('domainJoinOptions')]"
},
"protectedSettings": {
"Password": "[parameters('domainPassword')]"
}
}
If you're submitting this via vRO, it would look something like this. In my example, I have a resource group called Azure-VM-1 and a vm called VM-1. I have a domain user called domainadmin.
//connection is input of type Azure:Connection
var computeClient = connection.computeClient;
var extensionOperation = computeClient.getVirtualMachineExtensionsOperations();
var ext = new AzureVirtualMachineExtension("East US");
var jsonSettingsObj = {
Name: "[DOMAINXXX].onmicrosoft.com",
OUPath: "OU=Servers,DC=DOMAINXXX,DC=onmicrosoft.com", //<-- there is your form field
User: "[DOMAINXXX].onmicrosoft.com\\domainadmin",
Password: "[PASSWORD]",
Restart: true,
Options: 3
};
ext.name = "VM-1";
ext.publisher = "Microsoft.Compute";
ext.extensionType = "JsonADDomainExtension";
ext.typeHandlerVersion = "1.3";
ext.location = "East US";
ext.settings = JSON.stringify(jsonSettingsObj);
var extensionResponse = extensionOperation.createOrUpdate("Azure-VM-1", "VM-1", ext);
I don't think this is the mechanism you're using because I was unable to replicate your error with any tests I tried. If you could provide some more details about how that adDomainOu property gets sent into which workflow and what that workflow looks like, it might be easier to help debug.
I've never used an equals = in a value before. I wonder if it's not being encoded properly since it's a natural http request delimiter? Can you try taking out the equals and see if the request goes through? That's the only other thing that stands out to me.