How to retrieve the names of vSwitch
Hello list,
I have a query regarding the recovery of all the names of vSwitch just after the creation of a new vSwitch using perl sdk. Here is the code snippet I've tried.
My $host_view = Vim::find_entity_view (view_type = > 'HostSystem');
My $netSys = Vim::get_view (mo_ref = > $host_view->-> networkSystem configManager);
EVAL {$netSys-> AddVirtualSwitch ('vswitchName' = > 'vSwitch10') ;};}
if ($@) ;
If ($@)
My $vswitches = $netSys - > networkInfo-> vswitch;
foreach my {$vswitch (@$vswitches)}
printing $vswitch-> name;
}
Note that on the system, there is a default created vSwitch vSwitch0. In addition to this, I create a vSwitch called 'vSwitch10' using the code above. Just after the creation of the vSwitch, I'm reading the names of the vSwitches available in this system. But I see that only vSwitch0 is recovered...
If I question the vSwitches since a different perl script names, vSwitch0 and vSwitch10 are retrieved.
I'm missing something in the passage above the code. This means the VMware::VIRuntime libs; AppUtil::HostUtil; must be reloaded after creating a vswitch?
Thank you
Ghislain
You will need refresh networkSystem display to see the changes.
You can use update_view_data() on netSys, or get the view again once.
$netSys->update_view_data();
It should work
=========================================================================
William Lam
VMware vExpert 2009,2010
VMware scripts and resources at: http://www.virtuallyghetto.com/
Introduction to the vMA (tips/tricks)
Getting started with vSphere SDK for Perl
VMware Code Central - Scripts/code samples for developers and administrators
If you find this information useful, please give points to "correct" or "useful".
Tags: VMware
Similar Questions
-
How to retrieve the name of the partition of a deployment process
Hello
In a 11g BPEL process I need the partition name (for example - default etc.) in which the process has been deployed. As we buld available function to retrieve the instance id (ora:getCompositeInstanceId ()), we have no function to retrieve the name of the partition?Hello
Try this to affect the business.
Kind regards
Neeraj Sehgal -
How to retrieve the name of a string
I have the SQL query that returns the name of a person and I need to extract the last part of all the hyphenated names or the last with a space in them
In cases where the person has a family name, everything is OK
As Smith. This OK. . I'm looking for just of Smith
The problem I have is when I cut some family names such as Scott-Thomas
In this case, I want to extract the last name from family or Thomas.
Or if I have a surname like Rodham Clinton.
In this case I want to extract only the last name Clinton.How can I do this?
Creative use of the ListLast() function. Something like:
Note that the optional 2nd parameter, which is a default delimiter, a space and a hyphen between the quotation marks. This will cause ListLast() break a string that contains a space or a dash into several parts and return only the last part.
-Carl V.
-
How to retrieve the names of setting Oracle EBS
Hello
Is there a way to retrieve names of given competitor program settings?
I know that there are tables I get to give me the application short name / long name, program short/long name, etc, but I have not found such a thing for the program settings.
Thank you.ASCI says:
No I mean the names of the parameters in a given program, like 'Language', 'Description', 'Type', etc. The names that are displayed to users so that they really know what to put in the fields.It's in the applications. FND_DESCR_FLEX_COL_USAGE_VL - HTTP://ETRM.ORACLE.COM/PLS/ET1211D9/ETRM_PNAV.SHOW_OBJECT?C_NAME=FND_DESCR_FLEX_COL_USAGE_VL&C_OWNER=APPS&C_TYPE=VIEW
Thank you
Hussein -
How to retrieve the name of a table?
I can cite a table so that it includes an index like this value:
This ["myArray" + i] = new Array();
But how I can extract the index value when the tables have a name property?No, it looks pretty clear. I just didn't read.
You can assign a name to your berries property or really just the index property because that's all you want:
-
How to retrieve the name of the data store
I need to install omsa for esxi 5 I execute the command esxcli.exe - server x.x.x.x software vib install d 'path to the file on the data store. I downloaded the zip file in the store of data and now need to install it. How do I know what the path, so I can finish my order vcli?
thnx gym, my bad.
-
How to retrieve forgotten names of users and passwords for windows mail?
How to retrieve forgotten names of users and passwords for windows mail?
How to retrieve forgotten names of users and passwords for windows mail?
Contact your ISP, Internet service provider or your mail server.
They have all the information to your email account. -
How to retrieve the values of character without using single quotes
Hi all
How to retrieve the values of character without the use of single quotes. Its Possible in Oracle SQL
Please answer me...
For example
Is actual query-> Select * from employees where name like in("SCOTT", "JAMES", "ALBERT",...);
I want to--> Select * from employees where name like(SCOTT, JAMES, ALBERT...); -without the use of single quotes.
Why I need this application, I need to retrieve the records more than 200 employees in a select statement by using name in where clause.
shagarmahabubjan wrote:
Hi all
How to retrieve the values of character without the use of single quotes. Its Possible in Oracle SQL
Please answer me...
For example
Actual query is---> Select * from employees where name like in("SCOTT", "JAMES", "ALBERT",...);
I want to---> Select * from employees where name like(SCOTT, JAMES, ALBERT...); -without the use of single quotes.
Why I need this application, I need to retrieve the records more than 200 employees in a select statement by using name in where clause.
In short... you can't. The channels are channels, and SQL and PL languages dictate that the string literals are provided within single quotes.
I don't see how trying to retrieve more than 200 records of employees in the select statement means that you must get rid of the quotes.
Be clear in what you ask: Re: 2. How can I ask a question on the forums?
and take note of the FAQ link davidp provided the solution "variable IN the list.
-
Retrieve the names of files for Linux?
Hello
I installed ODI 11 g on windows. and load the multiple file. as you can see that this procedure (script) is used to get the name of the files. using technology "Operating System"
cmd /c dir D:\test\*.*/b /a:-d > D:\\Filesname.txt. It works well on windows. Now, I want to load these files names that are on the Linux server.
How will be the script for this
as my files directory name is Test > > > > that contains files
Filename.txt > > retrieves the names of the files in the test directory.
In Linux.
Thank you
Concerningcreate a script file using above command and run the script file in odi.
/Home/user_name/ScriptFile.sh
It will work.
-
Area hideShowHeader: how to get the name of region on Hide/Show Event
Hello
I would like to retrieve the name of the region (hideShowHeader) when I click on the hide/show icon. I know how to catch the event but some OAWebBeanConstants I always check null... any idea?
Thank you very much, Pier Paolo.Hello
Try to print below in LIC...
System.out.println ("name of the event:" + pageContext.getParameter (OAWebBeanConstants.EVENT_PARAM));
System.out.println ("the Source of the event:" + pageContext.getParameter (OAWebBeanConstants.SOURCE_PARAM));
System.out.println ("value:" + pageContext.getParameter (OAWebBeanConstants.VALUE_PARAM));Thank you
Mukesh Uchaniya -
How to change the name of VirtualSwitch without running virtual MAchines of braking?
Does anyone know how to change the name of the virtual switch (used by VM) without braking the VM running in this cluster?
The best way to do this without losing network connectivity is add a group of ports with the new name and connect the virtual machines to the new group of port and when the initial group of port is empty remove - remember that it's the port group named not the vswitch.
If you find this or any other answer useful please consider awarding points marking the answer correct or useful
-
How to get the name of the server instance
Hi all!!
First of all, sorry if this is not the place to leave this question, but I didn't know where to post.
I have a weblogic 9.2 MP3 installed in a x 64 Redhat Linux. It is clustered in 2 cases.
An application is deployed in both cases, each request between two instances of balancing.
Of course, a request is responsed by only one instance, and I would like to know how to get the name of the instance that processes a request of some.
I read that I can send using recorded weblogic mbeans in this way:
ThenInitialContext ctx = new InitialContext(); MBeanServer mbean = (MBeanServer)ctx.lookup("java:comp/env/jmx/runtime");
And finally I iterate over the beans, but I'm not able to retrieve the name of the instance. I suppose that the object name is not appropriate.ObjectName rs = new ObjectName("com.bea:Name=RuntimeService,Type=weblogic.management.mbeanservers.runtime.RuntimeServiceMBean"); Set beans = mbean.queryNames(rs, null);
However, I am able to get the name of the server and the two names of instances per a JMX connection to service:jmx:t3://localhost:7001/jndi/weblogic.management.mbeanservers.domainruntime, but this isn't what I want because I need to know what is the instance that is a certain demand.
Anyone know how I can do?
Thank you very much and sorry for the English xD
Published by: mamntc02 on 01/05/2010 05:10That should do it...
private String getServerName() throws Exception {}
try {}
Context ctx = new world;
MBeanServer mbeanServer = (MBeanServer)ctx.lookup("java:comp/env/jmx/runtime");String runtimeServiceName = "com.bea:Name = RuntimeService, Type = weblogic.management.mbeanservers.runtime.RuntimeServiceMBean;
Create ObjectName for the runtime
RuntimeService ObjectName = new ObjectName (runtimeServiceName);Get the object for the ObjectName ServerRuntimeMBean name
ObjectName serverRuntime = mbeanServer.getAttribute (runtimeService, "ServerRuntime") (ObjectName);Get the name of the server
String serverName = (String) mbeanServer.getAttribute (serverRuntime, "Name");
If (serverName == null) return "";
otherwise return serverName;
}
catch (Exception e) {}
throw e;
}
} -
How to retrieve the values of a number of column by column in pl sql
I wanted to know how can I retrieve the values of a column just in number and not the name of the column.user10989720 wrote:
I need exactly this kind of thing.I am retrieving the name of the column from all_tab_columns and under this column name can I retrieve values using any kind of query sub.
Select column_name
from all_tab_columns
where table_name = 'QUOTE_HEADERS_EXT' and
column_id = 58You're still not understanding. You need to do if you want to get the values of the table dynamically.
Either like this:
SQL> create or replace type t_colval is table of varchar2(4000); 2 / Type created. SQL> ed Wrote file afiedt.buf 1 CREATE OR REPLACE FUNCTION get_column(p_sql IN VARCHAR2, p_column_no NUMBER) RETURN t_colval PIPELINED IS 2 v_finaltxt VARCHAR2(4000); 3 v_v_val VARCHAR2(4000); 4 v_n_val NUMBER; 5 v_d_val DATE; 6 v_ret NUMBER; 7 c NUMBER; 8 d NUMBER; 9 col_cnt INTEGER; 10 f BOOLEAN; 11 rec_tab DBMS_SQL.DESC_TAB; 12 col_num NUMBER; 13 BEGIN 14 c := DBMS_SQL.OPEN_CURSOR; 15 DBMS_SQL.PARSE(c, p_sql, DBMS_SQL.NATIVE); 16 d := DBMS_SQL.EXECUTE(c); 17 DBMS_SQL.DESCRIBE_COLUMNS(c, col_cnt, rec_tab); 18 FOR j in 1..col_cnt 19 LOOP 20 CASE rec_tab(j).col_type 21 WHEN 1 THEN DBMS_SQL.DEFINE_COLUMN(c,j,v_v_val,2000); 22 WHEN 2 THEN DBMS_SQL.DEFINE_COLUMN(c,j,v_n_val); 23 WHEN 12 THEN DBMS_SQL.DEFINE_COLUMN(c,j,v_d_val); 24 ELSE 25 DBMS_SQL.DEFINE_COLUMN(c,j,v_v_val,2000); 26 END CASE; 27 END LOOP; 28 LOOP 29 v_ret := DBMS_SQL.FETCH_ROWS(c); 30 EXIT WHEN v_ret = 0; 31 v_finaltxt := NULL; 32 CASE rec_tab(p_column_no).col_type 33 WHEN 1 THEN DBMS_SQL.COLUMN_VALUE(c,p_column_no,v_v_val); 34 WHEN 2 THEN DBMS_SQL.COLUMN_VALUE(c,p_column_no,v_n_val); 35 v_v_val := to_char(v_n_val); 36 WHEN 12 THEN DBMS_SQL.COLUMN_VALUE(c,p_column_no,v_d_val); 37 v_v_val := to_char(v_d_val,'DD/MM/YYYY HH24:MI:SS'); 38 ELSE 39 DBMS_SQL.COLUMN_VALUE(c,p_column_no,v_v_val); 40 END CASE; 41 PIPE ROW (v_v_val); 42 END LOOP; 43 DBMS_SQL.CLOSE_CURSOR(c); 44* END; SQL> / Function created. SQL> select * from table(get_column('select * from emp',1)); COLUMN_VALUE --------------------------------------------------------------------------------------------------------------- 7369 7499 7521 7566 7654 7698 7782 7788 7839 7844 7876 7900 7902 7934 14 rows selected. SQL> select * from table(get_column('select * from emp',2)); COLUMN_VALUE --------------------------------------------------------------------------------------------------------------- SMITH ALLEN WARD JONES MARTIN BLAKE CLARK SCOTT KING TURNER ADAMS JAMES FORD MILLER 14 rows selected. SQL>
Or like this:
SQL> create or replace type t_colval is table of varchar2(4000); 2 / Type created. SQL> ed Wrote file afiedt.buf 1 CREATE OR REPLACE FUNCTION get_column(p_table IN VARCHAR2, p_column_no NUMBER) RETURN t_colval PIPELINED IS 2 v_column_name VARCHAR2(30); 3 v_rc SYS_REFCURSOR; 4 v_val VARCHAR2(4000); 5 BEGIN 6 SELECT column_name 7 INTO v_column_name 8 FROM user_tab_columns 9 WHERE column_id = p_column_no 10 AND table_name = UPPER(p_table); 11 OPEN v_rc FOR ('SELECT '||v_column_name||' FROM '||p_table); 12 LOOP 13 FETCH v_rc INTO v_val; 14 EXIT WHEN v_rc%NOTFOUND; 15 PIPE ROW(v_val); 16 END LOOP; 17 CLOSE v_rc; 18* END; SQL> / Function created. SQL> select * from table(get_column('EMP',2)); COLUMN_VALUE ---------------------------------------------------------------------------------------------------------------- SMITH ALLEN WARD JONES MARTIN BLAKE CLARK SCOTT KING TURNER ADAMS JAMES FORD MILLER 14 rows selected. SQL>
-
How I discovered the name of the theme is currently installed in my browser?
How I discovered the name of the theme is currently installed in my browser?
See Firefox/tools > Modules > appearance
Are you you're talking about a complete theme or a light theme (Persona), which provides only a background for the area of UI?
-
Records on the page "organize bookmarks" show only icons - names of bookmarks disappeared. Impossible to tell what bookkmarks they are. How to restore the names that were once next icons?
You can place the mouse pointer on the border between the left and right panes and drag the border with the left mouse button to the right to this wider left pane.
If this does not work or stay after you restart Firefox, then see:
Maybe you are looking for
-
I can't download the files. After you have selected to download the files, it 'download' in the list of downloads, but never actually download the file into a directory any. I've followed all the advice found here: https://support.mozilla.org/en-US/k
-
Design practice nor 6008 USB DAQ
Hello I have a few question, I'd like to introduce. I need some sort of indication on how to better perform a timed cycle of acquisition driven by WSF.I'll send my VI (conceptual, not one currently working one) and ask for explanations.The goal I nee
-
Problems with Itunes after reformatting HD.
I rebooted just Itunes on my computer with XP service pack 3. However, when I try to play songs that are recorded on the playlists in itunes, they sound distorted, but when I download and copy directly from a CD, they play very well. When trying to p
-
The black print cartridge produces a ghost image. I installed a new cartridge with the same results. The photo and 3 color cartridges cartridge are all ok. I also introduced "clean printhead" and ran a "print quality report", where black could not
-
display a special character of JSON result
Hi all first of all, thanks to you all for your time and response to all the different thread, it was very useful for me to start my development. This is my first post, I will try to be clear: in my method of retrieving Http to json String using this