source stringclasses 1
value | repo stringlengths 5 63 | repo_url stringlengths 24 82 | path stringlengths 5 167 | language stringclasses 1
value | license stringclasses 5
values | stars int64 10 51.4k | ref stringclasses 23
values | size_bytes int64 200 258k | text stringlengths 137 258k |
|---|---|---|---|---|---|---|---|---|---|
github | fog/fog | https://github.com/fog/fog | lib/fog/bin/fogdocker.rb | Ruby | mit | 4,298 | master | 663 | class Fogdocker < Fog::Bin
class << self
def class_for(key)
case key
when :compute
Fog::Compute::Fogdocker
else
raise ArgumentError, "Unrecognized service: #{key}"
end
end
def [](service)
@@connections ||= Hash.new do |hash, key|
hash[key] = case key
... |
github | fog/fog | https://github.com/fog/fog | lib/fog/bin/rage4.rb | Ruby | mit | 4,298 | master | 668 | class Rage4 < Fog::Bin
class << self
def class_for(key)
case key
when :dns
Fog::DNS::Rage4
else
raise ArgumentError, "Unrecognized service: #{key}"
end
end
def [](service)
@@connections ||= Hash.new do |hash, key|
hash[key] = case key
when :dn... |
github | fog/fog | https://github.com/fog/fog | lib/fog/bin/aws.rb | Ruby | mit | 4,298 | master | 257 | require 'fog/aws/service_mapper'
class AWS < Fog::Bin
def self.services
Fog::AWS::ServiceMapper.services
end
def self.[](key)
Fog::AWS::ServiceMapper[key]
end
def self.class_for(key)
Fog::AWS::ServiceMapper.class_for(key)
end
end |
github | fog/fog | https://github.com/fog/fog | lib/fog/bin/linode.rb | Ruby | mit | 4,298 | master | 909 | class Linode < Fog::Bin
class << self
def class_for(key)
case key
when :compute
Fog::Compute::Linode
when :dns
Fog::DNS::Linode
else
raise ArgumentError, "Unsupported #{self} service: #{key}"
end
end
def [](service)
@@connections ||= Hash.new do... |
github | fog/fog | https://github.com/fog/fog | lib/fog/bin/clodo.rb | Ruby | mit | 4,298 | master | 706 | class Clodo < Fog::Bin
class << self
def class_for(key)
case key
when :compute
Fog::Compute::Clodo
else
raise ArgumentError, "Unrecognized service: #{key}"
end
end
def [](service)
@@connections ||= Hash.new do |hash, key|
hash[key] = case key
... |
github | fog/fog | https://github.com/fog/fog | lib/fog/bin/openvz.rb | Ruby | mit | 4,298 | master | 705 | class Openvz < Fog::Bin
class << self
def class_for(key)
case key
when :compute
Fog::Compute::Openvz
else
raise ArgumentError, "Unsupported #{self} service: #{key}"
end
end
def [](service)
@@connections ||= Hash.new do |hash, key|
hash[key] = case key... |
github | fog/fog | https://github.com/fog/fog | lib/fog/bin/rackspace.rb | Ruby | mit | 4,298 | master | 2,905 | class Rackspace < Fog::Bin
class << self
def class_for(key)
case key
when :auto_scale
Fog::Rackspace::AutoScale
when :block_storage
Fog::Rackspace::BlockStorage
when :cdn
Fog::CDN::Rackspace
when :cdn_v2
Fog::Rackspace::CDNV2
when :compute
... |
github | fog/fog | https://github.com/fog/fog | lib/fog/bin/cloudstack.rb | Ruby | mit | 4,298 | master | 607 | class Cloudstack < Fog::Bin
class << self
def class_for(key)
case key
when :compute
Fog::Compute::Cloudstack
else
raise ArgumentError, "Unrecognized service: #{key}"
end
end
def [](service)
@@connections ||= Hash.new do |hash, key|
hash[key] = case ke... |
github | fog/fog | https://github.com/fog/fog | lib/fog/dreamhost/dns.rb | Ruby | mit | 4,298 | master | 2,061 | require 'fog/dreamhost/core'
module Fog
module DNS
class Dreamhost < Fog::Service
requires :dreamhost_api_key
model_path 'fog/dreamhost/models/dns'
model :record
model :zone
collection :records
collection :zones
request_path 'fog/dreamhost/requests/dns'
... |
github | fog/fog | https://github.com/fog/fog | lib/fog/dreamhost/models/dns/zone.rb | Ruby | mit | 4,298 | master | 1,235 | require 'fog/core/model'
require 'fog/dreamhost/models/dns/records'
module Fog
module DNS
class Dreamhost
#
# Dreamhost API has no concept of 'Zone', but we
# can emulate it.
#
# http://wiki.dreamhost.com/API/Dns_commands
#
class Zone < Fog::Model
identity :id
... |
github | fog/fog | https://github.com/fog/fog | lib/fog/dreamhost/models/dns/records.rb | Ruby | mit | 4,298 | master | 831 | require 'fog/core/collection'
require 'fog/dreamhost/models/dns/record'
module Fog
module DNS
class Dreamhost
class Records < Fog::Collection
model Fog::DNS::Dreamhost::Record
def all(filter = {})
clear
if filter[:zone]
data = service.list_records.body['data... |
github | fog/fog | https://github.com/fog/fog | lib/fog/dreamhost/models/dns/zones.rb | Ruby | mit | 4,298 | master | 848 | require 'fog/core/collection'
require 'fog/dreamhost/models/dns/zone'
module Fog
module DNS
class Dreamhost
#
# Dreamhost API has no concept of 'Zone', but we
# can emulate it.
#
# http://wiki.dreamhost.com/API/Dns_commands
#
class Zones < Fog::Collection
model F... |
github | fog/fog | https://github.com/fog/fog | lib/fog/dreamhost/models/dns/record.rb | Ruby | mit | 4,298 | master | 625 | require 'fog/core/model'
module Fog
module DNS
class Dreamhost
class Record < Fog::Model
identity :name, :aliases => 'record'
attribute :value
attribute :zone
attribute :type
attribute :editable
attribute :account_id
attribute :comment
def ... |
github | fog/fog | https://github.com/fog/fog | lib/fog/dreamhost/requests/dns/create_record.rb | Ruby | mit | 4,298 | master | 708 | module Fog
module DNS
class Dreamhost
class Mock
def create_record(record, type, value, comment = "")
Fog::Mock.not_implemented
end
end
class Real
def create_record(record, type, value, comment = "")
request( :expects => 200,
:meth... |
github | fog/fog | https://github.com/fog/fog | lib/fog/dreamhost/requests/dns/list_records.rb | Ruby | mit | 4,298 | master | 407 | module Fog
module DNS
class Dreamhost
class Mock
def request(*args)
Fog::Mock.not_implemented
end
end
class Real
def list_records
request( :expects => 200,
:method => "GET",
:path => "/",
... |
github | fog/fog | https://github.com/fog/fog | lib/fog/dreamhost/requests/dns/delete_record.rb | Ruby | mit | 4,298 | master | 636 | module Fog
module DNS
class Dreamhost
class Mock
def delete_record(name, type, value)
raise Fog::Mock.not_implemented
end
end
class Real
def delete_record(name, type, value)
request( :expects => 200,
:method => "GET",
... |
github | fog/fog | https://github.com/fog/fog | lib/fog/openvz/compute.rb | Ruby | mit | 4,298 | master | 5,050 | require 'fog/openvz/core'
module Fog
module Compute
class Openvz < Fog::Service
recognizes :openvz_connect_command
model_path 'fog/openvz/models/compute'
model :server
collection :servers
request_path 'fog/openvz/requests/compute'
request :list_servers
... |
github | fog/fog | https://github.com/fog/fog | lib/fog/openvz/requests/compute/compact_server.rb | Ruby | mit | 4,298 | master | 323 | module Fog
module Compute
class Openvz
class Real
def compact_server(id,options = {})
vzctl("compact",{:ctid => id}.merge(options))
end
end
class Mock
def compact_server(id, options = {})
Fog::Mock.not_implemented
end
end
end
end
e... |
github | fog/fog | https://github.com/fog/fog | lib/fog/openvz/requests/compute/exec_server.rb | Ruby | mit | 4,298 | master | 298 | module Fog
module Compute
class Openvz
class Real
def exec_server(id,args = [])
vzctl("exec",{:ctid => id},args)
end
end
class Mock
def exec_server(id, args = [])
Fog::Mock.not_implemented
end
end
end
end
end |
github | fog/fog | https://github.com/fog/fog | lib/fog/openvz/requests/compute/quotaon_server.rb | Ruby | mit | 4,298 | master | 324 | module Fog
module Compute
class Openvz
class Real
def quotaon_server(id, options = {})
vzctl("quotaon",{:ctid => id}.merge(options))
end
end
class Mock
def quotaon_server(id, options = {})
Fog::Mock.not_implemented
end
end
end
end
... |
github | fog/fog | https://github.com/fog/fog | lib/fog/openvz/requests/compute/status_server.rb | Ruby | mit | 4,298 | master | 321 | module Fog
module Compute
class Openvz
class Real
def status_server(id, options = {})
vzctl("status",{:ctid => id}.merge(options))
end
end
class Mock
def status_server(id, options = {})
Fog::Mock.not_implemented
end
end
end
end
end |
github | fog/fog | https://github.com/fog/fog | lib/fog/openvz/requests/compute/start_server.rb | Ruby | mit | 4,298 | master | 438 | module Fog
module Compute
class Openvz
class Real
def start_server(id,options={})
vzctl("start",{:ctid => id}.merge(options))
end
end
class Mock
def start_server(id,options={})
server = self.data[:servers].find { |s| s['ctid'].to_s == id.to_s }
... |
github | fog/fog | https://github.com/fog/fog | lib/fog/openvz/requests/compute/snapshot_server.rb | Ruby | mit | 4,298 | master | 325 | module Fog
module Compute
class Openvz
class Real
def snapshot_server(id,options = {})
vzctl("snapshot",{:ctid => id}.merge(options))
end
end
class Mock
def snapshot_server(id,options = {})
Fog::Mock.not_implemented
end
end
end
end... |
github | fog/fog | https://github.com/fog/fog | lib/fog/openvz/requests/compute/stop_server.rb | Ruby | mit | 4,298 | master | 451 | module Fog
module Compute
class Openvz
class Real
def stop_server(id, options = {})
vzctl("stop",{:ctid => id}.merge(options))
end
end
class Mock
def stop_server(id, options = {})
server = self.data[:servers].find { |s| s['ctid'].to_s == id.to_s }
... |
github | fog/fog | https://github.com/fog/fog | lib/fog/openvz/requests/compute/snapshot_mount_server.rb | Ruby | mit | 4,298 | master | 343 | module Fog
module Compute
class Openvz
class Real
def snapshot_mount_server(id,options = {})
vzctl("snapshot-mount",{:ctid => id}.merge(options))
end
end
class Mock
def snapshot_mount_server(id,options = {})
Fog::Mock.not_implemented
end
... |
github | fog/fog | https://github.com/fog/fog | lib/fog/openvz/requests/compute/snapshot_umount_server.rb | Ruby | mit | 4,298 | master | 346 | module Fog
module Compute
class Openvz
class Real
def snapshot_umount_server(id,options = {})
vzctl("snapshot-umount",{:ctid => id}.merge(options))
end
end
class Mock
def snapshot_umount_server(id,options = {})
Fog::Mock.not_implemented
end
... |
github | fog/fog | https://github.com/fog/fog | lib/fog/openvz/requests/compute/get_server_details.rb | Ruby | mit | 4,298 | master | 326 | module Fog
module Compute
class Openvz
class Real
def get_server_details(id)
vzlist({:ctid => id}).first
end
end
class Mock
def get_server_details(id)
return self.data[:servers].find { |s| s['ctid'].to_s == id.to_s }
end
end
end
en... |
github | fog/fog | https://github.com/fog/fog | lib/fog/openvz/requests/compute/resume_server.rb | Ruby | mit | 4,298 | master | 321 | module Fog
module Compute
class Openvz
class Real
def resume_server(id, options = {})
vzctl("resume",{:ctid => id}.merge(options))
end
end
class Mock
def resume_server(id, options = {})
Fog::Mock.not_implemented
end
end
end
end
end |
github | fog/fog | https://github.com/fog/fog | lib/fog/openvz/requests/compute/destroy_server.rb | Ruby | mit | 4,298 | master | 361 | module Fog
module Compute
class Openvz
class Real
def destroy_server(id, options = {})
vzctl("destroy",{:ctid => id}.merge(options))
end
end
class Mock
def destroy_server(id , options = {})
self.data[:servers].reject! { |s| s['ctid'].to_s == id.to_s }... |
github | fog/fog | https://github.com/fog/fog | lib/fog/openvz/requests/compute/set_server.rb | Ruby | mit | 4,298 | master | 474 | module Fog
module Compute
class Openvz
class Real
def set_server(id,options = {})
vzctl("set",{:ctid => id}.merge(options))
end
end
class Mock
def set_server(id, options = {})
server = self.data[:servers].find { |s| s['ctid'].to_s == id.to_s }
... |
github | fog/fog | https://github.com/fog/fog | lib/fog/openvz/requests/compute/umount_server.rb | Ruby | mit | 4,298 | master | 321 | module Fog
module Compute
class Openvz
class Real
def umount_server(id, options = {})
vzctl("umount",{:ctid => id}.merge(options))
end
end
class Mock
def umount_server(id, options = {})
Fog::Mock.not_implemented
end
end
end
end
end |
github | fog/fog | https://github.com/fog/fog | lib/fog/openvz/requests/compute/exec2_server.rb | Ruby | mit | 4,298 | master | 291 | module Fog
module Compute
class Openvz
class Real
def exec2_server(id,args)
vzctl("exec2",{:ctid => id},args)
end
end
class Mock
def exec2_server(id, args)
Fog::Mock.not_implemented
end
end
end
end
end |
github | fog/fog | https://github.com/fog/fog | lib/fog/openvz/requests/compute/runscript_server.rb | Ruby | mit | 4,298 | master | 312 | module Fog
module Compute
class Openvz
class Real
def runscript_server(id,args = [])
vzctl("runscript",{:ctid => id},args)
end
end
class Mock
def runscript_server(id,args = [])
Fog::Mock.not_implemented
end
end
end
end
end |
github | fog/fog | https://github.com/fog/fog | lib/fog/openvz/requests/compute/restart_server.rb | Ruby | mit | 4,298 | master | 445 | module Fog
module Compute
class Openvz
class Real
def restart_server(id, options = {})
vzctl("restart",{:ctid => id}.merge(options))
end
end
class Mock
def restart_server(id, options = {})
server = self.data[:servers].find { |s| s['ctid'] == id.to_s }... |
github | fog/fog | https://github.com/fog/fog | lib/fog/openvz/requests/compute/quotainit_server.rb | Ruby | mit | 4,298 | master | 330 | module Fog
module Compute
class Openvz
class Real
def quotainit_server(id, options = {})
vzctl("quotainit",{:ctid => id}.merge(options))
end
end
class Mock
def quotainit_server(id, options = {})
Fog::Mock.not_implemented
end
end
end
... |
github | fog/fog | https://github.com/fog/fog | lib/fog/openvz/requests/compute/create_server.rb | Ruby | mit | 4,298 | master | 412 | module Fog
module Compute
class Openvz
class Real
def create_server(options = {})
vzctl("create",options)
end
end
class Mock
def create_server(options = {})
# When a new fake server is created we set the status to stopped
options['status'] =... |
github | fog/fog | https://github.com/fog/fog | lib/fog/openvz/requests/compute/snapshot_list_server.rb | Ruby | mit | 4,298 | master | 341 | module Fog
module Compute
class Openvz
class Real
def snapshot_list_server(id,options = {})
vzctl("snapshot-list",{:ctid => id}.merge(options))
end
end
class Mock
def snapshot_list_server(id, options = {})
Fog::Mock.not_implemented
end
e... |
github | fog/fog | https://github.com/fog/fog | lib/fog/openvz/requests/compute/suspend_server.rb | Ruby | mit | 4,298 | master | 324 | module Fog
module Compute
class Openvz
class Real
def suspend_server(id, options = {})
vzctl("suspend",{:ctid => id}.merge(options))
end
end
class Mock
def suspend_server(id, options = {})
Fog::Mock.not_implemented
end
end
end
end
... |
github | fog/fog | https://github.com/fog/fog | lib/fog/openvz/requests/compute/snapshot_delete_server.rb | Ruby | mit | 4,298 | master | 346 | module Fog
module Compute
class Openvz
class Real
def snapshot_delete_server(id,options = {})
vzctl("snapshot-delete",{:ctid => id}.merge(options))
end
end
class Mock
def snapshot_delete_server(id,options = {})
Fog::Mock.not_implemented
end
... |
github | fog/fog | https://github.com/fog/fog | lib/fog/openvz/requests/compute/snapshot_switch_server.rb | Ruby | mit | 4,298 | master | 346 | module Fog
module Compute
class Openvz
class Real
def snapshot_switch_server(id,options = {})
vzctl("snapshot-switch",{:ctid => id}.merge(options))
end
end
class Mock
def snapshot_switch_server(id,options = {})
Fog::Mock.not_implemented
end
... |
github | fog/fog | https://github.com/fog/fog | lib/fog/openvz/requests/compute/list_servers.rb | Ruby | mit | 4,298 | master | 257 | module Fog
module Compute
class Openvz
class Real
def list_servers(options = {})
vzlist({})
end
end
class Mock
def list_servers
self.data[:servers]
end
end
end
end
end |
github | fog/fog | https://github.com/fog/fog | lib/fog/openvz/requests/compute/mount_server.rb | Ruby | mit | 4,298 | master | 318 | module Fog
module Compute
class Openvz
class Real
def mount_server(id, options = {})
vzctl("mount",{:ctid => id}.merge(options))
end
end
class Mock
def mount_server(id, options = {})
Fog::Mock.not_implemented
end
end
end
end
end |
github | fog/fog | https://github.com/fog/fog | lib/fog/openvz/requests/compute/convert_server.rb | Ruby | mit | 4,298 | master | 323 | module Fog
module Compute
class Openvz
class Real
def convert_server(id,options = {})
vzctl("convert",{:ctid => id}.merge(options))
end
end
class Mock
def convert_server(id, options = {})
Fog::Mock.not_implemented
end
end
end
end
e... |
github | fog/fog | https://github.com/fog/fog | lib/fog/openvz/requests/compute/quotaoff_server.rb | Ruby | mit | 4,298 | master | 329 | module Fog
module Compute
class Openvz
class Real
def quotaooff_server(id, options = {})
vzctl("quotaoff",{:ctid => id}.merge(options))
end
end
class Mock
def quotaooff_server(id, options = {})
Fog::Mock.not_implemented
end
end
end
... |
github | fog/fog | https://github.com/fog/fog | lib/fog/openvz/models/compute/servers.rb | Ruby | mit | 4,298 | master | 481 | require 'fog/core/collection'
require 'fog/openvz/models/compute/server'
module Fog
module Compute
class Openvz
class Servers < Fog::Collection
model Fog::Compute::Openvz::Server
def all(filters = {})
load service.list_servers
end
def get(id)
if server ... |
github | fog/fog | https://github.com/fog/fog | lib/fog/openvz/models/compute/server.rb | Ruby | mit | 4,298 | master | 4,893 | require 'fog/compute/models/server'
module Fog
module Compute
class Openvz
class Server < Fog::Compute::Server
identity :ctid
attribute :ostemplate
attribute :config
attribute :layout
attribute :hostname
attribute :name
attribute :ipadd
attri... |
github | fog/fog | https://github.com/fog/fog | lib/fog/bare_metal_cloud/compute.rb | Ruby | mit | 4,298 | master | 2,688 | require 'fog/bare_metal_cloud/core'
module Fog
module Compute
class BareMetalCloud < Fog::Service
requires :bare_metal_cloud_password, :bare_metal_cloud_username
recognizes :host, :port, :scheme, :persistent
model_path 'fog/bare_metal_cloud/models/compute'
request_path 'fog/bare_metal_c... |
github | fog/fog | https://github.com/fog/fog | lib/fog/bare_metal_cloud/requests/compute/list_configurations.rb | Ruby | mit | 4,298 | master | 685 | module Fog
module Compute
class BareMetalCloud
class Real
# List Configurations
#
# ==== Returns
# * response<~Excon::Response>:
# * body<~Hash>:
# * available-server<~Array>:
# * 'configuration'<~String> - Hardware Configuration string... |
github | fog/fog | https://github.com/fog/fog | lib/fog/bare_metal_cloud/requests/compute/list_images.rb | Ruby | mit | 4,298 | master | 593 | module Fog
module Compute
class BareMetalCloud
class Real
# List images
#
# ==== Returns
# * response<~Excon::Response>:
# * body<~Hash>:
# * 'image'<~Array>
# * 'Size'<~String> - Size of the image
# * 'Name'<~String> - Name... |
github | fog/fog | https://github.com/fog/fog | lib/fog/bare_metal_cloud/requests/compute/list_servers.rb | Ruby | mit | 4,298 | master | 1,087 | module Fog
module Compute
class BareMetalCloud
class Real
# List servers
#
# ==== Returns
# * response<~Excon::Response>:
# * body<~Hash>:
# * server<~Array>:
# * 'id'<~String> - Id of the server
# * 'ip'<~Hash>:
#... |
github | fog/fog | https://github.com/fog/fog | lib/fog/bare_metal_cloud/requests/compute/cancel_server.rb | Ruby | mit | 4,298 | master | 716 | module Fog
module Compute
class BareMetalCloud
class Real
# Shutdown a running server
#
# ==== Parameters
# * serverId<~String> - The id of the server to shutdown
#
# ==== Returns
# * response<~Excon::Response>:
# * body<~Hash>:
# ... |
github | fog/fog | https://github.com/fog/fog | lib/fog/bare_metal_cloud/requests/compute/list_plans.rb | Ruby | mit | 4,298 | master | 792 | module Fog
module Compute
class BareMetalCloud
class Real
# List available plans
#
# ==== Returns
# * response<~Excon::Response>:
# * body<~Hash>:
# * 'plan'<~Array>
# * 'id'<~String> - Id of the plan
# * 'name'<~String> ... |
github | fog/fog | https://github.com/fog/fog | lib/fog/bare_metal_cloud/requests/compute/add_server_by_configuration.rb | Ruby | mit | 4,298 | master | 958 | module Fog
module Compute
class BareMetalCloud
class Real
# Boot a new server by configuration
#
# ==== Parameters
# * config<~String> - The Hardware configuration string
# * options<~Hash>: optional extra arguments
# * imageName<~String> - Optional imageNa... |
github | fog/fog | https://github.com/fog/fog | lib/fog/bare_metal_cloud/requests/compute/reboot_server.rb | Ruby | mit | 4,298 | master | 529 | module Fog
module Compute
class BareMetalCloud
class Real
# Reboot a running server
#
# ==== Parameters
# * serverId<~String> - The id of the server to reboot
#
def reboot_server(server_id)
request(
:expects => 200,
:method ... |
github | fog/fog | https://github.com/fog/fog | lib/fog/bare_metal_cloud/requests/compute/get_server.rb | Ruby | mit | 4,298 | master | 1,295 | module Fog
module Compute
class BareMetalCloud
class Real
# List servers
#
# ==== Parameters
# * serverId<~String> - Id of the server
#
# ==== Returns
# * response<~Excon::Response>:
# * body<~Has>:
# * server<~Hash>:
# ... |
github | fog/fog | https://github.com/fog/fog | lib/fog/bare_metal_cloud/requests/compute/add_server.rb | Ruby | mit | 4,298 | master | 919 | module Fog
module Compute
class BareMetalCloud
class Real
# Boot a new server
#
# ==== Parameters
# * planId<~String> - The id of the plan to boot the server with
# * options<~Hash>: optional extra arguments
# * imageId<~String> - Optional image to boot ser... |
github | fog/fog | https://github.com/fog/fog | lib/fog/go_grid/compute.rb | Ruby | mit | 4,298 | master | 3,157 | require 'fog/go_grid/core'
module Fog
module Compute
class GoGrid < Fog::Service
requires :go_grid_api_key, :go_grid_shared_secret
recognizes :host, :path, :port, :scheme, :persistent
model_path 'fog/go_grid/models/compute'
model :image
collection :images
model ... |
github | fog/fog | https://github.com/fog/fog | lib/fog/go_grid/models/compute/image.rb | Ruby | mit | 4,298 | master | 1,403 | require 'fog/core/model'
module Fog
module Compute
class GoGrid
class Image < Fog::Model
identity :id
attribute :name
attribute :description
attribute :friendly_name, :aliases => 'friendlyName'
attribute :created_at, :aliases => 'createdTime'
attribute :u... |
github | fog/fog | https://github.com/fog/fog | lib/fog/go_grid/models/compute/servers.rb | Ruby | mit | 4,298 | master | 736 | require 'fog/core/collection'
require 'fog/go_grid/models/compute/server'
module Fog
module Compute
class GoGrid
class Servers < Fog::Collection
model Fog::Compute::GoGrid::Server
def all
data = service.grid_server_list.body['list']
load(data)
end
def b... |
github | fog/fog | https://github.com/fog/fog | lib/fog/go_grid/models/compute/password.rb | Ruby | mit | 4,298 | master | 961 | require 'fog/core/model'
module Fog
module Compute
class GoGrid
class Password < Fog::Model
identity :id
attribute :server_id
attribute :applicationtype
attribute :username
attribute :password_id, :aliases => 'id'
attribute :password
attribute :serve... |
github | fog/fog | https://github.com/fog/fog | lib/fog/go_grid/models/compute/server.rb | Ruby | mit | 4,298 | master | 2,601 | require 'fog/compute/models/server'
module Fog
module Compute
class GoGrid
class BlockInstantiationError < StandardError; end
class Server < Fog::Compute::Server
extend Fog::Deprecation
deprecate(:ip, :public_ip_address)
identity :id
attribute :name
attribut... |
github | fog/fog | https://github.com/fog/fog | lib/fog/go_grid/models/compute/passwords.rb | Ruby | mit | 4,298 | master | 792 | require 'fog/core/collection'
require 'fog/go_grid/models/compute/password'
module Fog
module Compute
class GoGrid
class Passwords < Fog::Collection
model Fog::Compute::GoGrid::Password
def all
data = service.support_password_list.body['list']
load(data)
end
... |
github | fog/fog | https://github.com/fog/fog | lib/fog/go_grid/models/compute/images.rb | Ruby | mit | 4,298 | master | 654 | require 'fog/core/collection'
require 'fog/go_grid/models/compute/image'
module Fog
module Compute
class GoGrid
class Images < Fog::Collection
model Fog::Compute::GoGrid::Image
attribute :server
def all
data = service.grid_image_list.body['list']
load(data)
... |
github | fog/fog | https://github.com/fog/fog | lib/fog/go_grid/requests/compute/common_lookup_list.rb | Ruby | mit | 4,298 | master | 726 | module Fog
module Compute
class GoGrid
class Real
# List options and lookups
#
# ==== Parameters
# * 'lookup'<~String> - the lookup to be listed
# * options<~Hash>:
# * 'sort'<~String> - column to sort result by in ['description', 'id', 'name']
# *... |
github | fog/fog | https://github.com/fog/fog | lib/fog/go_grid/requests/compute/grid_server_add.rb | Ruby | mit | 4,298 | master | 1,128 | module Fog
module Compute
class GoGrid
class Real
# Create a new server
#
# ==== Parameters
# * 'name'<~String> - name of the server, 20 or fewer characters
# * 'image'<~String> - image to use, in grid_image_list
# * 'ip'<~String> - initial public ip for th... |
github | fog/fog | https://github.com/fog/fog | lib/fog/go_grid/requests/compute/grid_ip_list.rb | Ruby | mit | 4,298 | master | 809 | module Fog
module Compute
class GoGrid
class Real
# List ips
#
# ==== Parameters
# * options<~Hash>:
# * 'datacenter'<~String> - datacenter to limit results to
# * 'ip.state'<~String> - state to limit results to in ip.state
# * 'ip.type'<~St... |
github | fog/fog | https://github.com/fog/fog | lib/fog/go_grid/requests/compute/support_password_get.rb | Ruby | mit | 4,298 | master | 605 | module Fog
module Compute
class GoGrid
class Real
# Get one or more passwords by id
#
# ==== Parameters
# * options<~Hash>:
# * 'id'<~String> - id of the password to retrieve
#
# ==== Returns
# * response<~Excon::Response>:
# * body... |
github | fog/fog | https://github.com/fog/fog | lib/fog/go_grid/requests/compute/grid_server_list.rb | Ruby | mit | 4,298 | master | 834 | module Fog
module Compute
class GoGrid
class Real
# List servers
#
# ==== Parameters
# * options<~Hash>:
# * 'datacenter'<~String> - datacenter to limit results to
# * 'isSandbox'<~String> - If true only returns Image Sandbox servers, in ['false', 'true']... |
github | fog/fog | https://github.com/fog/fog | lib/fog/go_grid/requests/compute/grid_image_list.rb | Ruby | mit | 4,298 | master | 1,179 | module Fog
module Compute
class GoGrid
class Real
# List images
#
# ==== Parameters
# * options<~Hash>:
# * 'datacenter'<~String> - datacenter to limit results to
# * 'isPublic'<~String> - If true only returns public images, in ['false', 'true']
... |
github | fog/fog | https://github.com/fog/fog | lib/fog/go_grid/requests/compute/grid_server_get.rb | Ruby | mit | 4,298 | master | 530 | module Fog
module Compute
class GoGrid
class Real
# Get one or more servers by name
#
# ==== Parameters
# * 'server'<~String> - id or name of server(s) to lookup
#
# ==== Returns
# * response<~Excon::Response>:
# * body<~Array>:
# TOD... |
github | fog/fog | https://github.com/fog/fog | lib/fog/go_grid/requests/compute/grid_loadbalancer_list.rb | Ruby | mit | 4,298 | master | 679 | module Fog
module Compute
class GoGrid
class Real
# List load balancers
#
# ==== Parameters
# * options<~Hash>:
# * 'datacenter'<~String> - datacenter to limit results to
# * 'num_items'<~Integer> - Number of items to return
# * 'page'<~Integer> ... |
github | fog/fog | https://github.com/fog/fog | lib/fog/go_grid/requests/compute/support_password_list.rb | Ruby | mit | 4,298 | master | 846 | module Fog
module Compute
class GoGrid
class Real
# List passwords
#
# ==== Parameters
# * options<~Hash>:
# * 'datacenter'<~String> - datacenter to limit results to
# * 'isSandbox'<~String> - If true only returns Image Sandbox servers, in ['false', 'true... |
github | fog/fog | https://github.com/fog/fog | lib/fog/go_grid/requests/compute/grid_server_delete.rb | Ruby | mit | 4,298 | master | 512 | module Fog
module Compute
class GoGrid
class Real
# Delete a server
#
# ==== Parameters
# * 'server'<~String> - id or name of server to delete
#
# ==== Returns
# * response<~Excon::Response>:
# * body<~Array>:
# TODO: docs
def... |
github | fog/fog | https://github.com/fog/fog | lib/fog/go_grid/requests/compute/grid_server_power.rb | Ruby | mit | 4,298 | master | 631 | module Fog
module Compute
class GoGrid
class Real
# Start, Stop or Restart a server
#
# ==== Parameters
# * 'server'<~String> - id or name of server to power
# * 'power'<~String> - power operation, in ['restart', 'start', 'stop']
#
# ==== Returns
... |
github | fog/fog | https://github.com/fog/fog | lib/fog/go_grid/requests/compute/grid_image_get.rb | Ruby | mit | 4,298 | master | 940 | module Fog
module Compute
class GoGrid
class Real
# List images
#
# ==== Parameters
# * options<~Hash>:
# * 'id'<~String> - ID of the image
# * 'name'<~String> - Name of the image
# * 'image'<~String> - ID(s) or Name(s) of the ... |
github | fog/fog | https://github.com/fog/fog | lib/fog/glesys/compute.rb | Ruby | mit | 4,298 | master | 3,570 | require 'fog/glesys/core'
module Fog
module Compute
class Glesys < Fog::Service
requires :glesys_username, :glesys_api_key
API_URL = "https://api.glesys.com"
model_path 'fog/glesys/models/compute'
collection :servers
model :server
collection :templates
model ... |
github | fog/fog | https://github.com/fog/fog | lib/fog/glesys/models/compute/ip.rb | Ruby | mit | 4,298 | master | 2,054 | require 'fog/core/model'
module Fog
module Compute
class Glesys
class Ip < Fog::Model
extend Fog::Deprecation
identity :ip
attribute :ip, :aliases => "ipaddress"
attribute :datacenter
attribute :version, :aliases => "ipversion"
attribute :platform
a... |
github | fog/fog | https://github.com/fog/fog | lib/fog/glesys/models/compute/ssh_keys.rb | Ruby | mit | 4,298 | master | 476 | require "fog/glesys/models/compute/ssh_key"
module Fog
module Compute
class Glesys
class SshKeys < Fog::Collection
model Fog::Compute::Glesys::SshKey
def all
data = service.ssh_key_list.body["response"]["sshkeys"]
load(data)
end
def get(id)
ha... |
github | fog/fog | https://github.com/fog/fog | lib/fog/glesys/models/compute/server.rb | Ruby | mit | 4,298 | master | 4,364 | require 'fog/compute/models/server'
module Fog
module Compute
class Glesys
class Server < Fog::Compute::Server
extend Fog::Deprecation
identity :serverid
attribute :hostname
attribute :datacenter
attribute :cpucores
attribute :memorysize
attribute :... |
github | fog/fog | https://github.com/fog/fog | lib/fog/glesys/models/compute/ssh_key.rb | Ruby | mit | 4,298 | master | 603 | module Fog
module Compute
class Glesys
class SshKey < Fog::Model
identity :id
attribute :description
attribute :data
def save
requires :description, :data
merge_attributes(service.ssh_key_add(:description => description,
... |
github | fog/fog | https://github.com/fog/fog | lib/fog/glesys/models/compute/templates.rb | Ruby | mit | 4,298 | master | 931 | require 'fog/core/collection'
require 'fog/glesys/models/compute/template'
module Fog
module Compute
class Glesys
class Templates < Fog::Collection
model Fog::Compute::Glesys::Template
def all
# Only select OpenVZ and Xen platforms
# Glesys only offers Xen and OpenVZ bu... |
github | fog/fog | https://github.com/fog/fog | lib/fog/glesys/models/compute/servers.rb | Ruby | mit | 4,298 | master | 1,070 | require 'fog/core/collection'
require 'fog/glesys/models/compute/server'
module Fog
module Compute
class Glesys
class Servers < Fog::Collection
model Fog::Compute::Glesys::Server
def all
data = service.list_servers.body['response']['servers']
load(data)
end
... |
github | fog/fog | https://github.com/fog/fog | lib/fog/glesys/models/compute/template.rb | Ruby | mit | 4,298 | master | 511 | require 'fog/core/model'
module Fog
module Compute
class Glesys
class Template < Fog::Model
identity :name
attribute :platform
attribute :operating_system, :aliases => "operatingsystem"
attribute :minimum_memory_size, :aliases => "minimummemorysize"
attribute :minimu... |
github | fog/fog | https://github.com/fog/fog | lib/fog/glesys/models/compute/ips.rb | Ruby | mit | 4,298 | master | 2,886 | require 'fog/core/collection'
require 'fog/glesys/models/compute/ip'
module Fog
module Compute
class Glesys
class Ips < Fog::Collection
model Fog::Compute::Glesys::Ip
attribute :serverid
attribute :server
def all
attributes = {}
attributes[:serverid] = ... |
github | fog/fog | https://github.com/fog/fog | lib/fog/glesys/requests/compute/server_details.rb | Ruby | mit | 4,298 | master | 234 | module Fog
module Compute
class Glesys
class Real
def server_details(serverid, options = {})
request("/server/details", { :serverid => serverid }.merge!(options) )
end
end
end
end
end |
github | fog/fog | https://github.com/fog/fog | lib/fog/glesys/requests/compute/destroy.rb | Ruby | mit | 4,298 | master | 260 | module Fog
module Compute
class Glesys
class Real
def destroy(options)
if options[:keepip].nil?
options[:keepip] = 0
end
request("/server/destroy", options)
end
end
end
end
end |
github | fog/fog | https://github.com/fog/fog | lib/fog/glesys/requests/compute/server_status.rb | Ruby | mit | 4,298 | master | 202 | module Fog
module Compute
class Glesys
class Real
def server_status(serverid)
request("/server/status", { :serverid => serverid } )
end
end
end
end
end |
github | fog/fog | https://github.com/fog/fog | lib/fog/glesys/requests/compute/list_servers.rb | Ruby | mit | 4,298 | master | 288 | module Fog
module Compute
class Glesys
class Real
def list_servers(serverid = nil, options = {})
unless serverid.nil?
options[:serverid] = serverid
end
request("/server/list", options)
end
end
end
end
end |
github | fog/fog | https://github.com/fog/fog | lib/fog/cloudsigma/error.rb | Ruby | mit | 4,298 | master | 1,204 | module Fog
module CloudSigma
module Errors
class Error < Fog::Errors::Error
attr_accessor :type, :error_point
def initialize(message, type='n/a', error_point=nil)
@type = type
@error_point = error_point
super(message)
end
end
class NotFound... |
github | fog/fog | https://github.com/fog/fog | lib/fog/cloudsigma/mock_data.rb | Ruby | mit | 4,298 | master | 1,385 | module Fog
module Compute
class CloudSigma
class Mock
def self.mock_data
{
:volumes => {},
:servers => {},
:vlans => {},
:ips => {},
:profile => {
:login_sms => false,
:town => "",
:postco... |
github | fog/fog | https://github.com/fog/fog | lib/fog/cloudsigma/connection.rb | Ruby | mit | 4,298 | master | 6,817 | require 'fog/cloudsigma/error'
module Fog
module CloudSigma
module CloudSigmaConnection
module Real
def auth_header(type = :basic)
case type
when :basic
unless @username and @password
raise ArgumentError, 'Username and password required for basic ... |
github | fog/fog | https://github.com/fog/fog | lib/fog/cloudsigma/nested_model.rb | Ruby | mit | 4,298 | master | 1,952 | module Fog
module CloudSigma
class CloudsigmaModel < Fog::Model
class << self
def model_attribute_array(name, model, options={})
attributes_key = options[:aliases] || name
class_eval <<-EOS, __FILE__, __LINE__
def #{name}
#{name}_attrs = attributes[:#{at... |
github | fog/fog | https://github.com/fog/fog | lib/fog/cloudsigma/compute.rb | Ruby | mit | 4,298 | master | 5,747 | require 'fog/cloudsigma/core'
require 'fog/cloudsigma/connection'
module Fog
module Compute
class CloudSigma < Fog::Service
requires :cloudsigma_password, :cloudsigma_username
recognizes :cloudsigma_password, :cloudsigma_username, :cloudsigma_host
model_path 'fog/cloudsigma/models'
reque... |
github | fog/fog | https://github.com/fog/fog | lib/fog/cloudsigma/models/snapshot.rb | Ruby | mit | 4,298 | master | 1,727 | require 'fog/cloudsigma/nested_model'
require 'fog/cloudsigma/models/volume'
module Fog
module Compute
class CloudSigma
class Snapshot < Fog::CloudSigma::CloudsigmaModel
identity :uuid
attribute :allocated_size, :type => :integer
attribute :drive
attribute :grantees, :type ... |
github | fog/fog | https://github.com/fog/fog | lib/fog/cloudsigma/models/price_record.rb | Ruby | mit | 4,298 | master | 1,109 | require 'fog/cloudsigma/nested_model'
require 'bigdecimal'
module Fog
module Compute
class CloudSigma
class PriceRecord < Fog::CloudSigma::CloudsigmaModel
attribute :resource, :type => :string
attribute :multiplier, :type => :integer
attribute :price, :type => :string
attrib... |
github | fog/fog | https://github.com/fog/fog | lib/fog/cloudsigma/models/lib_volume.rb | Ruby | mit | 4,298 | master | 1,404 | require 'fog/core/model'
module Fog
module Compute
class CloudSigma
class LibVolume < Fog::Model
identity :uuid
attribute :mounted_on
attribute :licenses
attribute :meta
attribute :owner
attribute :affinities
attribute :image_format, :type => :string... |
github | fog/fog | https://github.com/fog/fog | lib/fog/cloudsigma/models/pricing.rb | Ruby | mit | 4,298 | master | 551 | require 'fog/cloudsigma/nested_model'
require 'fog/cloudsigma/models/price_record'
module Fog
module Compute
class CloudSigma
class Pricing < Fog::CloudSigma::CloudsigmaModel
model_attribute :cpu, PriceRecord
model_attribute :hdd, PriceRecord
model_attribute :ip, PriceRecord
... |
github | fog/fog | https://github.com/fog/fog | lib/fog/cloudsigma/models/ips.rb | Ruby | mit | 4,298 | master | 528 | require 'fog/core/collection'
require 'fog/cloudsigma/models/ip'
module Fog
module Compute
class CloudSigma
class Ips < Fog::Collection
model Fog::Compute::CloudSigma::IP
def all
resp = service.list_ips
data = resp.body['objects']
load(data)
end
... |
github | fog/fog | https://github.com/fog/fog | lib/fog/cloudsigma/models/snapshots.rb | Ruby | mit | 4,298 | master | 568 | require 'fog/core/collection'
require 'fog/cloudsigma/models/snapshot'
module Fog
module Compute
class CloudSigma
class Snapshots < Fog::Collection
model Fog::Compute::CloudSigma::Snapshot
def all
resp = service.list_snapshots
data = resp.body['objects']
load(... |
github | fog/fog | https://github.com/fog/fog | lib/fog/cloudsigma/models/usage_record.rb | Ruby | mit | 4,298 | master | 312 | require 'fog/cloudsigma/nested_model'
module Fog
module Compute
class CloudSigma
class UsageRecord < Fog::CloudSigma::CloudsigmaModel
attribute :burst, :type => :integer
attribute :subscribed, :type => :integer
attribute :using, :type => :integer
end
end
end
end |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.