About Author: Joerg Lew

Posts by Joerg Lew

0

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();
 }
0

Get Started

The VMware vCenter Orchestrator is automatically installed with vCenter. But before you can start, you have to do some configuration.
Following Infrastructure is needed:
  • resolvable hostname and IP-address
  • An LDAP-Directory or Active Directory, with credentials wich have the rights to browse the directory. And you need the common name (CN) of the groups where the vCO users and the vCO admins are located
  • Access to an empty database on a database server (MS SQL and Oracle are supported, for PostgreSQL and MySQL you have to do some further steps). If you want to use the MS SQL Express instance bundled with your vCenter, you also have to do some configuration steps
  • Hostname and some credentials to your vCenter server (a special vCenter user with administrator role is recommended)
To start workflows, browse around in the hundreds of existing elements and start developing your own stuff you can use the vCO-Client.
This is an java standalone application. You can find the installation file in the vco-folder of the vCenter-installation media.
If you want to install a 32-bit version of the client, you have to download it from VMware’s homepage (in the vCenter download section)
(Be sure to read through the discussion in the forums: http://communities.vmware.com/thread/280603 )
When you’re familiar with the vCO-client and the execution of existing workflows, you can start developing your own stuff.
For an ideas how to begin watch this video…

 

and see the “Create a self-service VM provisioning portal”-guide on
http://www.vcoteam.info/learn-vco/create-a-simple-vco-self-service-vm-provisioning-portal-part-1.html