Quantcast
Channel: VMware Communities : Discussion List - All Communities
Viewing all articles
Browse latest Browse all 193198

DataRequest of other vSphereObjects

$
0
0

Hello,

 

This is with regards to using DataProviderAdapter, with reference to views-properties-ui example. The data that is being fetched is for vsphere objects such as Datastore,VirtualMachine. However in my usecase I want to get all the HostSystem->networksystem properties from the Host

 

For which I have defined by Dataobject as follows

 

 

[Bindable]
[Model(type="HostConfigManager")]
public class NetworkDataItem extends DataObject      {
[Model(property="configManager.networkSystem.networkInfo.vswitch.name")]
public var vsname:String;

 

 

And my requestData()  lookes like this just like in the example datastore is being called but I'm calling network . However the sample program works but not my plugin.

 

So the questions I have is

 

a. What vsphere objects can we query as it is given in the example ?

 

 

I'm following example HostSystem->datastore->

but HostSystem->configManager doesn't work . This behavior is odd and vsphere web client sdk documentation doesn't provide any information about this.

 

Thanks!

 

private function requestData():void {

      // Add code to initialize your UI data, for instance dispatch a data request event

      // to fetch data from the server.

  //Alert.show("Hey You are here " + _contextObject.uid);

   // Use the data request option for implicit updates of the view,

   // i.e. when the object changes for instance.

   var requestInfo:DataRequestInfo =

   new DataRequestInfo(DataUpdateSpec.newImplicitInstance());

  

   // First create a constraint to find all datastores for this host

   var constraint:Constraint = QuerySpecUtil.createConstraintForRelationship(

   _contextObject, "configManager");

  

   // Then create a DataByConstraintRequest to get the datastore properties defined

   // in the DatastoreDataItem model, their name and file system type.

   var request:DataByConstraintRequest = DataByConstraintRequest.newInstance(

   constraint, NetworkDataItem, requestInfo);

   dispatchEvent(request);

  

  

   }


Viewing all articles
Browse latest Browse all 193198

Trending Articles



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