Code Monkey home page Code Monkey logo

vcloud-rest's Introduction

vcloud-rest Build Status Dependency Status

DESCRIPTION

Unofficial ruby bindings for VMware® vCloud Director's rest APIs.

Note: at this stage both v.1.5 and v.5.1 are supported. It defaults to v.5.1 but it's possible to specify _api_version="1.5".

See vCloud API for details.

INSTALLATION

This plugin is distributed as a Ruby Gem. To install it, run:

gem install vcloud-rest

Depending on your system's configuration, you may need to run this command with root privileges.

vcloud-rest is tested against ruby 2.0.0, 1.9.x and 1.8.7+.

FEATURES

  • login/logout
  • list/show Organizations
  • show VDCs
  • show Catalogs
  • show Catalog Items
  • various vApp's commands
    • show
    • create/clone
    • start/stop/delete/reset/suspend/reboot
    • basic network configuration
  • basic VM configuration
    • show
    • set cpu/RAM
    • basic network configuration
    • basic VM Guest Customization configuration
    • start/stop/delete/reset/suspend/reboot
  • basic vApp compose capabilities
  • basic vApp NAT port forwarding creation
  • Catalog item upload with byterange upload and retry capabilities
  • show Network details

TODO

  • extend test coverage
  • a lot more...

PREREQUISITES

  • nokogiri ~> 1.6.0
  • rest-client ~> 1.6.7
  • httpclient ~> 2.3.3
  • ruby-progressbar ~> 1.1.1

For testing purpose:

  • minitest (included in ruby 1.9)
  • webmock

USAGE

require 'vcloud-rest/connection'
conn = VCloudClient::Connection.new(HOST, USER, PASSWORD, ORG_NAME)
conn.login
conn.list_organizations

EXAMPLE

A (mostly complete) example can be found in

examples/example.rb

DEBUGGING

Debug can be enabled setting the following environment variables:

  • VCLOUD_REST_DEBUG_LEVEL: to specify the log level (e.g., INFO)
  • VCLOUD_REST_LOG_FILE: to specify the output file (defaults to STDOUT)

TESTING

Simply run:

rake

Or:

ruby spec/connection_spec.rb

Note: in order to run tests with ruby 1.8.7+ you need to export RUBYOPT="rubygems"

LICENSE

Author:: Stefano Tortarolo [email protected]

Copyright:: Copyright (c) 2012-2013 License:: Apache License, Version 2.0

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

CREDITS

This code was inspired by knife-cloudstack.

vcloud-rest's People

Contributors

astratto avatar frapposelli avatar marbe avatar mhemesath avatar tsugliani avatar

Watchers

 avatar  avatar  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.