VAPP vCloud query by name of vCO
Hello
I have been using the following analysis as a reference to query an object of VAPP vCloud vCO using a string name.
http://communities.VMware.com/thread/391401
My code looks like:
queryService var = vcloudServer.getQueryService)
var expression = new VclExpression (VclQueryVAppField.NAME, vAppName, VclExpressionType.EQUALS);
filter var = new VclFilter (expression);
var params = new VclQueryParams();
params.setFilter (filter);
var PPPV = new Array();
resultSet var = queryService.queryRecords (VclQueryRecordType.VAPP, params);
While (resultSet! = null) {}
var record = resultSet.getRecords (new VclQueryResultVAppRecord());
System.log (records.length + "records found");
for each {(var record in documents)
If (record.vdc is {vdc.getReference () .href)}
var vAppRef = new VclReference();
vAppRef.href = record.href;
vAppRef.name = record.name;
vAppRef.type = record.type;
vAppRef.push (vdc.getHost () .getEntityByReference (VclEntityType.VAPP, vAppRef));
}
}
resultSet = resultSet.getNextPage ();
}
System.log (vApp (s) found: "+ vApp.length" ' ")
Where vcloudServer is the type vCloud:Host and vAppName is the name of vApp I'm looking for (string type).
The workflow is running, but it never finds anything.
No idea what is the problem here?
(vCO 5.1, vCloud Director 5.1)
Thank you
Juan.
Try:
var vcloudServer = vdc.getHost(); var queryService = vcloudServer.getQueryService() var expression = new VclExpression(VclQueryVAppField.NAME, vAppName, VclExpressionType.EQUALS); var filter = new VclFilter(expression); var params = new VclQueryParams(); params.setFilter(filter); var vApps = new Array(); var resultSet = queryService.queryRecords(VclQueryRecordType.ADMINVAPP, params); while (resultSet != null) { var records = resultSet.getRecords(new VclQueryResultAdminVAppRecord()); System.log(records.length + " records found"); for each (var record in records) { if (record.vdc == vdc.getReference().href) { var vAppRef = new VclReference(); vAppRef.href = record.href; vAppRef.name = record.name; vAppRef.type = record.type; vApps.push(vdc.getHost().getEntityByReference(VclFinderType.VAPP, vAppRef)); } } resultSet = resultSet.getNextPage(); } System.log("vApp(s) found:"+vApps.length);
Tags: VMware
Similar Questions
-
I use the TDM files to save data from the trial. At the file level, I am inserting a number of custom property labels (using the Property.vi defined in the IO file-> storage-> advanced storage pallet).
Is it possible to query the names of these properties once the file has been written? For example, if I put in a custom property "TestLocation", is there a way I can find the name of this property afterwards, so I can read the value?
JoeG
Hey Joe,
Please try the attached VI for the names of the custom properties.
Best regards
Mavis
-
vCloud Director 5.1 with vco 5.5 plugin configuration
I installed the plugin for vCloud director 5.1 in vCenter Orchestrator 5.5, the plug-in installed very well with the certificate that I imported from the url. However, configure the plug-in is another story, when I go to set up the plug-in of the customer or in the page web configuration, I get "failed to connect with the user name. My authorization of vco is configured with LDAP, so is my vCloud Director. In the client workflow 'Add link' vco for vCloud director, my selections are the url to vCloud, port 443, active, max 600 connections, the connection times out 20000 ms, session mode by user, the use and organization system SAML authentication Session. I followed the instructions of the Plugin VMware vCenter Orchestrator Documentation Centre . I tried to configure the plug-in as a shared user and I get the same error. I tried to configure the plugin in the web configuration page and it excludes the host that is the url to vCloud, but I do not see an inventory after that restart services vco and vco customer return logging. My vCloud infrastructure is set up with 2 cells and her sitting behind a vShield load balancing. If I try to configure the plugin to go directly to one of my cells the workflow times out. I have a request of service opened with vmware, but I hope someone else has experienced this problem or might have a few suggestions that will point me in the right direction.
Thank you
J
Changing the IP of my vco did the trick. When I set up the server of vco, I put it on the same subnet as my vcd cells. While my load balancer was on a separate subnet. Assigning the vco server an ip address on a different subnet allowed transmitted traffic of the vco through the load balancer, solve my problem of time-out.
-
Hello
I found that when you use the following combination vCenter Orchestrator is impossible to enumerate objects vCloud Director below the level of vDC of organization:
- vCloud 5.5
- vCO 5.5
- vCloud Director Plugin for vCO 5.1
- Logging on to the Organization of the system.
The following error is reported in the newspapers - I pointed out the relevant sections. What seems to happen is that the following method: com.vmware.vmo.plugin.vcloud.VCloudEntityResolver.getEntityByReference is called, but fails with this exception: com.thoughtworks.xstream.converters.reflection.ObjectAccessException: javax.xml.bind.JAXBElement.name invalid final field. Is there a workaround currently available or a release of out-of-band of the vCloud Director plugin compatible with 5.5?
Any help beyond "this is an unsupported configuration", and "a compatible plugin will be released later this year" would be appreciated, because we depend on vCO to supply our daily operations.
Here is the stack complete error in the case of the developers look on this post:
2013 10-15 10:56:23.021 - 0400 [http-bio-ip-8281-exec-16] ERROR {} [VCloudPluginFactory]
com.vmware.vmo.plugin.vcloud.VCloudPluginException
at com.vmware.vmo.plugin.vcloud.VCloudEntityResolver.getEntityByReference(VCloudEntityResolver.java:107)
at com.vmware.vmo.plugin.vcloud.VCloudPluginFactory.hasChildrenInRelation(VCloudPluginFactory.java:206)
at sun.reflect.GeneratedMethodAccessor136.invoke (unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke (unknown Source)
at java.lang.reflect.Method.invoke (unknown Source)
at ch.dunes.vso.sdk.DirectInvoker.invoke(DirectInvoker.java:55)
at ch.dunes.vso.sdk.SDKDatasourceInvoker.hasChildrenInRelation(SDKDatasourceInvoker.java:136)
at ch.dunes.vso.sdk.SDKFinder._hasChildrenInRelation(SDKFinder.java:266)
at ch.dunes.vso.sdk.SDKFinder.hasChildrenInRelation(SDKFinder.java:241)
at ch.dunes.vso.sdk.ModulesFactory.hasChildrenInRelation(ModulesFactory.java:534)
at com.vmware.o11n.sdk.EnhancedScriptingSDK.hasChildrenInRelation(EnhancedScriptingSDK.java:104)
at com.vmware.o11n.service.sdk.SdkModuleServiceImpl.hasChildrenInRelation(SdkModuleServiceImpl.java:66)
at com.vmware.o11n.service.factory.VcoFactoryFacade.hasChildrenInRelation(VcoFactoryFacade.java:1613)
at sun.reflect.GeneratedMethodAccessor141.invoke (unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke (unknown Source)
at java.lang.reflect.Method.invoke (unknown Source)
at com.vmware.o11n.service.security.AccessRightsInterceptor.invoke(AccessRightsInterceptor.java:92)
at com.vmware.o11n.service.security.AccessRightsInterceptor.invoke(AccessRightsInterceptor.java:83)
at com.vmware.o11n.service.webremoting.VcoDelegatingWebFacade.invokeOperation(VcoDelegatingWebFacade.java:106)
at com.vmware.o11n.integration.initialization.VcoFactoryServiceFacadeProxy.invokeOperation(VcoFactoryServiceFacadeProxy.java:86)
at sun.reflect.GeneratedMethodAccessor119.invoke (unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke (unknown Source)
at java.lang.reflect.Method.invoke (unknown Source)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:319)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:196)
to com.sun.proxy. $Proxy104.invokeOperation (unknown Source)
at sun.reflect.GeneratedMethodAccessor118.invoke (unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke (unknown Source)
at java.lang.reflect.Method.invoke (unknown Source)
at org.springframework.remoting.support.RemoteInvocation.invoke(RemoteInvocation.java:205)
at org.springframework.remoting.support.DefaultRemoteInvocationExecutor.invoke(DefaultRemoteInvocationExecutor.java:38)
at org.springframework.remoting.support.RemoteInvocationBasedExporter.invoke(RemoteInvocationBasedExporter.java:78)
at org.springframework.remoting.support.RemoteInvocationBasedExporter.invokeAndCreateResult(RemoteInvocationBasedExporter.java:114)
at org.springframework.remoting.httpinvoker.HttpInvokerServiceExporter.handleRequest(HttpInvokerServiceExporter.java:73)
at org.springframework.web.context.support.HttpRequestHandlerServlet.service(HttpRequestHandlerServlet.java:67)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at net.sf.ehcache.constructs.web.filter.GzipFilter.doFilter(GzipFilter.java:95)
at net.sf.ehcache.constructs.web.filter.Filter.doFilter(Filter.java:86)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:581)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
at org.apache.catalina.valves.RemoteIpValve.invoke(RemoteIpValve.java:680)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:929)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1002)
to org.apache.coyote.AbstractProtocol$ AbstractConnectionHandler.process (AbstractProtocol.java:585)
to org.apache.tomcat.util.net.JIoEndpoint$ SocketProcessor.run (JIoEndpoint.java:312)
at java.util.concurrent.ThreadPoolExecutor.runWorker (unknown Source)
to java.util.concurrent.ThreadPoolExecutor$ Worker.run (unknown Source)
at java.lang.Thread.run (unknown Source)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.GeneratedMethodAccessor150.invoke (unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke (unknown Source)
at java.lang.reflect.Method.invoke (unknown Source)
at com.vmware.vmo.plugin.vcloud.VCloudEntityResolver.getEntityByReference(VCloudEntityResolver.java:105)
... more than 56
Caused by: com.thoughtworks.xstream.converters.reflection.ObjectAccessException: javax.xml.bind.JAXBElement.name invalid final field
at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.validateFieldAccess(PureJavaReflectionProvider.java:149)
at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.visitSerializableFields(PureJavaReflectionProvider.java:105)
at com.thoughtworks.xstream.converters.reflection.ReflectionConverter.marshal(ReflectionConverter.java:44)
at com.thoughtworks.xstream.core.ReferenceByXPathMarshaller.convertAnother(ReferenceByXPathMarshaller.java:36)
at com.thoughtworks.xstream.converters.collections.AbstractCollectionConverter.writeItem(AbstractCollectionConverter.java:68)
at com.thoughtworks.xstream.converters.collections.CollectionConverter.marshal(CollectionConverter.java:47)
at com.thoughtworks.xstream.core.ReferenceByXPathMarshaller.convertAnother(ReferenceByXPathMarshaller.java:36)
to com.thoughtworks.xstream.converters.reflection.ReflectionConverter$ 1.writeField(ReflectionConverter.java:81)
to com.thoughtworks.xstream.converters.reflection.ReflectionConverter$ 1.visit(ReflectionConverter.java:59)
at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.visitSerializableFields(PureJavaReflectionProvider.java:108)
at com.thoughtworks.xstream.converters.reflection.ReflectionConverter.marshal(ReflectionConverter.java:44)
at com.thoughtworks.xstream.core.ReferenceByXPathMarshaller.convertAnother(ReferenceByXPathMarshaller.java:36)
at com.thoughtworks.xstream.converters.collections.AbstractCollectionConverter.writeItem(AbstractCollectionConverter.java:68)
at com.thoughtworks.xstream.converters.collections.CollectionConverter.marshal(CollectionConverter.java:47)
at com.thoughtworks.xstream.core.ReferenceByXPathMarshaller.convertAnother(ReferenceByXPathMarshaller.java:36)
to com.thoughtworks.xstream.converters.reflection.ReflectionConverter$ 1.writeField(ReflectionConverter.java:81)
to com.thoughtworks.xstream.converters.reflection.ReflectionConverter$ 1.visit(ReflectionConverter.java:59)
at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.visitSerializableFields(PureJavaReflectionProvider.java:108)
at com.thoughtworks.xstream.converters.reflection.ReflectionConverter.marshal(ReflectionConverter.java:44)
at com.thoughtworks.xstream.core.ReferenceByXPathMarshaller.convertAnother(ReferenceByXPathMarshaller.java:36)
at com.thoughtworks.xstream.core.TreeMarshaller.start(TreeMarshaller.java:46)
at com.thoughtworks.xstream.core.ReferenceByXPathMarshallingStrategy.marshal(ReferenceByXPathMarshallingStrategy.java:17)
at com.thoughtworks.xstream.XStream.marshal(XStream.java:476)
at com.thoughtworks.xstream.XStream.marshal(XStream.java:466)
at com.thoughtworks.xstream.XStream.toXML(XStream.java:438)
at net.sf.beanlib.utils.xml.XmlUtils.toXml(XmlUtils.java:28)
at net.sf.beanlib.utils.ObjectUtils.deepCopy(ObjectUtils.java:32)
at com.vmware.vmo.plugin.vcloud.model.ModelHelper.cloneObject(ModelHelper.java:453)
at com.vmware.vmo.plugin.vcloud.model.Vdc.getInstance(Vdc.java:88)
... more than 60
XStream library must be updated to version 1.4.4 + to make it work with Java 7.
Try the following (no guarantee that this will work, however)
- Stop the server vCO
- Locate the plugin files in your deployment of vCO directory (/ app-server/plugins/o11nplugin-vcloud.dar) and save it in a location sure.
- Open it with a program that can read zip files (like WinZip, WinRAR, etc.) and go to "lib" folder
- There should be a file named 'xstream - 1.x.y.jar'. Most likely, you will see "xstream - 1.3.1.jar' (version 1.3.1)"
- You need to replace by ' xstream - 1.4.4.jar' and maybe add a library more - ' xmlpull - 1.1.3.1.jar'. If you can't find these libraries on the Web, I can send them to you by e-mail.
- Remove directories temporary tomcat in the vCO directory (/ app-server/work /, / app-server/temp /)
- Start the server vCO
I don't have a working vCloud environment to test, so it cannot work without having to recompile the plugin, but it won't hurt to try.
-
Move vm between vApps vcloud does not retain custom settings
Hello
I built a workflow based on the workflow "Add a virtual TIME Machine" to move a VM between vApps, however the moving process does not have the custom of the original virtual machine settings.
Anyone know how I can get the 'new' vm from the following script block so that I can re - apply the settings of the original virtual machine which is held?
var recomposeVAppParams = new VclRecomposeVAppParams();var vmItem = new VclSourcedCompositionItemParam();vmName = vm.name;vmItem.source = vm.getReference ();vmItem.sourceDelete = true;vmItem.instantiationParams = new VclInstantiationParams();var numNetConnections = vm.getNetworkConnectionSection ().networkConnection.size ();If (numNetConnections > 0) {}var networkConnectionSection = new VclNetworkConnectionSection();networkConnectionSection.info = System.getModule("com.vmware.library.vCloud.common").createOvfMsg (null, "NetworkConnectionSection");for (netIx = 0; netIx < numNetConnections; netIx ++) {}netCon var = new VclNetworkConnection();netCon.networkConnectionIndex = netIx;netCon.network = 'none ';netCon.ipAddressAllocationMode = VclIpAddressAllocationModeType.NONE;netCon.isConnected = false;networkConnectionSection.networkConnection.add (netCon);}vmItem.instantiationParams.section.add (networkConnectionSection);}recomposeVAppParams.sourcedItem.add (vmItem);task = vApp.recompose (recomposeVAppParams);A simple way would be to get by name. Not elegant, but that would work.
-
vCloud connector - cannot copy VAPP vCloud Director to vSphere
Evening,
Try to copy a paralytic to vCloud Director on vCenter 5.5 5.6 using vCloud connector 2.7.
The scenario:
-vCloud Director fully configured with one Org, an Org vDC and a catalog.
-The catalog is entirely filled, shared and published.
-Org and catalog are configured to allow the publication to external organizations;
-vCenter and vCloud Director have been added to vCloud connector via vSphere Client plug-ins;
-vCloud plug connector is able to see the entire structures of vSphere and vCD (org records, catalogs, vApps, models, etc.).
Reproduce the error:
-Using the vSphere Client, click on the Org vCD;
-Go to the tab vApps.
-Select a VAPP off engine;
-Click on copy.
-Select Catalog (it is marked as shared and, curiously, unpublished);
-Select vCenter as the target;
-Select the clusters, folders, data store, formatting the drive and so on;
-Power On TIME after deploying (or not, does not matter);
-Validate (managed);
-Finishing.
Task starts and fails in a minute (or less) with the following message:
"Export OVF has failed. Failure when copying data to the clouds: https://< vcloud_director_fqdn >. Reason: [0e65fbc1-4e04-4924-ae06-c4377dfc97af] there is no catalog in the organization. »
Looks as vCloud connector, for some reason, is unable to locate the catalog during deployment (although it may be perfectly visible during the Copy Wizard and in his inventory).
I tried searching for it and can't find anything similar to this error.
Maybe it s a vCD configuration error, but how would be? I ve already selected all types of option to allow editing of catalogue and sharing, and nothing has changed.
I published also successfully catalog VCDs to vCloud connector content library, so nothing else makes sense to me.
Solved.
Created a new catalog and IS NOT published. Used for the copy. Went well.
-
Add firewall rules to a VAPP vCloud Director network via PowerCLI
Hi, I am trying to add a VAPP network firewall rules in vCloud Director 5.1 with PowerCli 5.1. This script seems to update, without error, but an update of firewall configuration reveals no change.
Connect-CIServer-Server server.domain.local Org - org01-Director of the username-password xxxxxx - WarningAction SilentlyContinue
$vAppNet = get-CIVAPP 111. Get-civappnetwork vApp_Network
$vApp = get-CIVAPP 111$networkConfigSection = .extensiondata (get-CIVapp 111). GetNetworkConfigSection()
$fwService = New-Object vmware.vimautomation.cloud.views.firewallservice
$fwService.DefaultAction = "drop".
$fwService.LogDefaultAction = $false
$fwService.IsEnabled = $true
$fwService.FirewallRule = New-Object vmware.vimautomation.cloud.views.firewallrule
$fwService.FirewallRule += New-Object vmware.vimautomation.cloud.views.firewallrule
$fwService.FirewallRule [0] .isenabled = $true
$fwService.FirewallRule [0] .description = "TS of TSG"
$fwService.FirewallRule [0] .protocols = New-Object vmware.vimautomation.cloud.views.firewallRuleTypeProtocols
$fwService.FirewallRule [0].protocols.tcp = $true
$fwService.FirewallRule [0] .policy = "enable".
$fwService.FirewallRule [0] .port = "3389.
$fwService.FirewallRule [0] .destinationIp = "Any"
$fwService.FirewallRule [0] .sourceport = "3389.
$fwService.FirewallRule [0] .sourceip = "192.168.1.81 - 192.168.1.89.
$fwService.FirewallRule [0] = 'en '.$vAppNet.extensiondata.configuration.features += $fwService
$networkConfigSection.UpdateServerData)-------------------------------------------------------------------------------------------
When I run $vAppNet.extensiondata.configuration.features to check to see if it has been added, I see it below highlighted in red...
PowerCLI C:\Program Files (x 86) \VMware\Infrastructure\vSphere PowerCLI for tenants > $vAppNet.extensiondata.configuration.features
DefaultAction: dropLogDefaultAction: false
FirewallRule:
IsEnabled: true
Get_anyattr:
VCloudExtension:NatType: ipTranslation
Policy: allowTrafficIn
NatRule:
ExternalIp:
IsEnabled: true
Get_anyattr:
VCloudExtension:DefaultAction: drop
LogDefaultAction: false
FirewallRule: {}
IsEnabled: true
Get_anyattr:
VCloudExtension:-------------------------------------------------------------------------------------------------------------
Change the script a bit generates an error during the update...
-------------------------------------------------------------------------------------------------------------
Connect-CIServer-Server server.domain.local Org - org01-Director of the username-password xxxxxx - WarningAction SilentlyContinue
$vAppNet = get-civappnetwork vApp_Network
$vApp = get-CIVAPP 111
$networkConfigSection = .extensiondata (get-CIVapp 111). GetNetworkConfigSection()
$vAppNetwork = $networkConfigSection.NetworkConfig | where {$_.networkName - eq "vApp_Network"}$fwService = New-Object vmware.vimautomation.cloud.views.firewallservice
$fwService.DefaultAction = "drop".
$fwService.LogDefaultAction = $false
$fwService.IsEnabled = $false
$fwService.FirewallRule = New-Object vmware.vimautomation.cloud.views.firewallrule
$fwService.FirewallRule += New-Object vmware.vimautomation.cloud.views.firewallrule
$fwService.FirewallRule [0] .isenabled = $false
$fwService.FirewallRule [0] .description = "TS of TSG"
$fwService.FirewallRule [0] .protocols = New-Object vmware.vimautomation.cloud.views.firewallRuleTypeProtocols
$fwService.FirewallRule [0].protocols.tcp = $true
$fwService.FirewallRule [0] .policy = "enable".
$fwService.FirewallRule [0] .port = "3389.
$fwService.FirewallRule [0] .destinationIp = "Any"
$fwService.FirewallRule [0] .sourceport = "3389.
$fwService.FirewallRule [0] .sourceip = "192.168.1.81 - 192.168.1.89.
$fwService.FirewallRule [0] = 'en '.$vAppNetwork.Configuration.Features = $vAppNetwork.Configuration.Features | where {!} (() $_-est [vmware.vimautomation.cloud.views.firewallservice])}
$vAppNetwork.configuration.features += $fwService
$networkConfigSection.UpdateServerData)----------------------------
Error
----------------------------
Exception by calling 'UpdateServerData' with '0' or the arguments: "Bad request - Unexpected Exception of JAXB - HVAC-complex - type. 2.4.b: the content of the 'FirewallRule' element is not complete. An a ' {'http://www.}
"VMware.com/vCloud/v1.5":VCloudExtension,"http://www.vmware.com/vcloud/v1.5": Id, ""http://www.vmware.com/vcloud/v1.5 ": IsEnabled, 'http://www.vmware.com/vcloud/v1.5 ': MatchOnTranslate,"http://www.vmware.com "
"/vCloud/v1.5": description, ""http://www.vmware.com/vcloud/v1.5 ": policy,"http://www.vmware.com/vcloud/v1.5 ": protocols, 'http://www.vmware.com/vcloud/v1.5 ': IcmpSubType," "http://www.vmware.com/vcloud/v1.5": P "
"ORT," 'http://www.vmware.com/vcloud/v1.5 ': DestinationPortRange, "http://www.vmware.com/vcloud/v1.5": DestinationIp, ""http://www.vmware.com/vcloud/v1.5 "{: DestinationVm}" ' is expected. ""
On line: 1 char: 39
+ $networkConfigSection.UpdateServerData < < < <)
+ CategoryInfo: NotSpecified: (:)) [], MethodInvocationException)
+ FullyQualifiedErrorId: DotNetMethodException
I was not able to understand how to successfully upgrade. Please, any help would be greatly apprecieated.
Hi, I found my answer, here is the final solution.
$vAppNet = get-CIVAPP 111. Get-CIVAppNetwork vApp_Network
$vApp = get-CIVAPP 111
$networkConfigSection = .extensiondata (get-CIVapp 111). GetNetworkConfigSection()
$vAppNetwork = $networkConfigSection.NetworkConfig | where {$_.networkName - eq "vApp_Network"}$fwService = New-Object vmware.vimautomation.cloud.views.firewallservice
$fwService.DefaultAction = "drop".
$fwService.LogDefaultAction = $false
$fwService.IsEnabled = $true
$fwService.FirewallRule = New-Object vmware.vimautomation.cloud.views.firewallrule
$fwService.FirewallRule += New-Object vmware.vimautomation.cloud.views.firewallruleRule #First
$fwService.FirewallRule [0] .isenabled = $true
$fwService.FirewallRule [0] .description = "allow all outgoing traffic.
$fwService.FirewallRule [0] .protocols = New-Object vmware.vimautomation.cloud.views.firewallRuleTypeProtocols
$fwService.FirewallRule [0] .protocols. ALL = $true
$fwService.FirewallRule [0] .policy = "enable".
$fwService.FirewallRule [0] .destinationIp = "external".
$fwService.FirewallRule [0] .sourceip = "internal".Rule #Second
$fwService.FirewallRule [1] .isenabled = $true
$fwService.FirewallRule [1] .description = "TS of TSG"
$fwService.FirewallRule [1] .protocols = New-Object vmware.vimautomation.cloud.views.firewallRuleTypeProtocols
$fwService.FirewallRule [1].protocols.tcp = $true
$fwService.FirewallRule [1] .policy = "enable".
$fwService.FirewallRule [1] .port = "3389.
$fwService.FirewallRule [1] .destinationIp = 'Any '.
$fwService.FirewallRule [1] .sourceport = "3389.
$fwService.FirewallRule [1] .sourceip = ' 192.168.1.81 - 192.168.1.89.$vAppNetwork.Configuration.Features = $vAppNetwork.Configuration.Features | where {!} (() $_-est [vmware.vimautomation.cloud.views.firewallservice])}
$vAppNetwork.configuration.features += $fwService
$networkConfigSection.UpdateServerData) -
Generate a vCloud Blocking task from a vCo Workflow
Hello
Is there a way to geneate one task blocking vCo vCloud?
I have a workflow that runs due to a vCloud blocking the task, but I need can also generate a blocking vCo vCloud task before completing my workflow and fail or approve the vCo to the workflow is based on a scenario that I chose.
Is this possible?
Thanks in advance,
Ran
Blocking tasks are wide control panel. While you can activate one of vCO he would block all the tasks for a specific operation / API call.
If you want vCO to trigger an operation and you want that he be blocked just enable a task blocking for the proposed operation. Even if it is triggered by the vCO will be blocked.
Christophe.
-
How to query the name summary of custom line of Section header information
I need a query which can help me to retrieve the contents of a header line custom section information name. We have a couple of tables Denorm when data are denormalized, the field row_name is only show the name of alias denormalized. We would like to be able to draw the contents of the line header information section name? How can we use the alias denorm name and join another table to find the associated summary name?
The following query returns the name of the line as well as the line name denorm, for a custom section, where we specify the section custom denorm table. Deserve you this to do otherwise, it depends on how you want to retrieve information. Is that what you are looking for?
SELECT ml. Name [rowName], ml.langID, dr.NAME [denormRowName], Dr. FKROWTEMPLATE, dt. GENERATED_TABLE_NAME
OF DENORM_CS_ROW dr
DENORM_CS_TABLE dt on Dr. FK_DENORM_TABLE_ID = dt.ID inner join
commonextendedattributeml ml on Dr. FKROWTEMPLATE = ml.fkOwner inner join
where dt.NAME = 'myDenormTableName. '
-
How to get the column names in query by query programmatically?
For exampleQuery: select ename as name, empno, job from EMP t Column names: name, empno, job
Agree with sybrand and Billy.
(From my library of examples...) for purposes of demonstration...
As user sys:
CREATE OR REPLACE DIRECTORY TEST_DIR AS '\tmp\myfiles' / GRANT READ, WRITE ON DIRECTORY TEST_DIR TO myuser /
As myuser:
CREATE OR REPLACE PROCEDURE run_query(p_sql IN VARCHAR2 ,p_dir IN VARCHAR2 ,p_header_file IN VARCHAR2 ,p_data_file IN VARCHAR2 := NULL) IS v_finaltxt VARCHAR2(4000); v_v_val VARCHAR2(4000); v_n_val NUMBER; v_d_val DATE; v_ret NUMBER; c NUMBER; d NUMBER; col_cnt INTEGER; f BOOLEAN; rec_tab DBMS_SQL.DESC_TAB; col_num NUMBER; v_fh UTL_FILE.FILE_TYPE; v_samefile BOOLEAN := (NVL(p_data_file,p_header_file) = p_header_file); BEGIN c := DBMS_SQL.OPEN_CURSOR; DBMS_SQL.PARSE(c, p_sql, DBMS_SQL.NATIVE); d := DBMS_SQL.EXECUTE(c); DBMS_SQL.DESCRIBE_COLUMNS(c, col_cnt, rec_tab); FOR j in 1..col_cnt LOOP CASE rec_tab(j).col_type WHEN 1 THEN DBMS_SQL.DEFINE_COLUMN(c,j,v_v_val,2000); WHEN 2 THEN DBMS_SQL.DEFINE_COLUMN(c,j,v_n_val); WHEN 12 THEN DBMS_SQL.DEFINE_COLUMN(c,j,v_d_val); ELSE DBMS_SQL.DEFINE_COLUMN(c,j,v_v_val,2000); END CASE; END LOOP; -- This part outputs the HEADER v_fh := UTL_FILE.FOPEN(upper(p_dir),p_header_file,'w',32767); FOR j in 1..col_cnt LOOP v_finaltxt := ltrim(v_finaltxt||','||lower(rec_tab(j).col_name),','); END LOOP; -- DBMS_OUTPUT.PUT_LINE(v_finaltxt); UTL_FILE.PUT_LINE(v_fh, v_finaltxt); IF NOT v_samefile THEN UTL_FILE.FCLOSE(v_fh); END IF; -- -- This part outputs the DATA IF NOT v_samefile THEN v_fh := UTL_FILE.FOPEN(upper(p_dir),p_data_file,'w',32767); END IF; LOOP v_ret := DBMS_SQL.FETCH_ROWS(c); EXIT WHEN v_ret = 0; v_finaltxt := NULL; FOR j in 1..col_cnt LOOP CASE rec_tab(j).col_type WHEN 1 THEN DBMS_SQL.COLUMN_VALUE(c,j,v_v_val); v_finaltxt := ltrim(v_finaltxt||',"'||v_v_val||'"',','); WHEN 2 THEN DBMS_SQL.COLUMN_VALUE(c,j,v_n_val); v_finaltxt := ltrim(v_finaltxt||','||v_n_val,','); WHEN 12 THEN DBMS_SQL.COLUMN_VALUE(c,j,v_d_val); v_finaltxt := ltrim(v_finaltxt||','||to_char(v_d_val,'DD/MM/YYYY HH24:MI:SS'),','); ELSE v_finaltxt := ltrim(v_finaltxt||',"'||v_v_val||'"',','); END CASE; END LOOP; -- DBMS_OUTPUT.PUT_LINE(v_finaltxt); UTL_FILE.PUT_LINE(v_fh, v_finaltxt); END LOOP; UTL_FILE.FCLOSE(v_fh); DBMS_SQL.CLOSE_CURSOR(c); END;
This allows the header line and the data to write into files separate if necessary.
for example
SQL> exec run_query('select * from emp','TEST_DIR','output.txt'); PL/SQL procedure successfully completed.
Output.txt file contains:
empno,ename,job,mgr,hiredate,sal,comm,deptno 7369,"SMITH","CLERK",7902,17/12/1980 00:00:00,800,,20 7499,"ALLEN","SALESMAN",7698,20/02/1981 00:00:00,1600,300,30 7521,"WARD","SALESMAN",7698,22/02/1981 00:00:00,1250,500,30 7566,"JONES","MANAGER",7839,02/04/1981 00:00:00,2975,,20 7654,"MARTIN","SALESMAN",7698,28/09/1981 00:00:00,1250,1400,30 7698,"BLAKE","MANAGER",7839,01/05/1981 00:00:00,2850,,30 7782,"CLARK","MANAGER",7839,09/06/1981 00:00:00,2450,,10 7788,"SCOTT","ANALYST",7566,19/04/1987 00:00:00,3000,,20 7839,"KING","PRESIDENT",,17/11/1981 00:00:00,5000,,10 7844,"TURNER","SALESMAN",7698,08/09/1981 00:00:00,1500,0,30 7876,"ADAMS","CLERK",7788,23/05/1987 00:00:00,1100,,20 7900,"JAMES","CLERK",7698,03/12/1981 00:00:00,950,,30 7902,"FORD","ANALYST",7566,03/12/1981 00:00:00,3000,,20 7934,"MILLER","CLERK",7782,23/01/1982 00:00:00,1300,,10
-
Get the dynamic query alias name
Hi all
I have a plsql function using a dynamic query.
And the function takes an entire sql query as a parameter.
The main problem is that the function must get what aliases or columns were interviewed.
For example,.
FUNCTION_GET_QUERY_ALIAS ('SELECT 1 AS col1, col2 FROM DUAL 2 AS')
Inside the function, he must find the alias name COL1 and COL2.
I would be grateful for any help.I modified print_table as fact and function to meet your needs.
SQL> CREATE OR REPLACE TYPE my_column_object AS OBJECT(ruw_number integer, column_name VARCHAR2(1000), column_val VARCHAR2(1000)) 2 / Type created. SQL> CREATE OR REPLACE TYPE my_table_type AS TABLE OF my_column_object 2 / Type created. SQL> CREATE OR REPLACE FUNCTION print_table( p_query in varchar2 ) RETURN my_table_type PIPELINED 2 AS 3 l_theCursor INTEGER DEFAULT DBMS_SQL.OPEN_CURSOR; 4 l_columnValue VARCHAR2(4000); 5 l_status INTEGER; 6 l_descTbl DBMS_SQL.DESC_TAB; 7 l_colCnt NUMBER; 8 l_rcount INTEGER := 0; 9 BEGIN 10 DBMS_SQL.PARSE( l_theCursor, p_query, dbms_sql.native ); 11 12 DBMS_SQL.DESCRIBE_COLUMNS( l_theCursor, l_colCnt, l_descTbl ); 13 14 FOR i IN 1 .. l_colCnt 15 LOOP 16 DBMS_SQL.DEFINE_COLUMN(l_theCursor, i, l_columnValue, 4000); 17 end loop; 18 19 l_status := DBMS_SQL.EXECUTE(l_theCursor); 20 21 WHILE ( DBMS_SQL.FETCH_ROWS(l_theCursor) > 0 ) 22 LOOP 23 l_rcount := l_rcount + 1; 24 FOR i IN 1 .. l_colCnt 25 LOOP 26 DBMS_SQL.COLUMN_VALUE( l_theCursor, i, l_columnValue ); 27 28 PIPE ROW(my_column_object(l_rcount,l_descTbl(i).col_name,l_columnValue)); 29 END LOOP; 30 END LOOP; 31 32 RETURN; 33 end; 34 / Function created. SQL> select * from table(print_table('select * from emp')) 2 / RUW_NUMBER COLUMN_NAME COLUMN_VAL ---------- -------------------- -------------------- 1 EMPNO 7369 1 ENAME SMITH 1 JOB CLERK 1 MGR 7902 1 HIREDATE 17-DEC-80 1 SAL 800 1 COMM 1 DEPTNO 20 1 DIV 10 2 EMPNO 7499 2 ENAME ALLEN RUW_NUMBER COLUMN_NAME COLUMN_VAL ---------- -------------------- -------------------- 2 JOB SALESMAN 2 MGR 7698 2 HIREDATE 20-FEB-81 2 SAL 1600 2 COMM 300 2 DEPTNO 30 2 DIV 10 3 EMPNO 7521 3 ENAME WARD 3 JOB SALESMAN 3 MGR 7698 RUW_NUMBER COLUMN_NAME COLUMN_VAL ---------- -------------------- -------------------- 3 HIREDATE 22-FEB-81 3 SAL 1250 3 COMM 500 3 DEPTNO 30 3 DIV 10 4 EMPNO 7566 4 ENAME JONES 4 JOB MANAGER 4 MGR 7839 4 HIREDATE 02-APR-81 4 SAL 2975 RUW_NUMBER COLUMN_NAME COLUMN_VAL ---------- -------------------- -------------------- 4 COMM 4 DEPTNO 20 4 DIV 10 5 EMPNO 7654 5 ENAME MARTIN 5 JOB SALESMAN 5 MGR 7698 5 HIREDATE 28-SEP-81 5 SAL 1250 5 COMM 1400 5 DEPTNO 30 RUW_NUMBER COLUMN_NAME COLUMN_VAL ---------- -------------------- -------------------- 5 DIV 10 6 EMPNO 7698 6 ENAME BLAKE 6 JOB MANAGER 6 MGR 7839 6 HIREDATE 01-MAY-81 6 SAL 2850 6 COMM 6 DEPTNO 30 6 DIV 10 7 EMPNO 7782 RUW_NUMBER COLUMN_NAME COLUMN_VAL ---------- -------------------- -------------------- 7 ENAME CLARK 7 JOB MANAGER 7 MGR 7839 7 HIREDATE 09-JUN-81 7 SAL 2450 7 COMM 7 DEPTNO 10 7 DIV 10 8 EMPNO 7788 8 ENAME SCOTT 8 JOB ANALYST RUW_NUMBER COLUMN_NAME COLUMN_VAL ---------- -------------------- -------------------- 8 MGR 7566 8 HIREDATE 19-APR-87 8 SAL 3000 8 COMM 8 DEPTNO 20 8 DIV 10 9 EMPNO 7839 9 ENAME KING 9 JOB PRESIDENT 9 MGR 9 HIREDATE 17-NOV-81 RUW_NUMBER COLUMN_NAME COLUMN_VAL ---------- -------------------- -------------------- 9 SAL 5000 9 COMM 9 DEPTNO 10 9 DIV 10 10 EMPNO 7844 10 ENAME TURNER 10 JOB SALESMAN 10 MGR 7698 10 HIREDATE 08-SEP-81 10 SAL 1500 10 COMM 0 RUW_NUMBER COLUMN_NAME COLUMN_VAL ---------- -------------------- -------------------- 10 DEPTNO 30 10 DIV 10 11 EMPNO 7876 11 ENAME ADAMS 11 JOB CLERK 11 MGR 7788 11 HIREDATE 23-MAY-87 11 SAL 1100 11 COMM 11 DEPTNO 20 11 DIV 10 RUW_NUMBER COLUMN_NAME COLUMN_VAL ---------- -------------------- -------------------- 12 EMPNO 7900 12 ENAME JAMES 12 JOB CLERK 12 MGR 7698 12 HIREDATE 03-DEC-81 12 SAL 950 12 COMM 12 DEPTNO 30 12 DIV 10 13 EMPNO 7902 13 ENAME FORD RUW_NUMBER COLUMN_NAME COLUMN_VAL ---------- -------------------- -------------------- 13 JOB ANALYST 13 MGR 7566 13 HIREDATE 03-DEC-81 13 SAL 3000 13 COMM 13 DEPTNO 20 13 DIV 10 14 EMPNO 7934 14 ENAME MILLER 14 JOB CLERK 14 MGR 7782 RUW_NUMBER COLUMN_NAME COLUMN_VAL ---------- -------------------- -------------------- 14 HIREDATE 23-JAN-82 14 SAL 1300 14 COMM 14 DEPTNO 10 14 DIV 10 126 rows selected. SQL>
Thank you
Knani.Published by: Karthick_Arp on September 23, 2008 12:11 AM
-
How to query the name of the facility on a language Spec?
I would ask the name of the installation of the scrmEntityFreeTextName table. If I'm trying to get my data from a number of specification formulation, what tables should I join to get SPECSUMMARY a link to scrmEntityFreeTextName?
Select *.
of agile.scrmfacility f, agile.scrmEntityFreeTextName tn
where f.pkid = tn.fkentity
You can use the DatabaseAndObjectSchema tool, located in the Pack of extensibility. This is an HTML document that allows you to navigate the schema of the object or data and can provide the necessary basic SQL statement.
Here are the basic SQL statement that he provided:
SELECT * FROM formulationSpecification t1 INNER JOIN DWBSpecificationRoots t2 ON t1.pkid = t2.fkOwner INNER JOIN dwbSpecifications t3 ON t2.pkid = t3.fkWorkingVersionParent INNER JOIN gsmFormulationFacilityJoin t4 ON t3.pkid = t4.fkSpecID INNER JOIN scrmFacility t5 ON t4.fkFacility = t5.pkid INNER JOIN scrmEntityFreeTextName t6 ON t5.pkid = t6.fkEntity where t1.pkid='581672ba6d3a-f37a-409b-a140-d4cd6eab5606' -- this uses the spec pkid
To use specNumber instead, you join against the specSummary, and then use its SpecID column for join
SELECT t6.name, * FROM --formulationSpecification t1 SpecSummary s INNER JOIN DWBSpecificationRoots t2 ON s.SpecID = t2.fkOwner INNER JOIN dwbSpecifications t3 ON t2.pkid = t3.fkWorkingVersionParent INNER JOIN gsmFormulationFacilityJoin t4 ON t3.pkid = t4.fkSpecID INNER JOIN scrmFacility t5 ON t4.fkFacility = t5.pkid INNER JOIN scrmEntityFreeTextName t6 ON t5.pkid = t6.fkEntity where s.SpecNumber = '5098024-001';
-
Dependent on the value of query column names
Hi guys, I don't think this is possible, but I thought I'd give it a go.
I am wanting to values that are returned by my query as column headings. For example:
SELECT 1,2,3,4,5
OF trade_table
WHERE < 6
The table contains 10 records, "A1", "B1", "C1", "D1", "E1", "F1" etc... and my query returns 5 records of each with a rating of 1 to 5. The first record in the standings, lets say "D1" must be the column heading.
I'm extremely sorry for being vague, but my request first contains a lot of analytical functions and I try to simplify it.
Thanks in advance.To do this with the reporting you tool use and not with SQL and PL/SQL.
-
get the node of SQL query file name
Hi all
I have a concurrent request that requires the name of file as input. For example, when I connect to oracle on our test instance, I use http://moon1.oando-plc.com:8000. For this program at the same time, the node file name appears as moon1.oando - plc.com.
I need to use this argument to a PL/SQL procedure, that I write and I don't want to use any hard coding.
Is it possible to get this data into an SQL statement.
Thank youHello
You can get table ICX_PARAMETERS (HOME_URL column). Orsearch profile options values for 'http' get the login page URL (or server name) - see (Note: 201945.1 - How E-Business Suite profile Option values list for all levels using SQLPlus).
Kind regards
Hussein -
Having an application that communicates with HP8510 & HP8720 NWA. Can I ask what kind of test set is connected, but how I ask not what model of GPIB-USB is connected? A model interface using 'A' requires some State read to complete, but the "HS" crashes (for what seems like the expiration time). If I comment out the code to read state, "HS" works very well. Sort programs NOR that come with 488.2 software can get all kinds of info on the controller. Please tell me the web/manual/whatever page that shows how to do this.
Thank you
Hello
The properties of all of the GPIB cards that you have connected to your computer are found in a GPIB.ini file. The location of this file may be different, based on the version of NOR-488. 2 you have. "" "" I have version 2.52 and on my system, it is located in C:"Documents and Settings" all users "Application Data" National Instruments "NOR-488. 2' gpib.ini. It is imporant to note that this file should not be changed under any circumstances, because it could cause a lot of problems able & Automation Explorer (MAX). Once you open this file, you can see under "BoardName" what Board GPIB is attributed to GPIB0, GPIB1 and so on. You can analyze programmatically then this file (in read-only mode) to see what card is connected to your instrument. Have a great day!
Kind regards
Todd v.
Maybe you are looking for
-
Update to os 10.10 will delete my files or programs?
Update to os 10.10 will delete my files or programs?
-
When I download (save a file) where is she going? Why can't directly where I want to go? IE allows me to choose where I save each file to
-
Satellite Pro A100 is not recognized any amount of RAM
Hello I have a Satellite Pro A100 and I just bought 1 GB of additional memory. There are two locations, each with a capacity of 1 GB.When I put the new memory into the slot and the old 512 MB original memory in slot B and the computer says it is 1 GB
-
Why iTunes automatically 'check' all my purchased songs?
After recently updated to 12.3.2.35 and subsequently sign with my apple ID to download their new album, all of a sudden ALL my never purchased pieces were marked as checked and started to copy on my iPhone. I had carefully unchecked several of these
-
Comments endangered after update?
My Adobe Acrobat Reader DC updated on its own last night. Now, when I comment and my cursor away from the new comment, it disappears. Comments save because when I return to the page and hover over the where I put the comment of my cursor, it will ret