GithubHelp home page GithubHelp logo

vipruby's Introduction

Gem Version
#Vipruby 0.1.4 Ruby Library for ViPR

####Install and usage: gem install vipruby
require 'vipruby'

####Example usage files: -SBUX.rb
-settings.conf

####Create a vipr object: vipr = Vipruby.new([base_url]:[port],[user],[password])

####Create a host object: host = Host.new(type: 'other',name: [name],fqdn: [fqdn],initiator_node: [wwnn],initiators_port: ['WWPN1','WWPN2'],protocol: [fc/iscsi],discoverable: [true/false])

####Add a vCenter Server: vipr.add_vcenter(fqdn_or_ip, name, port, user_name, password) ex. vipr.add_vcenter('vcenter.mycompany.com', 'Company-vCenter', '443', 'CORP\user', 'mypassword')

####Delete a vCenter Server: vipr.delete_vcenter(vcenter_id)

ex1. vcenter_id = vipr.get_all_vcenters['id'][0] 
or
ex2. myvc = vipr.find_vcenter_object("myvc")
ex2. vcenter_id = vcenter_id['resource'][0]['id']

####Add Storage: Will figure out a better way to show each method... YARD?

####Methods that matter: vipr.add_host(hostObject.generate_json)
vipr.add_initiators(hostObject.generate_initiators_json,host_href)
vipr.add_host_and_initators(hostObject)
vipr.host_exists?(hostObject.name)
vipr.find_host_object(hostObject.name) vipr.get_all_hosts
vipr.get_host(host_href)
vipr.get_all_hosts
vipr.deactivate_host(host_href) vipr.add_vcenter(fqdn_or_ip, name, port, user_name, password) vipr.delete_vcenter(vcenter_id)

####Fun facts To get a host href -> vipr.find_host_object(host.name)['resource'][0]['link']['href']

####To Do:

  • Breakout vipruby.rb into multiple classes and files. Host, Vcenter, Storage, Filesystems, Snapshots, etc... it's already getting large
  • Add more and more and more things
  • figure out if adding by JSON or XML is easier for future proof.
  • Add documentation via Yard

vipruby's People

Contributors

nctiggy avatar kacole2 avatar

Watchers

James Cloos 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.