Coder Social home page Coder Social logo

fog-vsphere's Introduction

Fog vSphere

VMware vSphere® provider for the Fog cloud services library

Gem Version Build Status Dependency Status Test Coverage Code Climate

The VMware vSphere® provider allows you to use the abstractions of the Fog cloud services library to communicate with vSphere.

Installation

To use this gem in your application, add this line to your Gemfile:

gem 'fog-vsphere'

And then execute:

bundle

Or install it yourself as:

gem install fog-vsphere

Usage

To connect to your vSphere instance with Fog vSphere:

require 'fog/vsphere'

compute = Fog::Compute.new(
  provider: :vsphere,
  vsphere_username: 'username',
  vsphere_password: 'password',
  vsphere_server: 'server.example.com',
  vsphere_expected_pubkey_hash: '0123456789abcdef0123456789abcdef',
  vsphere_ssl: true,
  vsphere_rev: '6.0'
)

From there you can create, destroy, list, and modify most things related to vSphere. Some examples include:

# continued from previous example

# List datacenters
compute.list_datacenters
#=> [{id: 'datacenter-1', name: 'DC1', path: ['DC1'], status: 'gray'},
#=>  {id: 'datacenter-2', name: 'DC2', path: ['DC2'], status: 'gray'}]

# Get datacenter by name
compute.get_datacenter('DC1')
#=> {name: 'DC1', status: 'gray', path: ['DC1']}

# List virtual machines
compute.list_virtual_machines
#=> [{'id'   => 'ab589f9a-af35-428e-9690-9b96587d86f3',
#=>   'name' => 'TestVM',
#=>   'uuid' => 'fc51eb7a-fa50-4d96-bd16-63972b49f52f',
#=> ...

# List a VM's SCSI controllers
compute.list_vm_scsi_controllers('ab589f9a-af35-428e-9690-9b96587d86f3')
#=> [<Fog::Compute::Vsphere::SCSIController
#=>   shared_bus='noSharing',
#=>   type='VirtualLsiLogicController',
#=>   unit_number=7,
#=>   key=1000,
#=>   server_id=nil
#=>  >]

There is a lot more you can do as well! We are working on providing better documentation right now. For now, you can look at the RubyDocs, browse what's available with Pry, and view the documentation for Fog. We hope to have much more documentation and plenty of examples soon.

Contributing

To contribute to this project, add an issue or pull request. For more info on what that means or how to do it, see this guide from GitHub.

fog-vsphere's People

Contributors

jrgarcia avatar timogoebel avatar scambra avatar plribeiro3000 avatar tilladamdmde avatar ananace avatar derekmwright avatar jethrocarr avatar manchiu avatar bentalbot avatar carlospuga avatar chris1984 avatar agx avatar inecas avatar fastlorenzo avatar ares avatar shlomizadok avatar tbrisker avatar 01100010011001010110010101110000 avatar karmab avatar scottd018 avatar theopenbit avatar wiad avatar

Watchers

James Cloos avatar Peter Lehwess avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.