Project

onecloud

0.0
Repository is archived
No commit activity in last 3 years
No release in over 3 years
Onecloud - API wrapper for Russian cloud provider 1Cloud.ru
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Development

~> 1.10
~> 10.0
 Project Readme

Onecloud

Gem Version codecov

Onecloud - API wrapper for Russian cloud provider 1Cloud.ru

Installation

Add this line to your application's Gemfile:

gem 'onecloud'

And then execute:

$ bundle

Or install it yourself as:

$ gem install onecloud

Usage

require 'onecloud'

api = Onecloud::Api.new('API_SECRET_TOKEN')  

# Get account balance
api.balance

# Create new server
api.add_server({
    Name: "testAPI",
    CPU: 1,
    RAM: 1024,
    HDD: 40,
    imageID: 1,
    HDDType: "SSD",
    IsHighPerformance: true
})

# List all created servers
api.servers

# Update the server parameters
api.update_server_by_id('SERVER_ID', {
    isHigtPerformance: false, 
    CPU: 2, 
    RAM: 2048, 
    HDD: 80
})

See examples here

Development

Pull requests are welcome!

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/wimnorder/onecloud.

License

The gem is available as open source under the terms of the MIT License.