Sha256: b97ba249768a223801ca97f104aab9a504e20692432db3985261249db9d2f76b
Contents?: true
Size: 747 Bytes
Versions: 13
Compression:
Stored size: 747 Bytes
Contents
require 'fog/core/collection' require 'fog/voxel/models/compute/server' module Fog module Compute class Voxel class Servers < Fog::Collection model Fog::Compute::Voxel::Server def all data = service.devices_list.body['devices'].select {|device| device['type']['id'] == '3'} load(data) end def get(device_id) if device_id && server = service.devices_list(device_id).body['devices'] new(server.first) end rescue Fog::Service::Error => error if error.message == "The device_id passed in can't be matched to a valid device." nil else raise error end end end end end end
Version data entries
13 entries across 13 versions & 3 rubygems