Latest Headlines
0

Python Client for vCO

It’s an example for a client for the Orchestrator Web Services, written in python.

Python Logo

 

 

see also
0

Managed Object Browser

The Managed Object Browser (MOB) runs on your vCenter-Server (It’s installed and started automatically, so there is no need to download something). It provides a HTML-View on the vSphere API.
You can use the MOB to surf through the Objects in your environment and look for names of methods, attributes,…

see also
1

VMware Onyx

THE Tool for VMware-Developer:
Onyx is a proxy between vSphere Client and vCenter, catches “clicked” Tasks and prints out the API-Calls in Raw SOAP-Messages, .net-Code, Powershell-commands AND…
…JavaScript for vCO!

Screenshot of VMWare Onyx

see also http://labs.vmware.com/flings/onyx

1

XML-handling, the E4X-way

The (easier?) alternative to the XML-plugin:
Create variables with plain XML-syntax like
</div>
//create new xml-variable with E4X-syntax
 var xmlcontent = <vms></vms>;
 //E4X: create XML-Child Element: VM
 xmlcontent.vm.@uuid = uuid;
 xmlcontent.vm.name = vmname;
 xmlcontent.vm.cpus = numCpus;
 xmlcontent.vm.memory = memSize;
 xmlcontent.vm.ip = guestIpAddress;
 xmlcontent.vm.hostname = guestHostname;
 //log for sure : - )
 System.debug(xmlcontent);

Available through the Rhino JavaScript engine in vCO, which includes E4X.
3

Call Database Stored Procedures via JDBC

With the Database Plugin (which provides JDBC-Classes for your scripting elements) you can execute Stored Procedures, using following Syntax:
var main = new JDBCConnection();
 var con;
 try  {
 con = main.getConnection( url, user, password );
 System.log( "Connection to database successful" );
 var cstmt = con.prepareCall("{call nameOfStoredProcedure(?,?)}");
 cstmt.setString(1,firstParameter);
 cstmt.setString(2, anotherParameter);
 var rs =  cstmt.executeQuery();
 //removed line, see comment
 //removed line, see above, and then the comment 🙂
 while ( rs.next() )  {
 //... Process results of the Stored Procedure, if necessary.
 }
 rs.close();
 cstmt.close();
 } catch( ex )  {
 throw "Exception during database action " + ex + ")";
 } finally {
 if (con) {
 con.close();
 }
Page 25 of 26« First...10...2223242526