Limit the items returned VM with a specific tenant

I'm trying to build a simple request action vCAC for all virtual machines within a given tenant vCAC whose production will populate a drop-down list for use in an ASD project. I'm able to return all virtual machines, including the virtual machines that have not been deployed by vCAC using the script below.

var arrVCACVirtualMachines = Server.findAllForType ("vCAC:VirtualMachine");

System.log ("Found" + arrVCACVirtualMachines.length + "VMs");

for (var i = 0; i < arrVCACVirtualMachines.length; i ++) {}

System.log (arrVCACVirtualMachines [i] .virtualMachineName + 'Found-');

}

Two questions, a first of all, is it normal to receive all managed vCAC VMs and unmanaged vCenter VMs? In the second, filter for virtual machines to a single tenant supported? I can't find a link in the data model. TIA.

Hi, I think you can try vcaccafe:catalogresource instead of vcac:virtualmachine

Try this

var VM = new Array();

var i = 0;

var vCACVirtualMachines = Server.findAllForType ("vCACCAFE:CatalogResource");

for each {(var vCACVirtualMachine in vCACVirtualMachines)

var tenant = vCACVirtualMachine.Organization.toString ();

Posi var = tenant.search ("tenant :");

FPOS var = tenant.search(",");

tenant = tenant.substring(posi+8,posf);

System.log (holding);

If (tenant is 'yourtenant')

{

Virtual machines [i] = vCACVirtualMachine;

i ++ ;

}

}

The output is vcaccafe:catalogresource... maybe you need to change this to another type (check this https://communities.vmware.com/blogs/sergioatvmware/2014/07/01/how-to-get-the-actual-iaas-vm-from-a-provisioned-vcac-catalog-resource-vm)

Kind regards

Leandro.

Tags: VMware

Similar Questions

  • Limit the rows returned from a sql prompt of dashboard

    Hello

    I use the following sql in the dash prompt to generate a list of values:
    SELECT LEFT (MONTHNAME ("begins and ends in days". (("" Start date "), 3) | » -'|| RIGHT (CAST (YEAR ("begins and ends in days". ((("" Start date ") AS VARCHAR (4)), 2) FROM the"metric"where"begins and ends in days. "" Start date "< = TIMESTAMPADD(SQL_TSI_MONTH, 1,current_date) ORDER BY 'Start and End Days '. "' Start date ' DESC
    which gives me an output like MAY-13,APR-13,MAR-13,FEB-13,JAN-13,DEC-12...;

    Is there a way to limit the release until FEB - 13...

    Thank you
    Sunny

    Use this
    where ' start and end days '. " Start date.<=TIMESTAMPADD(SQL_TSI_MONTH,>
    and "start and end days '." Start date "> = TIMESTAMPADD (SQL_TSI_MONTH,-2, current_date)"

    Check if help

  • How to limit the rows returned from the user role-based interactive reports

    Hello

    I'm a new Apex-PL/SQL Developer, looking for some recommendations on how to implement an interactive report to display different lines in your current application ROLE service.

    For example let's say you have an application for orders and 2 different roles: superuser and sales-rep

    Now, if super user connects to the application, it should be able to see all the rows in the orders table, however, if the user 'john' connects with the commercial list, he should see those orders assigned to him.

    I don't think I can use "dynamic" sql and build my where clause on the fly if I choose an interactive report so I was looking around and came across the concept of a common function but it seems that some other people do this with collections of the APEX. Is there anyone with a recommendation for one to use? A few books I've read recommend putting most of the logic that you can on your database (easier to maintain in the long term) that's why I thought about pipep functions using, but I thought I would check with the experts first.

    Thank you!

    If you are allowed to use an Enterprise Edition database and to apply these restrictions, through the entire application, or across multiple applications, then use of private virtual database (DPV), with the security attributes of PL/SQL Code to the initialization/cleanup APEX application to set and reset the settings in your application.

    Should you not use EE, then you can roll your own VPD use parameterized views.

    If the restriction is only required for this unique IR, then, simply use a union of two mutually exclusive predicates opportunities:

    select ...
    from orders su
    where :app_role = 'super-user'
    union all
    select ...
    from orders rep
    where :app_role = 'sales-rep'
    and rep.salesman = :app_user
    

    All of these approaches should outperform functions in pipeline, collections, or a user-defined function (which, in a predicate that is executed for each line, mudra stopped the large datasets because of context switching).

  • How to display the first 5 rows with a specific filter

    Hi all
    Please take a look at the below mentioned query.
    select * from emp where empnm like 'B%';
    Now suppose that it will display 10 lines. But I want to display 5 rows out of them.
    How can I do? I tried with rownum and rowid. It worked because the files are in order,
    But if these records are arbitrary order, now what? What should be done here?


    Kind regards
    BS2012.

    ASO
    I changed my query, this is the correct way to refer, and you must provide the exact column based on which you assume documents are old or new, in descending order.

    Thank you!
    Ashutosh

  • How to limit the I/O in a data store?

    Hello

    Not sure if storage i/o control can accomplish what I want. so, here's the scope. We have an EMC e 3300 connected via iSCSI on our ESXis 5.0 U2. We have a virtual machine that generates a lot of IO.

    Is there anyway to limit the OPS are / s to a specific virtual machine to the data store, so it not to saturate the pipe set iscsi?

    Thank you

    There is a limit of IOPS / s on the virtual disk as an option... You can assign to that.

    http://KB.VMware.com/kb/1038241

  • Can I have 'paste' an anchor with a specific text?

    This seems like it would be easy to do, but I can't understand it. I have a long page with lots of elements on it. Above, I have a list of subject headings. I linked these subject headings to the items listed below with anchors. Everything works very well. However, on a regular basis, I add things to lists. That pushes the text down... but not the anchors. So the links so not to go to the right place. Is it possible to "anchor" the anchors to keep them by the text that they are supposed to be for?

    Thank you.

    Julie

    Hmmm, it's a very good question. Easy to make in the code directly, but in the Muse, I see it a little more difficult. So now, I have to try to find a way ;-)

    But in all honesty, if the page is long and is frequently updated with more content that you can look at the structuring of a slightly different page using the widget of composition of ToolTip instead of anchor points. Or are you using scrolling between the anchors so effects?

  • Reset the value of the item page to null

    Hello
    On one of the pages of my site, my I list of some articles and each value of the element is a link, and if I click on the name of the element, a pop up appears which shows me the history of the issue. This pop-up history item, I have two elements of date picker where I provide the start and end date between which I want to see the story from this point. I add two calculations (before header) to set the values of the selectors of dates for the minimum and maximum dates for the mark of history goes back to this article in the database and on the first time, a complete history of the item turns in pop. Now I can choose my own minimum and maximum dating bicker date element and press a button, now the pop up refreshes and shows me the story between the dates, I have chosen.
    Now I close the pop-up windows and click on something else, but here when pop up is charged, I see the old values of date (that I selected for the previous article) in the date picker and ideally my calculations must have worked and dates selectors should see the minimum and maximum dates for this item.

    Can someone help me solve the problem so that if ever a new pop-up is open to a new element, the element in date picker must have updated them to the values that should be linked to the new item I clicked on that moment rather than date of previous section values.

    Thanks in advance

    Salman

    Hello Salman,

    I think I understand now what you are aming at.
    You say you have a calculation for the popup that defines the values where they are used for the first time. What conditions you have on these points? I guess they are submitted every time that you run the update, so the State of the item is updated with these values. If you don't reset it, these values will persist and be taken to the next item, which is what you currently see.
    You can place a process in your calling page that resets the page desired elements to be null before your calculation evaluates their condition, so the calculation allows you to retrieve the values of database. Another option would be to send a trigger element (for example a hidden item PX_TRIGGER get value 1 on submit) to the target page, which is part of the condition of your calculation (PX_TRIGGER = 1) and reset the trigger in your calculation (: PX_TRIGGER = 0).
    Please correct me if I am wrong.

    -Udo

  • Limit the value of the random

    Hello

    is it possible to limit the number returned by a random function to 255

    example: select substr (to_char (round(dbms_random.value *1000)), 1, 3) of double;

    It can refer 548, 687 127...

    what I need, is that the maximum value is 255

    TKS

    Hi M2M.

    You can set min and max value, as follows:

    select dbms_random.value(0,255) from dual;
    

    So if you want 3-digit numbers, something like this woulkd do

    select round(dbms_random.value(100,255)) from dual;
    

    Not sure that the rounded feature would spoil the "random", but it's out of my League

    Concerning
    Peter

  • Pass values of the item to the page with 'No URL Access'

    I have a request of "high security" where I try to limit the information passed around in the URL so I have several pages with branches of the 'branch to the page' where the target page access protection is set to "no access URL".

    However, I still need to set multiple values page element in the target page (the one I am connexiona step).

    Thinking about how to do what I thought of two ways to get this data to the target page.
    First way:
    (a) set up several calculations in the source page that calculates the values of the element in the target page and subordinate these calculations on a button application.
    (b) set up my 'on page' management on the source with the same request conditional button.

    Second way:
    (a) put in place target with a process of pl/sql page that defines the page elements
    APEX_UTIL. SET_SESSION_STATE('P31_SSN',:P40_SSN); -P31 is the target page
    do the same for all elements on the page. The process of subjecting to press the button.
    (b) implemented the same 'page' branch on the source with the same conditional key.

    Pro or con either of these approaches? Is there a different approach? I'm IMPOSSIBLE in any case implement a branch to URL with the item values in the URL as I don't want sensitive data columns in newspapers. I know that set_session_state can have interesting interactions with variable bind where they may not be, but I see no problem with my test pages...

    It doesn't matter what technique lets you define the session state - do what is easier. Call for apex_util.set_session_state is the same as make an assignment, for example,.

    APEX_UTIL. SET_SESSION_STATE('P31_SSN',:P40_SSN);

    .. .is equivalent to

    : P31_SSN: =: P40_SSN;

    Calculations are the same thing.

    Application parts are not broader than the elements on the page regarding the scope of application; any point in the session state can be referenced by any element of the request. Application parts are no rendering/display properties or association of specific page.

    Scott

  • Same question "how to limit the story" old with FF 27.0.1

    Windows 7 Pro, FF 27.0.1, Adobe and Flash modules (and it's auxiliary)... just the basics. My box is a server as well as used for most ordinary tasks... mail, browsers, editors of documents, etc., is always 'on' and never 'idle '. It's the Add-ons that make these things why don't do anything on my box.

    It is, I know, is an old question, but outstanding, in my opinion. I revive this post:
    https://support.Mozilla.org/en-us/questions/799503?FPA=1

    First of all, let me say that I consider that the best time of the Firefox browser. I love the essential philosophy of Mozilla and Firefox customization by the user and the control, while respecting their need to ensure security and stability.

    OK, the issue is evident in the title, how can I limit history with Firefox? More recently, I observed when the activation and the deactivation of JavaScript in the preferences options has been removed. I have read the reasons of Bugzilla and Firefox and it was not difficult for me to open a topic: config tab next to a label containing a page I was working so I could see how the page without JavaScript. Once you know how, it was only a little more difficult that using the preferences options... which doesn't bother me really.

    The history limit is implicit in the browser itself, where, if you open the history window, you can see your history and (for me) see an option 'longer than six months' who, if you mouse over and right click will get an option 'remove '. I think that everyone who tries this blocking their browser and if something is deleted when you finally get to the top, it will be your cache.

    I know that the amount of history is set: config in the "places.history.expiration.transient_current_max_pages" as an integer parameter. Read many articles here in 'support' and personal judgment, I find that although the number can be increased, it cannot be decreased. If we do, it is up to the old definition as soon as Firefox is reopened.

    I read the blog referenced in the first link above: http://blog.bonardo.net/2010/01/20/places-got-async-expiration and it even seems outdated, containing references to places.history.expiration.max_pages, which is not the file in topic: config in 27.0.1

    In https://bugzilla.mozilla.org/show_bug.cgi?id=643254 , I read the debate on these changes where Marco Bonardo held firmly at his post while I find the comment of al_9x, discuss the issue with him. "You have removed features that people use and love, that been in Fx since its inception. It is you who need to justify deletion. "And your justification of" nobody really wants expire history "is a lie, people do and I explained why", to represent my feelings completely. I have no need or desire for the history of more than 3 months. It is tyrannical to limit the ability of Firefox users to limit their history. And no.... I have not create yet another account of Mozilla and 'vote '.

    There must be a way I and other users can limit (or increase) their history. So I ask "how?" This is, by design, to do this then I find a very disturbing trend, away from the philosophy of the user control and customization.

    If I'm missing something, please let know me. Please * don't * send me a bunch of standard items 'aid', because I read all. That is my question.

    Kind regards
    Axis

    You must create a new pref to around places.history.expiration.max_pages if you want to change the default behavior.

    You can watch the extension that I posted at the bottom of my answer above.

  • A specific folder, do not display the items as planned

    I don't know how it happened, but somehow the items in a specific folder began to display the items in a way that I really don't like. I tried to play with the settings (including top-right), I found, but nothing helped.

    Here is the image I have, so I can show you what I mean. See how the items are displayed in the top picture? And see how items should be displayed in the background image? I want my file to look like the 2nd picture below.

    Click the blank white areas in the file and choose Group By: None

  • How can I remove blue shading around the elements of Navigation with the submenu items?

    This isn't a specific question from BC but I hope someone here can have answers to this question of CSS.

    I was through the styles and impossible to find what is causing this problem. I need to remove the blue shadow element that occurs during a flight over a menu in the top navigation item. This only occurs for the items with the items on the submenu and happens in Chrome and Safari. Here is the link to the problem of navigation http://www.freedomflooring.co.nz/testing-changes.html

    The site uses Zurb frame (s).  Here is the html code for appropriate menu

    <nav class="marketing-topbar">

    <div class="desktopMenuWrap ">
      
    <ul class="dropdown menu" data-dropdown-menu data-click-open="false">

      
    <li><a href="#">About</a>
      
    <ul class="submenu menu vertical" data-submenu>

      
    <li><a href="#">Approach</a></li>
      
    <li><a href="#">Finance</a></li>

      
    </ul>
      
    </li>  
      
    </ul>  
    </div>
    </nav>


    I put these commands in my css file, but it's not having any effect.

    a: focus,

    a: hover,

    . dropdown.menu .at-sub-menu,

    .desktopMenuWrap ul li,

    . dropdown.menu li: hover,

    . dropdown.menu li: focus,

    . dropdown.menu > li > a: hover,

    . dropdown.menu > li > a: active,

    . dropdown.menu li: hover, a: focus {}

    -webkit-box-shadow: none! important;

    -moz-box-shadow: none! important;

    box-shadow: none! important;

    text-shadow: none! important;

    border: none! important;

    }


    If someone has solved this problem, I would like to hear from them, I can't find what is causing the problem and it doing my head in. probably something really simple, but I can't.

    See you soon.

    I found the answer I was looking for (where everyone ends up here with the same problem). The following got rid of the blue glow:

    NAV *: development,.

    .marketing-topbar *: development,.

    . dropdown.menu *: focus {}

    outline: none;

    }

  • Limit the width of the list item

    Hi all

    I use Oracle Application express 4.2.
    I have change a number filed for select list and created a dynamic lov to it.

    the problem is that its width increases dynamically.
    means, if I have a value "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA.
    Width of the list will be the same length of the above "AAA...". ».


    How can I limit the width of the list item to a specific value? There is no such property for this it.

    Thank you.

    -Edit the item selection list.
    -Find the section 'Element '.
    -Enter the following value for the parameter "Attributes of the HTML Form element": style = "width: 100px;"
    -Adjust the number of pixels to your needs.

  • How to limit the number of rows returned in a query

    Hi friends,
    I want to limit the number of rows returned by my request to some 10 lines. How to do this. When I try to make some 6 rows with the rownum < 10 its giving results for a particular Department and that too only... btw I'm bundling my table and includes much a table joins and will order the results of the table by a column... How to do this...

    Run it:

    select * from (your query goes here) where rownum < 10
    

    Nicolas.

  • With the help of CAE/FGA columns specific null for all, but some users

    I was read about VPD and - but there are many examples - I'm having a hard time to get together.

    I have a table that - when most users select hand - they should get NULL in a specific column.

    This column should only display a limited group of users as one value other than null.

    Can someone help me with an example implementation of this?

    Any help is appreciated.

    An excerpt from http://www.oracle-base.com/articles/10g/DatabaseSecurityEnhancements10g.php

    CONN sys/password@db10g AS SYSDBA
    GRANT EXECUTE ON dbms_rls TO scott;
    
    CONN scott/tiger@db10g
    
    -- Create the policy function to restrict access to SAL and COMM columns
    -- if the employee is not part of the department 20.
    CREATE OR REPLACE FUNCTION pf_job (oowner IN VARCHAR2, ojname IN VARCHAR2)
    RETURN VARCHAR2 AS
      con VARCHAR2 (200);
    BEGIN
      con := 'deptno = 20';
      RETURN (con);
    END pf_job;
    /
    
    -- Using the same policy function as before.
    BEGIN
      DBMS_RLS.ADD_POLICY (object_schema         => 'scott',
                           object_name           => 'emp',
                           policy_name           => 'sp_job',
                           function_schema       => 'scott',
                           policy_function       => 'pf_job',
                           sec_relevant_cols     => 'sal,comm',
                           sec_relevant_cols_opt => DBMS_RLS.ALL_ROWS);
    END;
    /
    
    -- All rows are returned but the SAL and COMM values are only
    -- shown for employees in department 20.
    SELECT empno, ename, job, sal, comm FROM emp;
    
         EMPNO ENAME      JOB              SAL       COMM
    ---------- ---------- --------- ---------- ----------
          7369 SMITH      CLERK          10000
          7499 ALLEN      SALESMAN
          7521 WARD       SALESMAN
          7566 JONES      MANAGER         2975
          7654 MARTIN     SALESMAN
          7698 BLAKE      MANAGER
          7782 CLARK      MANAGER
          7788 SCOTT      ANALYST         3000
          7839 KING       PRESIDENT
          7844 TURNER     SALESMAN
          7876 ADAMS      CLERK           1100
    
         EMPNO ENAME      JOB              SAL       COMM
    ---------- ---------- --------- ---------- ----------
          7900 JAMES      CLERK
          7902 FORD       ANALYST         3000
          7934 MILLER     CLERK
    
    14 rows selected.
    
    -- Remove the policy function from the table.
    BEGIN
      DBMS_RLS.DROP_POLICY (object_schema     => 'scott',
                            object_name       => 'emp',
                            policy_name       => 'sp_job');
    END;
    /
    

    The function returns "deptno = 20" so no row corresponding to this condition will show the value of sal and comm, rest will display null value.

    IN your case I suppose you want the user to the function that executes the query (select user to double), once you get the user to see if it is a user who is supposed to see the values of columns if yes return "1 = 1" in the case otherwise return "0 = 1".

Maybe you are looking for