Skip to content

clintkitson/RbVviews

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

RbVviews

This is a Ruby class that leverages (RbVmomi) to issue lookups based on settings per VC object and return detailed views that contain methods and variables. For example, you can look up the instanceUuid of a Virtual Machine and the class returns the VM object.

The behavior is modeled from Get-View from PowerCLI.

vElemental Blog Post

Install

gem install RbVviews

Requirements

Ruby 1.8.7+
RbVmomi

Ruby Example

require 'RbVviews'

vc_view = RbVviews.new("vcenter01.brswh.local","root","vmware")
vc_view.connect
vm = vc_view.get_view('VirtualMachine','config.instanceUuid','5038de0a-a3cf-8779-3c4c-d481b54876a9')
puts vm[0].obj.name

PowerCLI Equivalent Example

Connect-VIServer -server vcenter01.brswh.local -username root -password vmware
$vm = Get-View -ViewType VirtualMachine -Filter @{"config.instanceuuid"="5038de0a-a3cf-8779-3c4c-d481b54876a9"}
Write-Host $vm.name

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages