Quantcast
Channel: VMware Communities : Discussion List - vSphere Client SDK
Viewing all 2218 articles
Browse latest View live

What is the rest end point to login VCenter

$
0
0
What is rest end poing and how can i use same with basic authentication?

Black row is appering in default height & width of HTMLSDK Modal

$
0
0

snnipet2.pngsnippet1.PNG

we are using HTML5SDK to open modal, we are using width- 864px height- 450px, This is the default values of height & width of wizard appending in the modal.

we are getting black row with this height parameter.

 

Thanks in advance!

First attempts with remote-plugin sample. HTTP Error 405- Get is not supported for url: https:///api/ui/htmlClientSdk.js

$
0
0

Hi

I've been trying to work with the Remote Plug-in Sample found in the vCenter 6.7U1 SDK.

I am able to build the sample, start it and register it in my Windows vCenter 6.7U1.

 

The plug-in is deployed, and I can see it in the html client.  But when I click on the Global View, the page is empty. In my Browser Console, I see the error above.

Can some one tell me how to handle this?  Did I do something wrong?

thanks for the help

Cathy

sometimes WstxInputFactory not found on vimPort.retrieveServiceContent

$
0
0

I have some strange behaviour in action extension I've added. Sometimes vimPort.retrieveServiceContent fails on class not found exception and message

 

'javax.xml.stream.FactoryFinder$ConfigurationError : Provider com.ctc.wstx.stax.WstxInputFactory not found'

 

What is strange that sometimes the same code is working well. Does someone have any ideas how to get it working always and why it is happens?

 

thanks

Actions [Right Click] are not visible for any custom objects datagrid in HTML-Client

$
0
0

Problem Statement:

we are working on a vsphere webclient plugin running in both flex and HTML client. Developed using webclient SDK 6.7 .

While testing we found actions [Right Click] are not visible on any custom objects datagrid in HTML-Client only. Where as same actions are visible on Flex client and working as expected.

In my ModelObject we defined scheme as 'XXX'.

Code Snip:

publicabstractclass ModelObject implements Serializable {

 

privatestaticfinallongserialVersionUID = 1L;

publicstaticfinal String SCHEME = "xxx";

publicstaticfinal String NAMESPACE = "xxxxUI";

publicstaticfinalcharURI_SEPARATOR = ':';

publicstaticfinalcharFRAGMENT_SEPARATOR = '/';

publicstaticfinal String UID_PREFIX = SCHEME + URI_SEPARATOR + NAMESPACE;

We found a Solution:

After looking into some sample codes we found that in ModelObject we need to modify SCHEME = “urn:XXX”, whereas urn: is a prefix. Post these changes actions are visible on HTML-Client.

We want to ensure that above approch is valid and doesn't fall into further regression as we are not able to find any documentation from VMware for the namespace convention.

Should ModelObject namespace maintain XXX:XXX format?

HTML client view not refreshed after performing action

$
0
0

When viewing one of my custom objects (e.g. on its Summary view), the client does not receive a refresh event after an action is performed (using the "Actions" drop-down menu). Is this a known issue, or something not covered in the "chassis-b" sample? Is there a way to ensure that the client is updated?

 

I really hope this is a bug (or an error in my plugin) rather than by design. This issue means that stale information is always left in the main UI after performing an action, which is a really poor user experience. I hope I've missed something here - otherwise, it seems the "Actions" drop-down is basically unusable for HTML plugins.

 

 

I have used the setGlobalRefreshHandler() call to register the refresh callback, and it is called correctly when manually clicking on the Refresh button in the VMWare toolbar.

 

I have set the action handler in the service Java code to call actionResult.setObjectChangedResult(), and I can see the VMWare-controlled fields (on the navigation pane, and in the title of my summary page to the left of the "Actions" drop-down menu) update when the action completes.

 

Even the Refresh icon in the VMWare toolbar turns into the spinning busy icon as the action occurs, before returning to its static image - but my refreshData() function is never executed unless the user manually clicks the Refresh button.

 

 

Any suggestions/solutions much appreciated!

Flex web client's page display problem

$
0
0

Hello

I had a problem with the flex web client's page display.

The problem is shown in figure.

Under flex web client, when the browser is zoomed out, the wizard's display is extruded.

Has this problem been solved or will it be solved later?

Please let me know if you have any definite information.

Thank you very much!

Has this problem been solved or will it be solved later?
 
Please let me know if you have any definite information.
 
Thank you very much!

Conflicts with vim25 between plug-ins

$
0
0

Hi Laurent,

 

we are now working on our newest version of the plug-in using the 6.5 sdk for production.  Our plug-in is working fine here.

But now we have installed another plug-in (from a different company) and then tried to deploy our plug-in again.

Our plug-in will not now be deployed.

When the plugin package is read, it tries to deploy vim25.jar.  That fails because it is already deployed by another plug-in.

Then our plug-in won't be deployed, because it has a missing dependency.

 

I was wondering (for a long time now), why it is necessary for the plug-ins to bring the vim25.jar with them. It

seems strange, that such an important jar, which is used by probably all providers is not installed already in

server/repository/usr directory.  Can you tell us why - so we can understand that?  And if it is not posible, how we

can get around these problems?

 

Many thanks

Cathy

 

 

 

Here's the log:

 

[2016-12-15T09:02:07.787+01:00] [ERROR]  Connection(13)-111.111.22.22  org.eclipse.virgo.kernel.deployer.management.StandardDeployer     Exception filtered from JMX invocation org.eclipse.virgo.nano.deployer.api.core.DeploymentException: The artifact bundle 'com.vmware.wsvim25' version '6.5.0' in scope 'null' at URI 'file:/C:/ProgramData/VMware/vCenterServer/cfg/vsphere-client/vc-packages/vsphere-client-serenity/com.acme.gui-2.0.0/plugins/vim25.jar' cannot be stored in the runtime artifact model as it clashes with the artifact bundle 'com.vmware.wsvim25' version '1.0.0' in scope 'null' which is already present.
at org.eclipse.virgo.kernel.deployer.core.internal.PipelinedApplicationDeployer.doInstall(PipelinedApplicationDeployer.java:179)
at org.eclipse.virgo.kernel.deployer.core.internal.PipelinedApplicationDeployer.install(PipelinedApplicationDeployer.java:140)
...
Caused by: org.eclipse.virgo.kernel.deployer.model.DuplicateFileNameException: The artifact bundle 'com.vmware.wsvim25' version '6.5.0' in scope 'null' at URI 'file:/C:/ProgramData/VMware/vCenterServer/cfg/vsphere-client/vc-packages/vsphere-client-serenity/com.acme.myplugin-2.0.0/plugins/vim25.jar' cannot be stored in the runtime artifact model as it clashes with the artifact bundle 'com.vmware.wsvim25' version '1.0.0' in scope 'null' which is already present.
at org.eclipse.virgo.kernel.deployer.model.internal.StandardRuntimeArtifactModel.checkFileName(StandardRuntimeArtifactModel.java:100)
at org.eclipse.virgo.kernel.deployer.model.internal.StandardRuntimeArtifactModel.add(StandardRuntimeArtifactModel.java:78)
at org.eclipse.virgo.kernel.deployer.core.internal.PipelinedApplicationDeployer.addGraphToModel(PipelinedApplicationDeployer.java:303)
at org.eclipse.virgo.kernel.deployer.core.internal.PipelinedApplicationDeployer.doInstall(PipelinedApplicationDeployer.java:174)
... 39 common frames omitted

[2016-12-15T09:02:07.808+01:00] [INFO ]  Connection(13)-111.111.22.22  org.eclipse.virgo.medic.eventlog.default                         ME0003I Dump 'C:\PROGRA~1\VMware\VCENTE~1\WEBCLI~1\server\serviceability\dump\2016-12-15-09-02-804' generated
[2016-12-15T09:02:07.832+01:00] [ERROR] vc-extensionmanager-pool-121 70000086 100004 200001 com.vmware.vise.extensionfw.impl.JMXBundleDeployer                Error deploying file:/C:/ProgramData/VMware/vCenterServer/cfg/vsphere-client/vc-packages/vsphere-client-serenity/com.acme.myplugin-2.0.0/plugins/vim25.jar javax.management.RuntimeMBeanException: java.lang.RuntimeException: org.eclipse.virgo.nano.deployer.api.core.DeploymentException: The artifact bundle 'com.vmware.wsvim25' version '6.5.0' in scope 'null' at URI 'file:/C:/ProgramData/VMware/vCenterServer/cfg/vsphere-client/vc-packages/vsphere-client-serenity/com.acme.myplugin-2.0.0/plugins/vim25.jar' cannot be stored in the runtime artifact model as it clashes with the artifact bundle 'com.vmware.wsvim25' version '1.0.0' in scope 'null' which is already present.
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.rethrow(DefaultMBeanServerInterceptor.java:839)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.rethrowMaybeMBeanException(DefaultMBeanServerInterceptor.java:852)
...
[2016-12-15T09:02:13.938+01:00] [INFO ]  Connection(13)-111.111.22.22  o.e.v.k.m.i.deployer.ModelInstallArtifactLifecycleListener        Processing installing event for bundle 'com.acme.provider' version '2.0.0'
[2016-12-15T09:02:13.948+01:00] [INFO ]  Connection(13)-111.111.22.22  org.eclipse.virgo.medic.eventlog.default                         DE0000I Installing bundle 'com.acme.provider' version '2.0.0'.
[2016-12-15T09:02:13.951+01:00] [INFO ]  Connection(13)-111.111.22.22  o.e.virgo.kernel.userregion.internal.quasi.DependencyCalculator   Calculating missing dependencies of bundle(s) 'com.acme.provider_2.0.0'
[2016-12-15T09:02:14.122+01:00] [INFO ]  Connection(13)-111.111.22.22  org.eclipse.virgo.medic.eventlog.default                         ME0003I Dump 'C:\PROGRA~1\VMware\VCENTE~1\WEBCLI~1\server\serviceability\dump\2016-12-15-09-02-025' generated
[2016-12-15T09:02:14.2.0.01:00] [ERROR]  Connection(13)-111.111.22.22  org.eclipse.virgo.medic.eventlog.default                         DE0002E Installation of bundle 'com.acme.provider' version '2.0.0' failed. org.eclipse.virgo.kernel.osgi.framework.UnableToSatisfyBundleDependenciesException: Unable to satisfy dependencies of bundle 'com.acme.provider' at version '2.0.0': Cannot resolve: com.acme.provider
    Resolver report:
        An Import-Package could not be resolved. Resolver error data <Import-Package: com.vmware.vim25; version="[6.0.0,7.0.0)">. Caused by missing constraint in bundle <com.acme.provider_2.0.0>
             constraint: <Import-Package: com.vmware.vim25; version="[6.0.0,7.0.0)">

at org.eclipse.virgo.kernel.install.pipeline.stage.resolve.internal.QuasiResolveStage.process(QuasiResolveStage.java:46)
at org.eclipse.virgo.kernel.install.pipeline.internal.StandardPipeline.doProcessGraph(StandardPipeline.java:62)


Clarity/Angular modal memory leak

$
0
0

Hi folks,

There has been a recent discovery of a memory leak (up-to 2-3MB) of Clarity/Angular modals mostly in dev mode:

It has been fixed in the Clarity component and backported to some of the older Clarity releases. Nevertheless, if you are using Clarity it is probably a good time to try Clarity 1.0 which has been released a few days ago.

Apart from the memory leak fix it also contains improvements to grids and other areas: https://vmware.github.io/clarity/documentation/v1.0

Cheers,

Vladi

VMware vSphere Client 6.5 U2d is Available!

$
0
0

Hi All,

 

I am pleased to announce that the vSphere 6.5 U2d is available now.

Although there is no new version of the vSphere Client SDK, the vSphere Client comes with some cool improvements and fixes:

- Ability to define submenus and separator on vSphere Objects. Previously, it was possible to add only one level of action menu items and no separators

- The "sendModelChangeEvent()" JS API now works correctly when called with "ADD" operation type

- The plugin localization now fallbacks to English US if the current vSphere Client locale is not supported by the plugin

- Fixed a concurrency issue which sometimes resulted in the Java "getUserSession()" API returning null

- Fixed misbehaving extension filtering in multi-vCenter Server environments. Now, plugin extensions are visible only on the vCenter Server on which the plugin is registered.

 

Of course there are many more improvements and optimizations.

Please try the new vSphere Client and share your feedback.

 

Best Regards,

Denis

Resource pool tree export

$
0
0

have anyone tried to parse the Resource Pool tree export which you do when disabling DRS in Web Client?

It seems the file produced is some serialized data but I have trouble getting the classes needed to parse it.

java.lang.ClassNotFoundException: com.vmware.vsphere.client.cluster.rp.MorTree, xpsr.3com.vmware.vim.binding.vmodl.ManagedObjectReference

 

So question is where to get the classes, or if anyone tried to parse this?

Incorrect VirtualDisk.NumberWriteAveraged from QueryAvailableMetric

$
0
0

I've recently been looking over some of the data collected by QueryAvailablePerfMetrics, and I came across some inconsistent data regarding the Disk Write IO metrics, specifically for Virtual Disks - "virtualdisk.numberwriteaveraged.average" 

I'm seeing values 50-100x what I see in vCenter - I see around 120 max in the performance graph for virtual disks (customized to show number write average) when doing a test of writing from /dev/random to a file, but the API reports 12000+ (not exactly 100x). Interestingly enough, when I do a iostat on the VM and monitor write rate, I don't see it going past 30, which makes me wonder what these numbers mean.

I'm calling the API (https://pubs.vmware.com/vi3/sdk/ReferenceGuide/vim.PerformanceManager.html#queryAvailableMetric) using entity = a VM MOR, start time = current time - 1hr, end time = 1hr, interval = PerformanceManagerSummary::getRefreshRate (https://www.vmware.com/support/developer/converter-sdk/conv61_apireference/vim.PerformanceManager.ProviderSummary.html#refreshRate)

 

Am I calling the API wrong? Or just misunderstanding the metrics?

Unable to add tab in datacenter or any other vmwre mangaed object related item view.

$
0
0

Hi,

  We are developing a plugin similar as demonstrated in chassis app.

  In our Custom object we have more object view where we show host, datacenter, virtualmachine listView.

  Similarly we want to show our custom object list in datacenter, datastore and host related item.

 

Tried with below sample code but .

 

<extension id="xxx.xxx.xxx.relateditems.specs.host">

   <extendedPoint>vise.relateditems.specs</extendedPoint>

   <object>

      <type>HostSystem</type>

      <relationsViewId>vsphere.core.host.related</relationsViewId>

      <relationSpecs>

         <com.vmware.ui.relateditems.model.RelationSpec>

            <id>XXXForHost</id>

            <icon>#{XXX}</icon>

            <label>Test Plugin relation</label>

            <relationXXX</relation>

            <targetType>XXX:XXX</targetType>

            <listViewId>xxx.xxx.xxx.list</listViewId>

         </com.vmware.ui.relateditems.model.RelationSpec>

      </relationSpecs>

   </object>

</extension>

 

IN HTML CLIENT 6.7

   Is it possible to add new tab in datacenter/host/datastore related view ?

   Any other place in vmwre workspace object where i can show my custom object list ?

UserSessionService.getUserSession() is throwing exception after long inactivity on vSphere web client

$
0
0

Hi,

We have a html plugin for vSphere Web Client. After a long inactivity (an hour or so) on vSphere web client, navigating around web client seems fine (session timeout has not occurred). But when navigated to our plugin, an null pointer exception is thrown in the service layer. When debugged further, we found that userSession or userSession.serversInfo is NULL. When this occurs, we always have to logout and relogin again to navigate to our plugin.

UserSession userSession = _userSessionService.getUserSession();

Do you have any suggestions why his might be occurring and how to fix it?

Appreciate any responses. Thanks in advance.

How the ServerInfo is being set in com.vmware.vise.usersession.UserSession ?

$
0
0

Hi,

 

      I am working in Vcenter plugin for Vrops. Can anyone please help me in identifying how the ServerInfo is being populated in  com.vmware.vise.usersession.UserSession?.

In many Cases i see this

"userSessionService.getUserSession().serversInfo[0].name" value is coming as FQDN(i.e hostname.domainname), but i recently saw one case where it is giving only the host name and not the domain part of it. Is it taking from DNS?.How can i check this value?

 

Kindly help me

 

Thanks

Dhayaanandh P


my java plugin use 3rd party jars

$
0
0

My java plugin can use 3rd party jars that is not  OSGI bundle packages.file:///D:/study/vsphere-web-client-sdk-6.7.0-10244866/flex-client-sdk/docs/FAQ.html#using-bundlor

 

I tried to  "inline"(or nest) the library insede my plugin bundle:

 

  • Add this to your MANIFEST.MF
    Bundle-ClassPath: .,myOtherLib.jar 
  • Include myOtherLib.jar at the root level of your plugin jar. It will be searched by the class loader along with the other classes from your plugin. 
  • If you generate the manifest with bundlor you may need to add a list of packages in Excluded-Imports: and Excluded-Exports: to be sure your plugin bundle doesn't export or import things that will interfere.

 

but that also did'nt worked got errors as:

 

Error retrieving deployment data for the plugin package at /etc/vmware/vsphere-client/vc-packages/vsphere-client-serenity/com.emc.asd.powerpath.licenseappliance-2.3.0 java.io.IOException: The bundle at /etc/vmware/vsphere-client/vc-packages/vsphere-client-serenity/plugins/jaxws-rt.jar should have Bundle-SymbolicName and Bundle-Versionheaders in its MANIFEST.MF

 

Can someone please help me fixing this.

 

Task being created multiple times.

$
0
0

Hi there,

I was creating a simple script to Clone VM from .csv list. It was working well on certain vCenter, however, when tried on different vCenter, the task was created multiple time resulting in an error saying that the vm already exist, I'm not sure why this happens on this server specifically.

Attached is a screenshot of the error & the script used. 

Failed to connect to VMware Lookup Service - SSL certificate verification failed

$
0
0

Hi everyone,

 

I registered a local vsphere-ui instance with the vCenter Server 6.7.0, which is newly installed with a static ip. When I opened "https://localhost:9443/ui/" in my browser I got the following error

 

[400] An error occurred while sending an authentication request to the vCenter Single Sign-On server - An error occurred when processing the metadata during vCenter Single Sign-On setup - Failed to connect to VMware Lookup Service https://193.168.142.138/lookupservice/sdk - SSL certificate verification failed..

 

I found a solution showed in this link Failed to connect to VMware lookup service - David Hill ,but it cannot solve my issue. As the following picture shows, there is no "Toggle certificate" button in the Admin tab. Give me some help, please.

1.png

conflicts caused by vim25.jar when registering a plugin

$
0
0

I have my plugin registered to vCenter client,but I have some questions about vim25.jar.

I declare com.vmware.vim25 and com.google.gson as import-package in the MANIFEST.MF of myService.jar.

manifest.png

The two jars are alse declared In the plugin-package.xml as followed, and we put them into the /plugins directory.

        <bundlesOrder>

           <!-- List the jar bundles from the /plugins directory in loading order:

              3rd party libraries first then your java service bundles. UI war bundles

              are not needed here, they will be loaded automatically after the jars.

              Bundle Ids must match the Bundle-SymbolicName in each plugin's MANIFEST.MF

           -->

           <bundle id="com.vmware.wsvim25" />

           <bundle id="com.google.gson" />

           <bundle id="myService" />

        </bundlesOrder>

 

Even though I don't konw why the two jars are specially declared here and how they work, I just do that as my former developers did.

Then a problem has come to me. When another plugin is installed, it conflcts with mine. I found that vim25.jar in the /plugins directory is the cause.

I tried the solution in OSGi-specific recommendations. I edited the MANIFEST.MF of myService.jar as followed.

manifest-edit.png

Then I removed the jar both from the plugin-package.xml and the /plugins directory.

My plugin can be registered successfully, but when the program uses vim25.jar, some Exception comes out.

The Excetion report is attached. It seems that vim25.jar cannot be found.

Could anyone tell me how to deal with this? Thank a lot.

 

 

 

 

Filtering Based on User Privilege Level doesn't work for object navigator extension point

$
0
0

Hi,

I'm developing a plugin for vSphere html client(build number 6.5.0.20000).  I want to add a entry in the global object navigator, and limit the access to vCenter user who has privilege Global.Licenses(just for example here). Sample plug-in.xml below. I login with vCenter administrator which has all privileges, but when access it,  H5 client shows "You have no privileges to view this object or it does not exist.". It works if i remove the privilege metadata. This issue blocks the implementation of privilege control for the extension. Is it a H5 client defect? It would be appreciated if you can shade some light on this asap, tks.

<extensionid="entryPoint">
<extendedPoint>vise.navigator.nodespecs</extendedPoint>
<object>
<title>test</title>
<parentUid>vsphere.core.navigator.solutionsCategory</parentUid>
<navigationTargetUid>home</navigationTargetUid>
<viewOpenedUponFocusclassName="com.vmware.ui.objectnavigator.views.CategoryNodeTreeView"/>
</object>
</extension>
 
<extensionid="home">
<extendedPoint>vise.global.views</extendedPoint>
<object>
<name>test</name>
<componentClassclassName="com.vmware.vsphere.client.htmlbridge.HtmlView">
<object>
<root>
<url>/vsphere-client/test/index.html?view=home</url>
</root>
</object>
</componentClass>
</object>
<metadata>
      <privilege>Global.Licenses</privilege>
</metadata>
</extension>
Viewing all 2218 articles
Browse latest View live


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