5.1 vCloud api SourcedVmInstantiationParams

Hello

as 5.1 now supports the ability to choose the storage profile setup I am reworking my sctipt php instantiateVAppTemplate. The REST API shows:

<InstantiateVAppTemplateParams xmlns="http://www.vmware.com/vcloud/v1.5" xmlns:ovf="http://schemas.dmtf.org/ovf/envelope/1" name="xs:string" deploy="xs:boolean" powerOn="xs:boolean" linkedClone="xs:boolean">
     <Description> xs:string </Description>
     <VAppParent href="xs:anyURI" id="xs:string" name="xs:string" type="xs:string"/>
     <InstantiationParams>
         <ovf:Section> ovf:Section_Type </ovf:Section>
     </InstantiationParams>
     <Source href="xs:anyURI" id="xs:string" name="xs:string" type="xs:string"/>
     <IsSourceDelete> xs:boolean </IsSourceDelete>
     <SourcedVmInstantiationParams>
         <Source href="xs:anyURI" id="xs:string" name="xs:string" type="xs:string"/>
         <StorageProfile href="xs:anyURI" id="xs:string" name="xs:string" type="xs:string"/>
         <LocalityParams>
             <ResourceEntity href="xs:anyURI" id="xs:string" name="xs:string" type="xs:string"/>
         </LocalityParams>
     </SourcedVmInstantiationParams>
     <AllEULAsAccepted> xs:boolean </AllEULAsAccepted>
 </InstantiateVAppTemplateParams>

sense that I can eitehr use the old 1.5 api to instantiate (source) or use SourcedVmInstantiationParams to choose a profile of storage.

in the PHP SDK I found: setSourcedVmInstantiationParams ($SourcedVmInstantiationParams)

and I came with

$SourcedVmInstantiationParams= new VMware_VCloud_API_SourcedVmInstantiationParamsType();
$SourcedVmInstantiationParams->setsource($vAppTemplateRef);
$SourcedVmInstantiationParams->setStorageProfile($StorProRef);

$params = new VMware_VCloud_API_InstantiateVAppTemplateParamsType();
$params->set_name($vAppName);
$params->setDescription("Nada");
$params->setInstantiationParams($iparams);
#$params->setSource($vAppTemplateRef);
$params->setSourcedVmInstantiationParams(array($SourcedVmInstantiationParams));

However in the PHP SDK, there no additional information about the inner workings of the $SourcedVmInstantiationParams then... any ideas?

BTW: when activating the $params-# > setSource ($vAppTemplateRef); line, it all works, but it put the paralytic on the lack of storage space--> seems to ignore the SourcedVmInstantiation section\

However, this is NOT a PHP problem. Looks like it's the same in the REST API... Navy below


       
      
    

The name property that is why you are missing null pointer exception.

Kind regards

Rajesh Kamal.

Tags: VMware

Similar Questions

  • Create the ProviderVDC vai vCloud API

    I want user vCloud API to create the ProviderVDC, but there is an error, anyone can help me? Thank you!

    The XML form beolw:

    March 19, 2015 14:27:21 com.vmware.vcloud.sdk.admin.extensions.VcloudAdminExtension createVMWProviderVdc

    INFO: POST URL - https://10.0.70.23/API/admin/extension/providervdcsparams

    March 19, 2015 14:27:21 com.vmware.vcloud.sdk.RestUtil post

    INFO: POST URL - https://10.0.70.23/API/admin/extension/providervdcsparams

    March 19, 2015 14:27:21 com.vmware.vcloud.sdk.RestUtil post

    NEWS: POST Request Body - <? XML version = "1.0" encoding = "UTF-8" standalone = "yes"? >

    " < ns9:VMWProviderVdcParams xmlns =" http://www.VMware.com/vCloud/versions "xmlns:ns2 =" http://schemas.dmtf.org/OVF/Envelope/1 "xmlns:ns3 =" http://schemas.dmtf.org/wbem/wscim/1/CIM-Schema/2/CIM_VirtualSystemSettingData "xmlns:ns4 =" http://schemas.dmtf.org/wbem/wscim/1/Common "xmlns:ns5 =" http://schemas.dmtf.org/wbem/wscim/1/CIM-Schema/2/CIM_ResourceAllocationSettingData "xmlns:ns6 =" http://www.VMware.com/vCloud/v1.5 "xmlns:ns7 =" http://www.VMware.com/Schema/OVF "xmlns:ns8 =" http://schemas.dmtf.org/OVF/Environment/1 "xmlns:ns9 =" http://www.VMware.com/vCloud/extension/v1.5 "name ="ProVDC"> " "" "" "" ""

    < ns9:ResourcePoolRefs >

    < ns9:VimObjectRef >

    " < href = ns9:VimServerRef ' https://10.0.70.48 "/>

    Cluster < ns9:MoRef > < / ns9:MoRef >

    < ns9:VimObjectType > RESOURCE_POOL < / ns9:VimObjectType >

    < / ns9:VimObjectRef >

    < / ns9:ResourcePoolRefs >

    " < href = ns9:VimServer ' https://10.0.70.48 "/>

    < ns9:StorageProfile > * (all) < / ns9:StorageProfile >

    < / ns9:VMWProviderVdcParams >

    March 19, 2015 14:27:21 com.vmware.vcloud.sdk.RestUtil post

    INFO: POST Content Type application - application/vnd.vmware.admin.createProviderVdcParams+xml

    March 19, 2015 14:27:21 com.vmware.vcloud.sdk.RestUtil post

    INFO: Status Code - 400

    March 19, 2015 14:27:21 com.vmware.vcloud.sdk.RestUtil post

    INFO: Status - Bad Request

    March 19, 2015 14:27:21 com.vmware.vcloud.sdk.RestUtil post

    INFO: Response - <? XML version = "1.0" encoding = "UTF-8"? >

    " < error xmlns =" " http://www.VMware.com/vCloud/v1.5 "majorErrorCode = "400" message ="the reference https://10.0.70.48 cannot be parsed correctly" minorErrorCode = "INVALID_REFERENCE" stackTrace = "com.vmware.vcloud.api.rest.handlers.exceptions.InvalidReferenceRestApiException: the reference https://10.0.70.48 can not be parsed correctly "

    The VimServerRef should look more like this.

    "href ="https://vcloud.example.com/api/admin/extension/vimServer/{identifier}.

    see create a provider VDC

  • VCloud API c# adding firewall rules 5.1 to configure the edge gateway.

    Hello world

    I am setting up in edge gateway firewall rules in my VDC using Vcloud Director api 5.1.0.2. While the settings for a FirewallRuleType I am trying to add protocols, but I don't know what exactly should be passed to FirewallRuleTypeProtocols. There are only 2 properties in the object FirewallRuleTypeProtocols elements and ItemsElementName. Take items objects Array and ItemsElementName takes ItemsChoiceType. I tried to update value of items in the table of the types of annonymous as new {new {TCP = true}}; and the array of strings, new string {"TCP"}; but when ever I trie to execute the configureservices method after spending the type of firewall service for network services "Bad Request: error on line 1." End the file Premeture " can someone send sample c# code to configure firewall rules in Edgegateway?"

    I get this response on service gateway configuration edge call.

    ? XML version = "1.0" encoding = "UTF-8"? >

    "< error xmlns ="http://www.vmware.com/vcloud/v1.5"stackTrace =" javax.ws.rs.WebApplicationException: com.vmware.vcloud.common.xml.XMLProcessingException: Bad request

    to com.vmware.vcloud.api.rest.providers.CommonJAXBProvider.readFrom(CommonJAXBProvider.java:255)

    to org.apache.cxf.jaxrs.utils.JAXRSUtils.readFromMessageBody(JAXRSUtils.java:1025)

    to org.apache.cxf.jaxrs.utils.JAXRSUtils.processParameter(JAXRSUtils.java:606)

    to org.apache.cxf.jaxrs.utils.JAXRSUtils.processParameters(JAXRSUtils.java:571)

    to org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:239)

    to org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:91)

    to org.apache.cxf.interceptor.ServiceInvokerInterceptor$ 1.run(ServiceInvokerInterceptor.java:58)

    to java.util.concurrent.Executors$ RunnableAdapter.call (unknown Source)

    to java.util.concurrent.FutureTask$ Sync.innerRun (unknown Source)

    at java.util.concurrent.FutureTask.run (unknown Source)

    to org.apache.cxf.workqueue.SynchronousExecutor.execute(SynchronousExecutor.java:37)

    to org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:106)

    to org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263)

    to org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:118)

    to org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:208)

    to org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:223)

    to org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:166)

    to org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:113)

    to org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:184)

    to org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPost(AbstractHTTPServlet.java:107)

    to javax.servlet.http.HttpServlet.service(HttpServlet.java:727)

    to com.vmware.vcloud.api.rest.jaxrs.servlet.CxfServlet.service(CxfServlet.java:161)

    to com.vmware.vcloud.api.rest.jaxrs.servlet.JaxRsDispatcherServlet.doService(JaxRsDispatcherServlet.java:97)

    to org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:644)

    to org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:560)

    to javax.servlet.http.HttpServlet.service(HttpServlet.java:727)

    to javax.servlet.http.HttpServlet.service(HttpServlet.java:820)

    to org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:565)

    to org.eclipse.jetty.servlet.ServletHandler$ CachedChain.doFilter (ServletHandler.java:1360)

    to org.springframework.security.web.FilterChainProxy$ VirtualFilterChain.doFilter (FilterChainProxy.java:368)

    to com.vmware.vcloud.api.rest.diagnostics.DiagnosticFilter.doFilter(DiagnosticFilter.java:33)

    to com.vmware.vcloud.api.rest.diagnostics.RestApiDiagnosticsInterceptor.doFilter(RestApiDiagnosticsInterceptor.java:129)

    to org.springframework.security.web.FilterChainProxy$ VirtualFilterChain.doFilter (FilterChainProxy.java:380)

    to com.vmware.vcloud.security.filters.ValidationFilter.doFilterHttp(ValidationFilter.java:96)

    to com.vmware.vcloud.api.rest.security.SecurityFilter.doFilterHttp(SecurityFilter.java:82)

    to com.vmware.vcloud.security.filters.HttpFilterBean.doFilter(HttpFilterBean.java:35)

    to com.vmware.vcloud.api.rest.diagnostics.RestApiDiagnosticsInterceptor.doFilter(RestApiDiagnosticsInterceptor.java:129)

    to org.springframework.security.web.FilterChainProxy$ VirtualFilterChain.doFilter (FilterChainProxy.java:380)

    to com.vmware.vcloud.api.framework.web.ExtensibilityFilter.doFilter(ExtensibilityFilter.java:131)

    at sun.reflect.GeneratedMethodAccessor423.invoke (unknown Source)

    at sun.reflect.DelegatingMethodAccessorImpl.invoke (unknown Source)

    at java.lang.reflect.Method.invoke (unknown Source)

    to org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)

    to org.springframework.osgi.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker.java:58)

    to org.springframework.osgi.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.java:62)

    to org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)

    to org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)

    to org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)

    to org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)

    to org.springframework.osgi.service.util.internal.aop.ServiceTCCLInterceptor.invokeUnprivileged(ServiceTCCLInterceptor.java:56)

    to org.springframework.osgi.service.util.internal.aop.ServiceTCCLInterceptor.invoke(ServiceTCCLInterceptor.java:39)

    to org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)

    to org.springframework.osgi.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextAdvice.java:59)

    to org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)

    to org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)

    to org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)

    to org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)

    to org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)

    to $Proxy734.doFilter (unknown Source)

    to org.springframework.security.web.FilterChainProxy$ VirtualFilterChain.doFilter (FilterChainProxy.java:380)

    to com.vmware.vcloud.security.filters.ValidityExceptionFilter.doFilterHttp(ValidityExceptionFilter.java:47)

    to com.vmware.vcloud.security.filters.HttpFilterBean.doFilter(HttpFilterBean.java:35)

    to org.springframework.security.web.FilterChainProxy$ VirtualFilterChain.doFilter (FilterChainProxy.java:380)

    to com.vmware.vcloud.security.web.AuthenticationFilter.doFilter(AuthenticationFilter.java:155)

    to com.vmware.vcloud.api.rest.diagnostics.RestApiDiagnosticsInterceptor.doFilter(RestApiDiagnosticsInterceptor.java:129)

    to org.springframework.security.web.FilterChainProxy$ VirtualFilterChain.doFilter (FilterChainProxy.java:380)

    to com.vmware.vcloud.api.rest.versioning.AcceptHeaderFilter.doFilter(AcceptHeaderFilter.java:108)

    to com.vmware.vcloud.api.rest.diagnostics.RestApiDiagnosticsInterceptor.doFilter(RestApiDiagnosticsInterceptor.java:129)

    to org.springframework.security.web.FilterChainProxy$ VirtualFilterChain.doFilter (FilterChainProxy.java:380)

    to com.vmware.vcloud.security.web.ConversationFilter$ 1.run(ConversationFilter.java:39)

    to com.vmware.vcloud.security.web.ConversationFilter$ 1.run(ConversationFilter.java:37)

    to com.vmware.vcloud.common.persist.ConversationContextExecutor.execute(ConversationContextExecutor.java:67)

    to com.vmware.vcloud.security.web.ConversationFilter.doFilter(ConversationFilter.java:45)

    to com.vmware.vcloud.api.rest.diagnostics.RestApiDiagnosticsInterceptor.doFilter(RestApiDiagnosticsInterceptor.java:129)

    to org.springframework.security.web.FilterChainProxy$ VirtualFilterChain.doFilter (FilterChainProxy.java:380)

    to com.vmware.vcloud.security.web.ThreadLocalCleanerFilter.doFilter(ThreadLocalCleanerFilter.java:65)

    to com.vmware.vcloud.api.rest.diagnostics.RestApiDiagnosticsInterceptor.doFilter(RestApiDiagnosticsInterceptor.java:129)

    to org.springframework.security.web.FilterChainProxy$ VirtualFilterChain.doFilter (FilterChainProxy.java:380)

    to org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:169)

    to org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:237)

    to org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167)

    to org.eclipse.jetty.servlet.ServletHandler$ CachedChain.doFilter (ServletHandler.java:1331)

    to org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:77)

    to org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:181)

    to org.eclipse.jetty.servlet.ServletHandler$ CachedChain.doFilter (ServletHandler.java:1331)

    to org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:477)

    to org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:119)

    to org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:521)

    to org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:227)

    to org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1031)

    to org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:406)

    to org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:186)

    to org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:965)

    to org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117)

    to org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:250)

    to org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:149)

    to org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:111)

    to org.eclipse.jetty.server.Server.handle(Server.java:349)

    to org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:449)

    to org.eclipse.jetty.server.BlockingHttpConnection.handleRequest(BlockingHttpConnection.java:47)

    to org.eclipse.jetty.server.AbstractHttpConnection$ RequestHandler.headerComplete (AbstractHttpConnection.java:910)

    to org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:634)

    to org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:230)

    to org.eclipse.jetty.server.BlockingHttpConnection.handle(BlockingHttpConnection.java:66)

    to org.eclipse.jetty.server.bio.SocketConnector$ ConnectorEndPoint.run (SocketConnector.java:254)

    to org.eclipse.jetty.server.ssl.SslSocketConnector$ SslConnectorEndPoint.run (SslSocketConnector.java:665)

    to org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:599)

    to org.eclipse.jetty.util.thread.QueuedThreadPool$ 3.run(QueuedThreadPool.java:534)

    at java.lang.Thread.run (unknown Source)

    Caused by: com.vmware.vcloud.common.xml.XMLProcessingException: Bad request

    to com.vmware.vcloud.common.xml.JAXBUtils.readFromStream(JAXBUtils.java:257)

    to com.vmware.vcloud.api.rest.providers.CommonJAXBProvider.readFrom(CommonJAXBProvider.java:250)

    108... more

    Caused by: org.dom4j.DocumentException: error on line 1 of document: premature end of file. Nested exception: premature end of file.

    to org.dom4j.io.SAXReader.read(SAXReader.java:482)

    to org.dom4j.io.SAXReader.read(SAXReader.java:365)

    to com.vmware.vcloud.common.dom4j.Dom4jUtils.parseDocumentFromString(Dom4jUtils.java:158)

    to com.vmware.vcloud.common.ovf.OvfCleanerImpl.process(OvfCleanerImpl.java:86)

    at sun.reflect.GeneratedMethodAccessor5728.invoke (unknown Source)

    at sun.reflect.DelegatingMethodAccessorImpl.invoke (unknown Source)

    at java.lang.reflect.Method.invoke (unknown Source)

    to org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)

    to org.springframework.osgi.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker.java:58)

    to org.springframework.osgi.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.java:62)

    to org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)

    to org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)

    to org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)

    to org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)

    to org.springframework.osgi.service.util.internal.aop.ServiceTCCLInterceptor.invokeUnprivileged(ServiceTCCLInterceptor.java:56)

    to org.springframework.osgi.service.util.internal.aop.ServiceTCCLInterceptor.invoke(ServiceTCCLInterceptor.java:39)

    to org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)

    to org.springframework.osgi.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextAdvice.java:59)

    to org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)

    to org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)

    to org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)

    to org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)

    to org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)

    to $Proxy716.process (unknown Source)

    to com.vmware.vcloud.common.xml.JAXBUtils.readFromStream(JAXBUtils.java:223)

    ... more than 109

    I found the answer. Here's how to set firewall type protocol rules in c# API.

    Create the object of type firewall protocols

    Protocol of var = new FirewallRuleTypeProtocols();

    Value of protocols items this value corresponds to the value of the xml element

    Protocol. Items = new Object() {true};

    The name of the element value that is the name of xml element.

    Protocol. ItemsElementName = new ItemsChoiceType [] {ItemsChoiceType.Tcp};

    Protocol Set

    firewallRuleType.Protocols = Protocol;

  • Using the vCloud on hosted iland Director vCloud API

    Hi all, I'm new to vCloud so please forgive me if I ask a stupid question. I am currently developing a solution of automation using vCloud API (.Net), and I have at my disposal a vCloud hosted on iland.

    I am trying to run the .net SDK samples and I see that I must provide the "vcloud" url to connect. For example, the command to get a list with all current VM is the following:

    ListAllvApps VcloudUrl user@organization password

    The thing is that I don't really know what is this "vcloudurl", I tried to use the value that appears in "URL for the default organization" on the parameters of the Organization (see screenshot), but I got an error in the response (rather than get a xml, I get an element html with text "Page not found" or something similar in the body).

    Can someone help me on this?

    Thank you very much

    Jorge

    ilandsshot.png

    I don't use iland, so I can't test it for real... but I did a few tests with what I could.

    URL of the API:

    https://dal01.ilandcloud.com/API

    API version: 1.5 (5.1 I tried, but it seems that they are not on this version yet)

    Example command to run with curl (most linux boxes can work and windows with Cygwin)

    curl-i k h ' Accept: application / * + xml; " version = 1.5"test@test:test u x POST https://dal01.ilandcloud.com/api/sessions

    This should connect and give you a token of permission-vcloud-x.  If you know that the RestAPI can connect.

    Hope it gets you going, wish I could do more but I do not have a full account to test with their services.

  • How to use the api to query / vcloud api to filter records by ID AdminVAppTemplate?

    I tried the following REST calls:


    Here, I tried to use the href of the vAppTemplate:

    https://VCD.dDEV/API/query?type=adminVAppTemplate & Filter = href is https://VCD.dDEV/API/vapptemplate-ed8aa4df-64be-454a-9acc-48ad25248092

    This means "com.vmware.vcloud.api.rest.parser.QueryParseException: Bad request: href unknown property name.

    Here, I tried to use the ID of the vAppTemplate (preferred method):
    https://VCD.dDEV/API/query?type=adminVAppTemplate & Filter = ID is urn:vCloud:vapptemplate:ed8aa4df - 64be-454-bis-9acc-48ad25248092

    https://VCD.dDEV/API/query?type=adminVAppTemplate & Filter = ID is ed8aa4df-64be - 454 a-9acc-48ad25248092

    the two returned "com.vmware.vcloud.api.rest.parser.QueryParseException: Bad request: name id unknown property.

    Here I was filtering by the parent organization (WORKS)
    https://VCD.dDEV/API/query?type=adminVAppTemplate & Filter = org is 0913b09e-7f78-4DE0-87cd-99f6cbf3227a

    Any thoughts on how I can sort by ID?  or same href?

    Hi jarhorn,

    Currently the query Service does not support filtering based on the href or id property, but you can use the entity resolver to help you since you already know that the property ID take a look at this article for more details - http://blogs.vmware.com/vsphere/2012/05/entity-resolver-in-the-vcloud-api.html

    FYI - we are aware of this limitation today with the query Service and it will be fixed.

    Thank you

  • identification of the Director of virtual cloud into vCloud API

    Hello

    VCloud API, we can try to identify a computer virtual questioning his AdminVMRecord and by comparing these attributes:

    • AdminVMRecord.id
    • AdminVMRecord.vc
    • AdminVMRecord.vdc
    • AdminVMRecord.org

    I think it's safe to uniquly identify each VM in the vcloud, but what happens if I have two different sets of vcloud, which means I have two separate virtual-cloud-Director?

    Is it possible to acquire information of identification-virtual-cloud-Director via vCloud api?

    Thanks for comments in advance.

    To uniquely identify a virtual machine or any object in an instance of vCloud Director (several cells), at least in VCD 1.5, you must use its ID (format URN)

    for example urn: vcloud:vm:71d5b81a-f82d-495a-9e58-4b95a645c841

    If you need identify different vCloud Director forums, you can always use the same ID, but you'll want to capture the href that includes the host name of the VCD instance and if you break the href you will see that it includes the ID of the object as well.

    for example https://vcd1/api/vApp/vm-71d5b81a-f82d-495a-9e58-4b95a645c841

    You can also take a look at these articles for more information:

    http://blogs.VMware.com/vSphere/2012/02/uniquely-identifying-virtual-machines-in-vSphere-and-vCloud-part-1-Overview.html

    http://blogs.VMware.com/vSphere/2012/02/uniquely-identifying-virtual-machines-in-vSphere-and-vCloud-part-2-technical.html

  • Impossible to connect to the vCloud API - not allowed

    Hello

    We are new to vCloud environment and we are currently generating some POCs to become a vCloud provider.

    I'm suppose to integrate vCloud Director with our company portal, but I am currently struggling to connect to the vCloud API. It always throws an error "unauthorized". With the same credentials I can log into the vCloud Director without a problem.

    http:// < server_ip >/API/versions works very well for me, but http:// < server_ip > /api/v1.0/login message "unauthorized."

    I followed a few threads on the same discussion, and I give my user/pass in the following order.

    User@system

    < password >

    Appreciate help on this for me to pursue further away that I fight to achieve this for the last two days.

    Thanks in advance.

    Hello

    You can try with another tool - for example curl?

    Curl for example connection command: curl k u @System: /api/v1.0/login https:// (k option must ignore SSL certificate errors, as appropriate).

    In addition, you can try with a user in a different Organization (non-system).

    Can you also send the contents of the container-vcloud - debug.log after unsuccessful login (it is under/opt/vmware/vcloud-director/logs).

    Todor

  • How to get host real cpu/mem using vCloud API?

    I try to get the actual use of the processor and memory for the host esxi with the vCloud API. Until know I figured out how to get total cpu/memeory available. However, I don't find a way to get use. Is this possible?

    You must use the vSphere API to retrieve that:

    http://pubs.VMware.com/vSphere-50/topic/com.VMware.wssdk.apiref.doc_50/Vim.host.summary.QuickStats.html

  • Sharing a vApp, catalog by using the vCloud API

    I need to share the vApp using the vCloud API but cannot find anything it either relating to the sharing of operation in the API documentation. If someone was able to perform using the API please give me the steps or the example code to do the same.

    Hello

    You can share vApps among members of your organization.

    'Control of access to the catalogues and vApps' - vCloud API Guide 1.5, Pg No. 157.

    GET https://vcloud/api/vApp/{VAPP id} / controlAccess - read access control settings on the vApp.

    POST https://vcloud/api/vApp/{VAPP id} / action/controlAccess - update settings for access control on the paralytic.

    Kind regards

    Rajesh Kamal.

  • vCloud API value limits

    Hello

    I'm trying to define the political parameters on the Organization tab, where limit you the intensive operations resources and the limit of concurrent connections VM, but I do not see the appropriate API calls to do go in the vCloud API directory.

    Is this possible? almost everything on the parameters of the organization seems to be resolved.

    Thank you

    Bjorn Svinis

    Hi Bjorn,

    View/modify these limits is not possible in the latest version of the REST API (v1.5).

    Kind regards

    Todor Todorov

  • Y at - it no vCloud API Java, who can give me the pool of the external IP address list for a particular network of org. ?

    Hello

    I've implemented vCloud Director on my network, when I create an organization network that is NAT-Routed I give him a pool of external IP addresses.

    My Question is that when an organization network is deleted what is happening with this pool of IP, how can retrieve us these IP address.

    Y at - it no vCloud API Java, who can give me the pool of the external IP address list for a particular network of org. ?

    Kind regards

    SachinJ

    Check the examples 6-10 and 6-11 in the vCloud API Programming Guide ("' an Administrative organization network overview").

    Although the 6-11 is abbreviated, 6-10 seems to suggest that the AllocatedIpAddresses element may contain what you are looking for.

    http://pubs.VMware.com/vCloud-API-1/vCloud_API_Guide_Admin.8.7.html#1039433

    I don't know how the Java SDK surfaces this information.

  • vCloud API for private cloud / backwards?

    Hello

    Sorry for the question of novice.  For API vCloud, VMware provides a cloud application on vCenter server endpoint?  It might be useful for my internal private cloud (and I did not need to develop the additional layer on top of my vCenter server).

    From coffee to speak today, I understand that vCloud what API should talk of endpoint of cloud which is implemented by the provider of public/external cloud services (vCloud Express partner).

    For private/inside cloud based on vSphere, we could use vSphere SDK to speak directly to the cloud.  If the vCenter server shows the implementation of vCloud API, I could use the same code (based on the vCloud API) to talk to the public/external and internal/private clouds.

    Thank you.

    Kong

    Hi Kong,

    vCenter Server does not expose endpoint vCloud API at this time.  VCloud Express partners expose endpoints that will be produced computing cloud of VMware that sits on top of vCenter Server.

  • Get 'Access denied' vCloud API client after the time-out period

    The .NET tool we build against the API for vCloud strike sometimes a timeout, which will essentially all subsequent calls (at least for the namespaces for example VAPP, Vdc and VM) fails with an access denied message. There is no doubt that this is because a timeout, because that happens only after a certain amount of inactivity.

    Now, I want to try and detect this "timeout" somehow and act accordingly, for example automatically trigger a disconnection and the client connection (instead of making mistakes). The other option is to have a thread keep alive session by calling some resources very, but really, I don't like the idea of ever having any connected clients.

    Any thoughts on how I can detect that the time-out has hit? I can't count on the fact that "Access denied" mean timeout...

    Thank you!

    / Stefan

    infinitesorrow wrote:

    It's a good suggestion, only that I do not directly use the services REST, but the VcloudSDK and the vCloudRestSchema DLL to in .NET... What would be the equivalent of/api/sessions?

    I'm not sure.

    I'm not a .NET programmer (and don't see anything useful in the .NET SDK documentation), but I don't know that the Java development kit has a RestUtil class with a method 'get' that runs on a URL specified by the arbitrary appellant that could be called "/ api / sessions" to do something in this direction in Java. The .NET development kit may have a similar utility class with such a method?

  • How to remove a network of organization using the vCloud API?

    Hello

    I try to delete a network of internal organisation, using the java sdk:

    AdminOrgNetwork orgNetwork = getOrgNetwork("myNetwork"); // This will query vCloud and return a valid object
    orgNetwork.delete(); // This failes with: "com.vmware.vcloud.sdk.VCloudException: HTTP method not allowed"
    

    For some reason it isn't working and I get ""HTTP method not allowed ". "

    I also check the xml object returned by vCloud and I noticed that missing the link delete:

    <OrgNetwork xmlns="http://www.vmware.com/vcloud/v1.5" name="myNetwork" id="...">
        <Link rel="up" type="application/vnd.vmware.vcloud.org+xml" href="..."/>
        <Link rel="down" type="application/vnd.vmware.vcloud.metadata+xml" href="..."/>
        <!-- Onetwork details -->
    </OrgNetwork>
    
    

    Removal of network does not enjoy using the API? Or maybe I'm doing something wrong?

    No matter what support in how to actually remove the network (which btw is also created using the API) would be much appreciated.

    Thank you

    I think you are trying to delete a view of the user of the org network.

    You should try to suppress the display of the admin of the org network.

    What do you do under the getOrgNetwork ("myNetwork"). How do you get the org network. I think you found the network org user here.

    Get it from the VcloudAdmin-> AdminOrganization-> networks.

    Kind regards

    Rajesh Kamal.

  • Cannot connect to the Derictor vCloud API

    Hi all

    Could you help me with the connect operation?

    The "versions" request works very well:

    ----

    https://vcloudhttp.xxx.LAN/API/versions

    GET/api/versions HTTP/1.1
    Host: vcloudhttp.xxx.lan
    User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; RV:9.0.1) Gecko/20100101 Firefox/9.0.1
    Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
    Accept-Encoding: gzip, deflate
    Accept-Charset: windows-1251, utf-8; q = 0.7, *; q = 0.7
    DNT: 1
    Connection: keep-alive
    Authorization: Basic dmtlcm5lbDp2a2VybmVs
    Cookie: vcloud_session_id = / vtwrKnTKASkBi3dv8Ol2eyGqSksDEE2dW6dwDWFTRg =

    HTTP/1.1 200 OK
    Date: Thu, 26 January 2012 08:53:57 GMT, Thu, 26 January 2012 08:53:58 GMT
    Content-Type: application/xhtml + xml
    Content-Length: 56414

    ----------------------------------------------------------

    , But the connection request always returns the error "401 Unauthorized". The user and the password is the user with the 'System administrator' role (I can connect to the "https://vcloudhttp.xxx.lan/cloud" with these credentials)

    ----------------------------------------------------------

    https://vcloudhttp.xxx.LAN/API/sessions

    POST/api/sessions-HTTP/1.1
    Host: vcloudhttp.xxx.lan
    User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; RV:9.0.1) Gecko/20100101 Firefox/9.0.1
    Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
    Accept-Encoding: gzip, deflate
    Accept-Charset: windows-1251, utf-8; q = 0.7, *; q = 0.7
    DNT: 1
    Connection: keep-alive
    Authorization: Basic dmtlcm5lbDp2a2VybmVs
    Content-Length: 0
    Content-Type: text/plain; Charset = UTF-8
    Cookie: vcloud_session_id = / vtwrKnTKASkBi3dv8Ol2eyGqSksDEE2dW6dwDWFTRg =
    Pragma: non-cache
    Cache-Control: no cache

    HTTP/1.1 401 Unauthorized
    Date: Thu, 26 January 2012 08:42:05 GMT
    WWW-Authenticate: BASIC realm = "vCloud".
    Content-Length: 0
    ----------------------------------------------------------

    https://vcloudhttp.xxx.LAN/API/v1.0/login

    POST /api/v1.0/login HTTP/1.1
    Host: vcloudhttp.xxx.lan
    User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; RV:9.0.1) Gecko/20100101 Firefox/9.0.1
    Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
    Accept-Encoding: gzip, deflate
    Accept-Charset: windows-1251, utf-8; q = 0.7, *; q = 0.7
    DNT: 1
    Connection: keep-alive
    Content-Length: 0
    Content-Type: text/plain; Charset = UTF-8
    Cookie: vcloud_session_id = SSQQi/odxIJ35XBv0K + k6Fdi1y80u23IF5FcIVrQToo =
    Pragma: non-cache, non-cache no.-cache co.,
    Cache-Control: non-cache, non-cache no.-cache co.,.
    Authorization: Basic dmtlcm5lbDp2a2VybmVs

    HTTP/1.1 401 Unauthorized
    Date: Thu, 26 January 2012 09:00:00 GMT
    WWW-Authenticate: BASIC realm = "vCloud".
    Content-Length: 0
    ----------------------------------------------------------

    I tried these queries in 9.01 FF and IE 9.0

    Thanks in advance

    Which user account you use?

    For a system level, it must be:

    'user@system '.

    It would be for a specific org,

    'user@org '.

    If you are past that, sorry - but this seems to come a lot, so I figure that I would like to add it to this post in case anyone else has the question (or that's the question that you see).

Maybe you are looking for