1
0
mirror of https://github.com/OpenNebula/one.git synced 2024-12-23 17:33:56 +03:00
one/share/vendor/ruby/gems/packethost
Alejandro Huertas 1a56d89890
F #3042: Packet Public Networking
* Add alias ip hook
    * Add packet ipam scripts
    * Make some changes in packethost Ruby gem
    * Make some changes in Packet vmm driver

(cherry picked from commit c87025d314)
2019-08-30 17:29:24 +02:00
..
lib F #3042: Packet Public Networking 2019-08-30 17:29:24 +02:00
spec F #2645: Disaggregated Data Centers (oneprovision) 2018-11-29 15:14:17 +01:00
.gitignore F #2645: Disaggregated Data Centers (oneprovision) 2018-11-29 15:14:17 +01:00
.rspec F #2645: Disaggregated Data Centers (oneprovision) 2018-11-29 15:14:17 +01:00
.travis.yml F #2645: Disaggregated Data Centers (oneprovision) 2018-11-29 15:14:17 +01:00
CHANGELOG.md F #2645: Disaggregated Data Centers (oneprovision) 2018-11-29 15:14:17 +01:00
Gemfile F #2645: Disaggregated Data Centers (oneprovision) 2018-11-29 15:14:17 +01:00
LICENSE F #2645: Disaggregated Data Centers (oneprovision) 2018-11-29 15:14:17 +01:00
packethost.gemspec F #2645: Disaggregated Data Centers (oneprovision) 2018-11-29 15:14:17 +01:00
Rakefile F #2645: Disaggregated Data Centers (oneprovision) 2018-11-29 15:14:17 +01:00
README.md F #2645: Disaggregated Data Centers (oneprovision) 2018-11-29 15:14:17 +01:00

Packet

A Ruby client for the Packet API.

Build Status

Configuration

You can either configure the library in a global way (easier):

Packet.configure do |config|
  config.auth_token = 'my_token'
end

or create and use an individual instance of Packet::Client (more complex):

Packet::Client.new(auth_token)

Generally speaking, you'll probably want to configure it globally if you only ever use a single API token.

Usage

If you configured the library globally, you can just call methods on the Packet module. For example:

Packet.list_projects
=> [#<Packet::Project>, #<Packet::Project>]

If you configured a Packet::Client manually, you can call those same methods on the client itself:

client = Packet::Client.new( ... )
client.list_projects
=> [#<Packet::Project>, #<Packet::Project>]

See a list of available methods.

Contributing

  • Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet.
  • Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it.
  • Fork the project.
  • Start a feature/bugfix branch.
  • Commit and push until you are happy with your contribution.
  • Make sure to add tests for it. This is important so we don't break it in a future version unintentionally. You can run the test suite with bundle exec rake.
  • Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so we can cherry-pick around it.

Copyright (c) 2015 Packet Host. See LICENSE for further details.