Is it possible to get IDs ManagedObject with PropertyCollector?

I have a java method that uses the PropertyCollector to move from an initial MOR to a table of JAWS and get the properties selected for each managed object - data is returned as a list of cards.  However, one of the data items that I want to get is the ID of the managed objects themselves.  Is this possible?

This is the code I have so far:

/**
     * Traverse from a root object to a sequence of objects, and get the properties of each one
     * 
     * Parameters:
     *  root      - the start object (e.g. a MOR to a HostSystem)
     *  traversal - the traversal to the related objects (e.g. "vm")
     *  traversalType - the MOR type of the objects traversed to (e.g. "VirtualMachine")
     *  properties - a Map of the properties to get (e.g. "runtime.powerState")
     *               to the name to use in the returned Map (e.g. "power_state")
     *               
     * Return value:
     * a list of Maps with the results, one for each MOR traversed to.
     * 
     */
    public List<Map<String, Object>> traverseAndGetProps(ManagedObjectReference root, 
                                                         String traversal,
                                                         String traverseType,
                                                         Map<String, String> properties)
          throws ExecutionFailure
    {
      
      try {
        // create a TraversalSpec from the root to the objects we want to get properties of
        TraversalSpec ts = new TraversalSpec();
        ts.setPath(traversal);
        ts.setType(root.getType());
        
        // Build a PropertySpec from the MO ref type and given property names
        PropertySpec pSpec = new PropertySpec();
        pSpec.setType(traverseType);
        pSpec.setPathSet(properties.keySet().toArray(new String[0]));

        // The object we want to start from which is the given MO ref
        ObjectSpec oSpec = new ObjectSpec();
        oSpec.setObj(root);
        oSpec.setSkip(false);
        oSpec.setSelectSet(new TraversalSpec[] {ts});

        // Combine the property and object specs in the filter
        PropertyFilterSpec pfSpec = new PropertyFilterSpec();
        pfSpec.setPropSet(new PropertySpec[] { pSpec });
        pfSpec.setObjectSet(new ObjectSpec[] { oSpec });

        // Run the search
        ObjectContent ocs[] = _service.retrieveProperties( // PRIV_REQ: System.Anonymous
                                       _sic.getPropertyCollector(),
                                       new PropertyFilterSpec[] { pfSpec });
        if (ocs == null) {
          // We don't really know why the call failed!
          logger.error(_ipAddress + ": failed to get properties - null returned");
          throw new ExecutionFailure(-1, "Failed to get properties - no data");
        }

        // Convert the object content into  a list of hashtable (key/value pairs)
        ArrayList<Map<String, Object>> results = new ArrayList<Map<String, Object>>(); 

        for (ObjectContent oc: ocs) {
          DynamicProperty[] dps = oc.getPropSet();

          if (dps != null) {
            Map<String, Object> result = new HashMap<String, Object>();

            for (DynamicProperty dp:  dps) { 
              if (dp != null) {
                String key = properties.get(dp.getName());
                Object val = dp.getVal();
                if (val != null) {
                  result.put(key, val);
                } else {
                  // skip over null values
                  logger.warn(_ipAddress + ": null value for " + dp.getName());
                }
              }
            }

            results.add(result);
          }
        }
        return results;

      } catch (Exception e) {
        logger.error(_ipAddress + ": Failed to get properties: " + e);
        throw new ExecutionFailure(-1, "Failed to get properties: " + e.getMessage());
      }
    }

You read out ("propSet') properties of objects ObjectContent also has the MOR of the object ('obj').

Tags: VMware

Similar Questions

  • Just upgraded to FF 12 FF 3.6 and most of my favicons are now places dotted. Is it possible to get favicons associated with each web site to load?

    Just upgraded to FF 12 FF 3.6 and most of my favicons are now places dotted. Is it possible to get favicons associated with each web site to load? I've seen some suggested code to add, but I'm not savvy web code. Thank you!

    The extension of CheckPlaces can restore the favicons. It is also ideal for checking the bookmarks to make sure they are still valid.

  • Is it possible to get a T61 with discreet graphics card and no. OS?

    Hello

    Thank you for reading my post.

    I want to know if I can get aT61 with the discreet graphics card and no. OS?

    I don't like to pay for the OS I want to install Ubuntu.

    Thank you

    No, you can't, unless you are a corporate customer, you place your order (at least) several pieces of hundreds.

  • Is it possible to get existing purchases with sandbox account?

    Hi all!
    I test the payment service in my application. After you download the BB world app, I am able to buy the products in accordance with my sandbox account to sand. But I still have a few problems when obtaining existing purchases. I also tried to set the parameter of the function paymentSystem.getExistingPurchase to true and false, but there is no result at all.

    paymentSystem.getExistingPurchase (false);
    paymentSystem.addEventListener (PaymentSuccessEvent.GET_EXISTING_PURCHASES_SUCCESS, function(e:_PaymentSuccessEvent):void

    {

    var purchase: purchase
    var pastPurchases: purchases = e.existingPurchases;
    for (var i: int = 0; i<>
    {

    Buy = pastPurchases [i]

    if(mySKU == Purchase.digitalGoodSKU)

    {

    my code here!

    }

    }

    });

    Any help would be greatly appreciated. Thanks in advance!

    I said that it is a good idea to store information of IPA with the application (app-storage), so that the server does not have to check every time. Only ask if anything has been preserved (Wells also provided a refreshment under settings). This will allow the application to work without a network connection.

    All depends on what the user is "shopping"? If it's levels in a game, you want to know about those. Consumables are more like things that they have only once and if they want again or another, they have to buy.

  • C20/SX20: is there a way to get the cdr with loss/jitter of the stats?

    I'm trying to get a report with loss/jitter, but doesn't cdr can not find a way to do it.

    (a) TMS is able to report COR but only on the participants/duration/encryption/protocol of appeal

    (b) C20 web gui has information but only with a number of clicks on and only for a call each time

    (c) API C20 (cli) I found some commands, but nothing for the loss/jitter
    I tried xstatus Diagnostics appeal channels-> only for calls in progress.
    tried xHistory recent CallLogs | Call-> nothing usable

    Is it possible to get the cdr with jitter/loss for each C20/SX20 counters in a framework?

    Methods to obtain these data is exactly what you have listed and must be carried out during the call.

  • I bought Lenovo G550, 6 months before and now I m is problem with key product of Windows because of the striped top, so please tell me how it would be possible to get this product key

    I bought Lenovo G550, 6 months before and now I got problems with my PC and have problem with the Windows product key due to scratch on it, so please tell me how it would be possible to get this product key.

    Behind my laptop, here is a sticker mentioned
    Proof of license
    Certificate of authenticity
    Microsoft
    Microsoft Corporation @2005
    X 15-53803
    and on the bar code is mentioned after the number.
    00.94 - 893-397-158
    Product key. M... 62-8GX88-69-... - f7b

    Hello BHASKARPIYA,

    Product Key Finder programs, if someone advises to use, is found only on your operating system preinstalled a Levono multiple factory facilities and will be of no use in these circumstances.

    You will need to contact Lenovo and request their assistance.

    Or a way around this is to buy a Lenovo recovery DVD to reinstall the operating system or use the built-in recovery Partition containing an image of your OS and reinstall Windows like that.

    No method requires a product key to be entered by you.

  • Is it possible to get my HP b109 a - m to work with the Microsoft Windows 8 Preview version yet?

    Is it possible to get my HP b109A-m to work in Microsoft Windows 8 Preview version yet?

    I could not use the Windows 7 drivers, are there plans to make Windows 8 drivers for it yet?, or I need to obtain the new printer?
    I installed it in Windows 7, as a second OS, again but want to work in Windows 8, when this is possible also.

    Be that Windows 8 is in a phase of preview and not an official release, its possible that all functions of the printer is not available. This seems to be the issue with your scanner. As far as I know, the print drivers will be after the official release of Microsoft Windows 8. In the meantime, I would order all Windows 8 specific to Board Windows 8 Preview issue.

    Take care

    Sean

  • Is it possible to get a copy of XP Home that is activated by using the activation code provided with the computer?

    My sister recently gave me his old laptop no hard drive and no disk Windows XP.  I installed a HARD drive and installed Windows XP Pro using my own drive I bought for my office (just to check that everything works), but since it is already registered, I can not continue to use it.  I want to remove and reinstall XP Home.la original with the original activation code label is still on the case.  Is it possible to get a copy of XP Home that is activated by using the code on the label?

    Contact the computer manufacturer to buy a disc of installation for the laptop.  If the drives are available, the cost is usually low.

  • my computer with windows broken and now my new computer does not have windows, is it possible to get windows on my new computer from my old?

    my computer with windows broken and now my new computer does not have windows, is it possible to get windows on my new computer from my old?

    Hello

    You tell us what type of license you have.

    If the former was preinstalled, NO, you cannot transfer it.

    Read this information:

    If the laptop came with the preinstalled Windows operating system (Dell, HP, Acer, etc.), this product key supplied with the laptop is preinstalled OEM license and is not transferable.

    OEM license/product key (systems of operating pre-installed on Dell, HP, etc.) is related to the first machine it is installed on and dies when dies of this machine.

    The above applies also to OEM system builders licenses.

    License of operating system in detail, that you buy and install yourself, are allowed to be transferred to another machine.

    And retail licenses also can be installed on a machine at one time.

    ___________________________________________________

    And please read this, you can:

    http://www.Microsoft.com/OEM/en-GB/licensing/sblicensing/pages/licensing_faq.aspx#fBid=cbW6pY-wjS6

    See you soon.

  • Is it possible to get the new Google "I'm not a robot" tick box captcha to use with forms of the created muse?

    Hi did anyone know if it is possible to get and to integrate the new google "I'm not a robot" tick box captcha with forms of the Muse?

    Hello Thrust2014,

    As this feature is not not available in Muse contact forms. Feel free to add this suggestion on the page of the idea of the Muse.

    Click on the link below and click on Actions > idea create .

    Ideas for features in Adobe Muse

    Kind regards

    Vivek

  • Is it possible to get the layer, layerset and layer with status layerset...!

    Hello world!

    Is it possible to get the layer, layerset and layer with the status layerset. Because I met a big problem out of it.

    I have a single PS document which is contain the collection of layer, layer with layer games collection. I need apply the function for each layer and layers and each layer games with of layerset.

    I also tried a code, but its error getting. Please help me out of this code...

    -yajiv

    #target photoshop

    app.bringToFront ();

    level of $= 2;

    var app.activeDocument = docRef;

    Journal of the var ="";

    var x = 0;

    var n = number (docRef.layers.length) - 1;

    for (i = 0; i < n; i ++) {}

    var tm = String (docRef.layers [i]);

    var isLayer = tm.lastIndexOf ("ArtLayer");

    var isLayerSet = tm.lastIndexOf ("LayerSet");

    {if(isLayer!=-1)}

    Check_LayerStructure (DocRef.Layers [i], 'Layer');

    }

    {if(isLayerSet!=-1)}

    Check_LayerStructure (DocRef.layerSets, "LayerSets");

    x = x + 1;

    }

    }

    function Check_LayerStructure (objLayer, objflag, x) {------}

    {if(objflag=="Layer")}

    LayetStructure (objLayer, objLayer.name, BlendMode.NORMAL, 100, 100, 0, true, 'Layer');

    }

    else {if(objflag=="LayerSets")

    LayetStructure (objLayer [x] objLayer [x] .name, BlendMode.PASSTHROUGH, 100, 100, 1, true, 'together');

    m = Number (objLayer [x] .layers. Length)

    for (j = 0; j < m; j ++) {}

    var tm = String (objLayer [x] .layers [j]);

    var isLayer = tm.lastIndexOf ("ArtLayer");

    var isLayerSet = tm.lastIndexOf ("LayerSet");

    {if(isLayer!=-1)}

    Check_LayerStructure (objLayer [x]. Layers [j], 'Layer');

    }

    {if(isLayerSet!=-1)}

    Check_LayerStructure (objLayer [x] .layerSets, "LayerSets", x);

    }

    } / / Loop Layerset

    } / / I loop For

    } //Function loop

    function LayetStructure(layerRef,L,bMode,Opt,fillOpt,S,layVisible,Lref) {}

    {if(layerRef.BlendMode!=bMode)}

    If (confirm (L + Lref + "belend mode was bad...!)) \n"+"do you want to change...? »)) {

    layerRef.blendMode = bMode;

    Journal = Journal + "-" + L + Lref + "belend mode has been changed...! \n\n ";

    e = 1;

    }

    }

    {if(layerRef.Opacity!=opt)}

    If (confirm (L + Lref + ' opacity has been "+ Math.round (layerRef.opacity) +"%...! ")) \n"+"do you want to change...? »)) {

    layerRef.opacity = Opt;

    Journal = Journal + "-" + L + Lref + ' opacity was changed to 100...! \n\n ";

    e = 1;

    }

    }

    If (layerRef.fillOpacity! = fillOpt & & S == 0) {}

    If (confirm (L + Lref + ' Fill has been "+ Math.round (layerRef.fillOpacity) +"%...! ")) \n"+"do you want to change...? »)) {

    layerRef.fillOpacity = fillOpt;

    Journal = Journal + "-" + L + Lref + ' fill has been changed to 100...! \n\n ";

    e = 1;

    }

    }

    {if(layerRef.visible!=layVisible)}

    If (L + Lref + ' left eye...! ") \n"+"do you want to change...? ») {

    layerRef.visible = layVisible;

    Journal = Journal + "-" + L + Lref + ' eye was turn on...! \n\n ";

    e = 1;

    }

    }

    }

    Code of responsible for the action would naturally faster, but if you should be more comfortable with the DOM code, it could be useful to you.

    #target photoshop

    var theLayers = collectLayers (app.activeDocument, []);

    Alert (theLayers.join ("\n"));

    function to collect all the layers.

    function collectLayers (theParent, allLayers) {}

    If (! allLayers) {var allLayers = new Array}

    else {};

    the number of var theParent.layers.length = - 1;

    for (var m = number; m > = 0; m-) {}

    var theLayer = theParent.layers [m];

    apply the function of games of layers;

    If (theLayer.typename == "ArtLayer") {}

    allLayers.push ([theLayer, theLayer.blendMode, theLayer.opacity, theLayer.fillOpacity])

    }

    else {}

    allLayers = (collectLayers (theLayer, allLayers))

    This line includes layer groups;

    allLayers.push ([theLayer, theLayer.blendMode, theLayer.opacity, theLayer.fillOpacity]);

    }

    };

    return allLayers

    };

  • Is it possible to get a word tend to fade and then fade out and then replace it with another word that fades in and then and so on without a person having to scroll to the bottom of the page. I searched for widgets, but I have not found one that does this

    Is it possible to get a word tend to fade and then fade out and then replace it with another word that fades in and then and so on without a person having to scroll to the bottom of the page. I searched for widgets, but I have not found one that does this impeccable for a subtitle.

    You will need to do something like it in a program like Edge animate.

  • is it possible to get variable windows to environment as %username% with javascript?

    is it possible to get variable windows environment such as % username % with javascript using Adobe pro 10?

    Code:

    myTrustedUserName();

    call the function one returns "identity.loginName". You can assign it to a variable:

    var Lname = myTrustedUserName();

    or set a field value

    this.getFieldName("Lname_Field").value = myTrustedUserName();

    or put in an app.alert:

    App.Alert ("username:" + myTrustedUserName());

    or view it in the console

    Console.Show ();

    Console.clear();

    Console.println (myTrustedUserName());

    If you use the table replace "myTrustedUserName()" with "Idefence [loginName]."

    You may need to modify the examples for the name of the field as needed

  • Is it possible to get photos on an old iPod worm iOS 5.1.1 the cloud, photos or on my desk?  My Mac and all the rest is the current version.

    Is it possible to get photos on an old iPod worm iOS 5.1.1 the cloud, photos or on my desk?  My Mac and all the rest is the current version.

    iCloud library requires iOS 8.3 or later. However, you can use the USB cable (cable of load with the detached charger) and connect it to your Mac. See: import photos and videos from your iPhone, iPad or iPod touch - Apple Support

  • Satellite L650: Is it possible to get the higher screen resolution?

    L650-1CH 15.6 ", 1366 x 768.
    ATI HD5650 1 GB

    Passionate about hardware, so please don't feel expected excessive things for me.

    Is it possible to get a screen resolution higher than stock, or better with the color / contrast?

    I was always annoyed how to wash the stock on my watched Toshiba screen. Recently the screen is cracked, so I figure now is the best time to look at the options.

    Google gave me very little information so far. I checked prices on replacement of the screen, with the part about being 60 and part + service with an average of 120, but that most likely leaves me with the same or lower screen quality.

    I hope to find something more suited to the movies / games and in 1600 x 900 if possible.

    Indications as to where I should start my search?

    Hello

    > Is it possible to get a screen resolution higher than stock, or better with the color / contrast?
    Yes, this should be possible since the graphics card should support a higher resolution.

    The laptop supports display TFT 15.6 "(HD).
    You certainly have the same screen size.

    Found some spare parts to the page + + pchub.com

Maybe you are looking for

  • Oddity with Safari...

    OK, so I was rummaging round under the hood this morning, trying to find a solution for a bug. I was happy that the changes I made had not been saved, that I had no permission to the account I was using. In any case, clearly I was not careful enough.

  • TouchPad does not scroll with Win 7 on Satellite A200 PSAE3E

    Hello I have a little problem with the touchpad after update my OS for Win7 (x 86 32-bit).Scrolling with the latest drivers for Win7 from Toshiba and Synaptics does not work well. 14.0.3.0 driver version (2009-08-27) Toshiba A200 PSAE3E Does anyone h

  • Satellite 2590cdt questions in "log".

    HelloFound an old satellite 2590cdt, it includes 95 Microsoft system disk.But with difficulties to operate (had the user manual, but it didn't help me). When I turn it on, without the inserted disk, it says: Insert system disk in drive.Press a key wh

  • After April updates installed WinXP so slow takes more than an hour to connect and create the desktop icons

    Just ran the April updates on Windows XP.Restarted, connected (connection to the normal domain but with no controllers available as domain is no longer in use and I don't want to mess with the settings of the user account).Very slow to build office,

  • Windows 7 XP mode restarts when you access drives other than drive C XP mode

    With integration features enabled in Windows 7 XP mode, I was able to access the drive diskette, USB, Windows 7 C: readers. In the last days, I wasn't able to do. When I try to access these drives, XP mode restarts every time. Can anyone help?