Posts tagged: onyx

4 Rules for Converting Onyx Generated Code

By Steve Jin, May 5, 2010

VMware PM Carter Shanklin (@cshanklin) once gave a great presentation on how to use Onyx with Java development at PEX 2010. I covered it briefly in a previous blog, and left out the “4 rules” hoping Carter would help.

As many of you have already known, Carter moved on to SpringSource division as the PM for tc server. So he has been pretty busy with his transition. With his coverage on both administrator and developer oriented products, he is right on the wave of devops movement. Make sure you follow him at Twitter.

Now let’s get back to his 4 rules of converting Onyx generated code to a language of your choice:

  1. Create objects when Onyx does, and use the same name.
  2. Assemble the overall object at the end.
  3. Bring your own code to looking up IDs.
  4. Replace Get-View with class methods or static look up code.

The first two rules are relatively easy to understand. Whatever data objects Onyx created, you need corresponding ones in your language say Java. Because data objects contain each other, all the contained data objects should be assembled into the top one.

The last two rules are not that straight forward due to the way Onyx works. At the very high level, Onyx records whatever you do in the vSphere Client as SOAP messages and converts the messages to PowerCLI code (could be other code in the future). The vSphere Client uses ManagedObjectReference objects as IDs whose values are very dynamic depending how you drive the vSphere Client. When you convert these IDs, you want to have your own way to get them. There are several ways to get the IDs in VI Java API. You can use either InventoryNavigator or SeachIndex to look up any managed entity you are interested, or navigate the inventory tree one by one.

The key value offered by Onyx for Java developers is on the data objects which may have hundreds of sub properties and therefore be confusing sometimes. When you have no idea on what values for your parameters, when you get any clueless InvalidRequest exception, it’s high time that you pick up Onyx.

For more of Carter’s presentation, check it out here.

Author: Steve Jin is the author of VMware VI and vSphere SDK (Prentice Hall), creator of VMware vSphere Java API. For future articles, please subscribe to RSS or Email, and follow on Twitter.

VMware PEX 2010 – Day Four

By Steve Jin, February 11, 2010

After my presentation yesterday, I had more time on the break-out sessions and self paced lab today.

Accelerate Your Services With VMware Services Automation Tools

This session is by Budianto Bong, VMware Sr. Product Manager. He demoed three tools from VMware PSO that help consulting partners: Migration Manager, Desktop Reference Architecture Workload Simulator, and HealthAnalyzer. The first one is not the P2V converter, but a management tool that tracks, manages, and reports large scale migration projects.

Using the VMware vSphere PowerCLI for Automated Installation And Configuration of ESXi and vCenter for ISV Partners

This is a joint presentation by VMware TAM Ken Brady, and CareFusion network engineer Fisk Shogren. Ken introduced the basics of PowerCLI and VMware TAP programs. Fish showed off his PowerShell code that is used to set up the environment, which took 2 days, if lucky, of manual work before. It’s a great example on how much you can get by automating vSphere API, particularly with PowerCLI. I handed over my business card so that Fisk can show more of his code later.

Getting Stoned With “Project OnyxRead more »

Author: Steve Jin is the author of VMware VI and vSphere SDK (Prentice Hall), creator of VMware vSphere Java API. For future articles, please subscribe to RSS or Email, and follow on Twitter.

Automatically Generate Your Java Code With Onyx?

By Steve Jin, February 6, 2010

During last Friday VMware beer bash, I bumped into Carter Shanklin. He told me he’s ready show off how his Onyx project can help Java developers using VI Java API at Partner Exchange next week in Las Vegas. If you will be there, be sure to attend his session TEXIBP1007 – also known as “Getting Stoned with ‘Project Onyx’” on Thursday at 11:30.

If you haven’t seen it, Onyx is a tool that converts vSphere Client UI clicks into executable code, which means that instead of writing your code the hard way you just use a tool you know and love to automatically generate your code. If you can’t wait to get started you can download Onyx or visit our community.

Top 3 reasons to attend:

  1. Learn how Onyx can help you even if you’re a Java/C# developer and not a PowerCLI user.
  2. Using Onyx means no more digging around in the vSphere API docs to figure out what properties you need.
  3. Learn how Onyx can even help you debug your own applications!

I will cover more details on how Oynx can help with your vSphere applications later.

Author: Steve Jin is the author of VMware VI and vSphere SDK (Prentice Hall), creator of VMware vSphere Java API. For future articles, please subscribe to RSS or Email, and follow on Twitter.

Page 1 of 11

OfficeFolders theme by Themocracy