Project

ultravault

0.0
No commit activity in last 3 years
No release in over 3 years
UltraVault Interface
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0
>= 0
>= 0
>= 0

Runtime

~> 0.9.9
 Project Readme

UltraVault

Status

A simple wrapper gem for the UltraVault API allowing users to retrieve information about their agents, disk safes and recovery points.

Installing with Bundler

Add this to your Gemfile:

gem 'ultravault', :git => "git@github.com:melbourne/ultravault.git", :branch => :master

Run

$ bundle install

Intended usage

See test/integration/client_code.rb for an executable example.

Inclusion

require 'ultravault'

Configure

UltraVault.configure do |config|
   config.host = 'foo.bar.baz'
   config.port = 9080
   config.api_version = 1
   config.ssl = false
   config.username = 'foo'
   config.password = 'bar'
   config.debug = false
end   

or

UltraVault.config = { host: 'baz.bar.foo' }

Retrieving data

# Retrieving an agent
agent = UltraVault::Agent.find_by_id("e9bd701b-dac1-4921-ab1c-467f35209e21")

# Retrieve all agents
agents = UltraVault::Agent.all

# Retrieving a disk safe
disk_safe = agent.disk_safes.first

# Retrieving recovery points
recovery_point = disk_safe.recovery_points.first  

Creating, editing, removing objects

# Creating an agent
agent = UltraVault::Agent.create(
          :hostname => 'foo', :port_number => 1234,
          :description => 'A new agent',
          :os_type => 'linux'
        )

# Updating an agent
updated_agent = agent.update(:hostname => 'bazbar')

# Deleting an agent
destroyed_agent = agent.destroy

Authoring changes

Testing

Make sure you run the test suite in full before pushing changes. Write new tests as you add new features.

$ rake unit        # run unit tests
$ rake integration # run integration tests