Giter VIP home page Giter VIP logo

vultr.rb's Introduction

VULTR Rubygem

The easiest and most complete rubygem for VULTR.

Vultr.api_key = "your_api_key"
r = Vultr::Server.list
# => {
#    :status=>200,
#    :result=>[40, 11, 45, 29, 41, 61, 46, 35, 12, 30, 42, 3, 39, 13, 60, 36, 37, 43, 27, 28, 38]
# }

r[:status]
r[:result]

You can find your keys at https://my.vultr.com/settings/#API

Installation

Add this line to your application's Gemfile:

gem 'vultr'

And then execute:

$ bundle

Or install it yourself as:

$ gem install vultr

Usage

List Servers

Vultr::Server.list

Create Server

Vultr::Server.create({DCID: dc_id, VPSPLANID: vps_plan_id, OSID: os_id})

Available Commands

Vultr::Account.info

Vultr::App.list

Vultr::Backup.list

Vultr::DNS.list
Vultr::DNS.create_domain({domain: domain, serverip: server_ip})
Vultr::DNS.delete_domain(domain: domain)
Vultr::DNS.records(domain: domain)
Vultr::DNS.create_record({domain: domain, name: name, type: type, data: data, ttl: ttl, priority: priority})
Vultr::DNS.delete_record({domain: domain, RECORDID: record_id})

Vultr::ISO.list

Vultr::OS.list

Vultr::Plan.list

Vultr::Region.list
Vultr::Region.availability(DCID: dc_id)

Vultr::Server.list
Vultr::Server.start(SUBID: sub_id)
Vultr::Server.halt(SUBID: sub_id)
Vultr::Server.reboot(SUBID: sub_id)
Vultr::Server.create({DCID: dc_id, VPSPLANID: vps_plan_id, OSID: os_id, ipxe_chain_url: ipxe_chain_url, SCRIPTID: script_id, SNAPSHOTID: snapshot_id})
Vultr::Server.destroy(SUBID: sub_id)
Vultr::Server.label_set({SUBID: sub_id, label: label})
Vultr::Server.os_change_list(SUBID: sub_id)
Vultr::Server.os_change({SUBID: sub_id, OSID: os_id})
Vultr::Server.reinstall(SUBID: sub_id)
Vultr::Server.upgrade_plan_list(SUBID: sub_id)
Vultr::Server.upgrade_plan({SUBID: sub_id, VPSPLANID: vpsplan_id})
Vultr::Server.restore_backup({SUBID: sub_id, BACKUPID: backup_id})
Vultr::Server.restore_snapshot({SUBID: sub_id, SNAPSHOTID: snapshot_id})
Vultr::Server.list_ipv4(SUBID: sub_id)
Vultr::Server.create_ipv4({SUBID: sub_id, reboot: reboot})
Vultr::Server.destroy_ipv4({SUBID: sub_id, ip: ip})
Vultr::Server.list_ipv6(SUBID: sub_id)
Vultr::Server.reverse_default_ipv4({SUBID: sub_id, ip: ip})
Vultr::Server.reverse_delete_ipv6(SUBID: sub_id)
Vultr::Server.reverse_list_ipv6(SUBID: sub_id)
Vultr::Server.reverse_set_ipv4({SUBID: sub_id, ip: ip})
Vultr::Server.reverse_set_ipv6({SUBID: sub_id, ip: ip})

Vultr::Snapshot.list
Vultr::Snapshot.create(SUBID: sub_id)
Vultr::Snapshot.destroy(SNAPSHOTID: snapshot_id)

Vultr::SSHKey.list
Vultr::SSHKey.create({name: name, ssh_key: ssh_key})
Vultr::SSHKey.destroy(SSHKEYID: sshkey_id)
Vultr::SSHKey.update({SSHKEYID: sshkey_id, name: name, ssh_key: ssh_key})

Vultr::StartupScript.list
Vultr::StartupScript.create({name: name, script: script, type: type})
Vultr::StartupScript.destroy(SCRIPTID: script_id)
Vultr::StartupScript.update({SCRIPTID: script_id, name: name, script: script})

Contributing

  1. Fork it ( https://github.com/tolbkni/vultr/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

When adding methods, add to the list of DEFINITIONS in lib/vultr.rb. Additionally, write a spec and add it to the list in the README.

Thanks

Thanks Scott Motte and his DigitalOcean rubygem project.

vultr.rb's People

Contributors

iconnor avatar molizz avatar tolbkni avatar

Watchers

 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.