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/clodo/requests/compute/move_ip_address.rb | Ruby | mit | 4,298 | master | 829 | module Fog
module Compute
class Clodo
class Real
# Move IP-address to specified server.
# ==== Parameters
# * server_id<~Integer> - Id of server to move IP to
# * ip<~String> - IP-address to move
#
# ==== Returns
# * response<~Excon::Response>
... |
github | fog/fog | https://github.com/fog/fog | lib/fog/clodo/models/compute/images.rb | Ruby | mit | 4,298 | master | 527 | require 'fog/core/collection'
require 'fog/clodo/models/compute/image'
module Fog
module Compute
class Clodo
class Images < Fog::Collection
model Fog::Compute::Clodo::Image
def all
data = service.list_images_detail.body['images']
load(data)
end
def get(... |
github | fog/fog | https://github.com/fog/fog | lib/fog/clodo/models/compute/servers.rb | Ruby | mit | 4,298 | master | 753 | require 'fog/core/collection'
require 'fog/clodo/models/compute/server'
module Fog
module Compute
class Clodo
class Servers < Fog::Collection
model Fog::Compute::Clodo::Server
def all
data = service.list_servers_detail.body['servers']
load(data)
end
def... |
github | fog/fog | https://github.com/fog/fog | lib/fog/clodo/models/compute/image.rb | Ruby | mit | 4,298 | master | 533 | require 'fog/core/model'
module Fog
module Compute
class Clodo
class Image < Fog::Model
identity :id
attribute :name
attribute :vps_type
attribute :status
attribute :os_type
attribute :os_bits
attribute :os_hvm
def initialize(new_attributes)... |
github | fog/fog | https://github.com/fog/fog | lib/fog/clodo/models/compute/server.rb | Ruby | mit | 4,298 | master | 3,325 | require 'fog/compute/models/server'
module Fog
module Compute
class Clodo
class Server < Fog::Compute::Server
identity :id
attribute :addresses
attribute :name
attribute :image_id, :aliases => 'imageId'
attribute :type
attribute :state, :aliases => ... |
github | fog/fog | https://github.com/fog/fog | lib/fog/core/deprecated/connection.rb | Ruby | mit | 4,298 | master | 872 | require "fog/xml"
module Fog
# @deprecated Use {Fog::Core::Connection} or {XML::SAXParserConnection} if you
# require the response body to be parsed.
#
# The Connection class is a wrapper around an instance of Excon::Connection
# supporting {#request} and {#reset} only.
#
# {#request} includes an optio... |
github | fog/fog | https://github.com/fog/fog | lib/fog/fogdocker/compute.rb | Ruby | mit | 4,298 | master | 1,890 | require 'fog/fogdocker/core'
module Fog
module Compute
class Fogdocker < Fog::Service
requires :docker_url
recognizes :docker_username, :docker_password, :docker_email
model_path 'fog/fogdocker/models/compute'
model :server
collection :servers
model :image
c... |
github | fog/fog | https://github.com/fog/fog | lib/fog/fogdocker/models/compute/images.rb | Ruby | mit | 4,298 | master | 476 | require 'fog/core/collection'
require 'fog/fogdocker/models/compute/image'
module Fog
module Compute
class Fogdocker
class Images < Fog::Collection
model Fog::Compute::Fogdocker::Image
def all(filters = {})
load service.image_all(filters)
end
def get(id)
... |
github | fog/fog | https://github.com/fog/fog | lib/fog/fogdocker/models/compute/image.rb | Ruby | mit | 4,298 | master | 720 | module Fog
module Compute
class Fogdocker
class Image < Fog::Model
identity :id
attr_accessor :info
attribute :repo_tags
attribute :created
attribute :size
attribute :virtual_size
def name
repo_tags.empty? ? id : repo_tags.first
en... |
github | fog/fog | https://github.com/fog/fog | lib/fog/fogdocker/models/compute/servers.rb | Ruby | mit | 4,298 | master | 514 | require 'fog/core/collection'
require 'fog/fogdocker/models/compute/server'
module Fog
module Compute
class Fogdocker
class Servers < Fog::Collection
model Fog::Compute::Fogdocker::Server
def all(filters = {})
load service.container_all(filters)
end
def get(id)
... |
github | fog/fog | https://github.com/fog/fog | lib/fog/fogdocker/models/compute/server.rb | Ruby | mit | 4,298 | master | 5,335 | require 'fog/compute/models/server'
module Fog
module Compute
class Fogdocker
# fog server is a docker container
class Server < Fog::Compute::Server
identity :id
attr_accessor :info
attribute :name
attribute :created
attribute :path
attribute :args
... |
github | fog/fog | https://github.com/fog/fog | lib/fog/fogdocker/requests/compute/image_get.rb | Ruby | mit | 4,298 | master | 461 | module Fog
module Compute
class Fogdocker
class Real
def image_get(id)
downcase_hash_keys Docker::Image.get(id, {}, @connection).json
end
end
class Mock
def image_get(id)
{'id'=>'a6b02c7ca29a22619f7d0e59062323247739bc0cd375d619f305f0b519af4ef3',
... |
github | fog/fog | https://github.com/fog/fog | lib/fog/fogdocker/requests/compute/container_commit.rb | Ruby | mit | 4,298 | master | 661 | module Fog
module Compute
class Fogdocker
class Real
def container_commit(options)
raise ArgumentError, "instance id is a required parameter" unless options.key? :id
container = Docker::Container.get(options[:id], {}, @connection)
downcase_hash_keys container.commit(cam... |
github | fog/fog | https://github.com/fog/fog | lib/fog/fogdocker/requests/compute/container_delete.rb | Ruby | mit | 4,298 | master | 551 | module Fog
module Compute
class Fogdocker
class Real
def container_delete(options = {})
raise ArgumentError, "instance id is a required parameter" unless options.key? :id
container = Docker::Container.get(options[:id], {}, @connection)
container.delete()
true
... |
github | fog/fog | https://github.com/fog/fog | lib/fog/fogdocker/requests/compute/container_create.rb | Ruby | mit | 4,298 | master | 1,418 | module Fog
module Compute
class Fogdocker
# Create attributes
#'Hostname' => '',
#'User' => '',
#'Memory' => 0,
#'MemorySwap' => 0,
#'AttachStdin' => false,
#'AttachStdout' => true,
#'AttachStderr' => true,
#'PortSpecs' => nil,
#'Tty' => false,
#'O... |
github | fog/fog | https://github.com/fog/fog | lib/fog/fogdocker/requests/compute/image_all.rb | Ruby | mit | 4,298 | master | 756 | module Fog
module Compute
class Fogdocker
class Real
def image_all(filters = {})
Docker::Image.all({}, @connection).map do |image|
downcase_hash_keys(image.json)
end
end
end
class Mock
def image_all(filters = {})
[
{'i... |
github | fog/fog | https://github.com/fog/fog | lib/fog/fogdocker/requests/compute/image_search.rb | Ruby | mit | 4,298 | master | 772 | module Fog
module Compute
class Fogdocker
class Real
def image_search(query = {})
Docker::Util.parse_json(@connection.get('/images/search', query)).map do |image|
downcase_hash_keys(image)
end
end
end
class Mock
def image_search(query = {})... |
github | fog/fog | https://github.com/fog/fog | lib/fog/fogdocker/requests/compute/container_all.rb | Ruby | mit | 4,298 | master | 1,387 | module Fog
module Compute
class Fogdocker
class Real
# filter options
# all – true or false, Show all containers. Only running containers are shown by default
# limit – Show limit last created containers, include non-running ones.
# since – Show only containers created since ... |
github | fog/fog | https://github.com/fog/fog | lib/fog/fogdocker/requests/compute/container_get.rb | Ruby | mit | 4,298 | master | 2,444 | module Fog
module Compute
class Fogdocker
class Real
def container_get(id)
raw_container = Docker::Container.get(id, {}, @connection).json
processed_container = downcase_hash_keys(raw_container)
processed_container['hostconfig_port_bindings'] = raw_container['HostConfig... |
github | fog/fog | https://github.com/fog/fog | lib/fog/fogdocker/requests/compute/container_action.rb | Ruby | mit | 4,298 | master | 2,507 | module Fog
module Compute
class Fogdocker
class Real
def container_action(options = {})
raise ArgumentError, "instance id is a required parameter" unless options.key? :id
raise ArgumentError, "action is a required parameter" unless options.key? :action
result = Docker::... |
github | fog/fog | https://github.com/fog/fog | lib/fog/fogdocker/requests/compute/image_delete.rb | Ruby | mit | 4,298 | master | 594 | module Fog
module Compute
class Fogdocker
class Real
def image_delete(options = {})
raise ArgumentError, "instance id is a required parameter" unless options.key? :id
image = Docker::Image.get(options[:id], {}, @connection)
image.remove()
end
end
cl... |
github | fog/fog | https://github.com/fog/fog | lib/fog/fogdocker/requests/compute/image_create.rb | Ruby | mit | 4,298 | master | 374 | module Fog
module Compute
class Fogdocker
class Real
def image_create(attrs)
downcase_hash_keys Docker::Image.create(attrs, nil, @connection).json
end
end
class Mock
def image_create(attrs)
{'id'=>'a6b02c7ca29a22619f7d0e59062323247739bc0cd375d619f305f... |
github | fog/fog | https://github.com/fog/fog | lib/fog/fogdocker/requests/compute/api_version.rb | Ruby | mit | 4,298 | master | 261 | module Fog
module Compute
class Fogdocker
class Real
def api_version
Docker.version(@connection)
end
end
class Mock
def api_version
{'Version' => '1.6'}
end
end
end
end
end |
github | fog/fog | https://github.com/fog/fog | lib/fog/linode/compute.rb | Ruby | mit | 4,298 | master | 3,378 | require 'fog/linode/core'
module Fog
module Compute
class Linode < Fog::Service
requires :linode_api_key
recognizes :port, :scheme, :persistent
model_path 'fog/linode/models/compute'
model :flavor
collection :flavors
model :image
collection :images
model :server
... |
github | fog/fog | https://github.com/fog/fog | lib/fog/linode/dns.rb | Ruby | mit | 4,298 | master | 2,341 | require 'fog/linode/core'
module Fog
module DNS
class Linode < Fog::Service
requires :linode_api_key
recognizes :port, :scheme, :persistent
model_path 'fog/linode/models/dns'
model :record
collection :records
model :zone
collection :zones
request_pa... |
github | fog/fog | https://github.com/fog/fog | lib/fog/linode/models/dns/zone.rb | Ruby | mit | 4,298 | master | 2,323 | require 'fog/core/model'
require 'fog/linode/models/dns/records'
module Fog
module DNS
class Linode
class Zone < Fog::Model
identity :id, :aliases => ['DomainID', 'DOMAINID', 'ResourceID']
attribute :description, :aliases => 'DESCRIPTION'
attribute :domain, :aliases ... |
github | fog/fog | https://github.com/fog/fog | lib/fog/linode/models/dns/records.rb | Ruby | mit | 4,298 | master | 704 | require 'fog/core/collection'
require 'fog/linode/models/dns/record'
module Fog
module DNS
class Linode
class Records < Fog::Collection
attribute :zone
model Fog::DNS::Linode::Record
def all
requires :zone
data = service.domain_resource_list(zone.id).body['DATA... |
github | fog/fog | https://github.com/fog/fog | lib/fog/linode/models/dns/zones.rb | Ruby | mit | 4,298 | master | 483 | require 'fog/core/collection'
require 'fog/linode/models/dns/zone'
module Fog
module DNS
class Linode
class Zones < Fog::Collection
model Fog::DNS::Linode::Zone
def all
data = service.domain_list.body['DATA']
load(data)
end
def get(zone_id)
if... |
github | fog/fog | https://github.com/fog/fog | lib/fog/linode/models/dns/record.rb | Ruby | mit | 4,298 | master | 1,880 | require 'fog/core/model'
module Fog
module DNS
class Linode
class Record < Fog::Model
extend Fog::Deprecation
deprecate :ip, :value
deprecate :ip=, :value=
identity :id, :aliases => ['ResourceID', 'RESOURCEID']
attribute :value, :aliases => 'TARGET'
... |
github | fog/fog | https://github.com/fog/fog | lib/fog/linode/models/compute/ip.rb | Ruby | mit | 4,298 | master | 594 | require 'fog/core/model'
module Fog
module Compute
class Linode
class Ip < Fog::Model
identity :id
attribute :ip
attribute :public
def save
requires :server
raise Fog::Errors::Error.new('Resaving an existing object may create a duplicate') if persisted?
... |
github | fog/fog | https://github.com/fog/fog | lib/fog/linode/models/compute/stack_scripts.rb | Ruby | mit | 4,298 | master | 802 | require 'fog/core/collection'
require 'fog/linode/models/compute/stack_script'
module Fog
module Compute
class Linode
class StackScripts < Fog::Collection
model Fog::Compute::Linode::StackScript
def all
load stackscripts
end
def get(id)
new stackscripts... |
github | fog/fog | https://github.com/fog/fog | lib/fog/linode/models/compute/kernels.rb | Ruby | mit | 4,298 | master | 1,228 | require 'fog/core/collection'
require 'fog/linode/models/compute/kernel'
module Fog
module Compute
class Linode
class Kernels < Fog::Collection
model Fog::Compute::Linode::Kernel
# Returns an Array of the available kernels.
#
# The list of kernels can be filtered by support... |
github | fog/fog | https://github.com/fog/fog | lib/fog/linode/models/compute/images.rb | Ruby | mit | 4,298 | master | 968 | require 'fog/core/collection'
require 'fog/linode/models/compute/image'
module Fog
module Compute
class Linode
class Images < Fog::Collection
model Fog::Compute::Linode::Image
def all
load images
end
def get(id)
new images(id).first
rescue Fog::... |
github | fog/fog | https://github.com/fog/fog | lib/fog/linode/models/compute/node_balancer_flavor.rb | Ruby | mit | 4,298 | master | 239 | require 'fog/core/model'
module Fog
module Compute
class Linode
class NodeBalancerFlavor < Fog::Model
attribute :price_monthly
attribute :price_hourly
attribute :connections
end
end
end
end |
github | fog/fog | https://github.com/fog/fog | lib/fog/linode/models/compute/image.rb | Ruby | mit | 4,298 | master | 315 | require 'fog/core/model'
module Fog
module Compute
class Linode
class Image < Fog::Model
identity :id
attribute :name
attribute :bits
attribute :image_size
attribute :created_at, types: 'time'
attribute :requires_pvops_kernel
end
end
end
end |
github | fog/fog | https://github.com/fog/fog | lib/fog/linode/models/compute/kernel.rb | Ruby | mit | 4,298 | master | 256 | require 'fog/core/model'
module Fog
module Compute
class Linode
class Kernel < Fog::Model
identity :id
attribute :name
attribute :is_xen
attribute :is_kvm
attribute :is_pvops
end
end
end
end |
github | fog/fog | https://github.com/fog/fog | lib/fog/linode/models/compute/stack_script.rb | Ruby | mit | 4,298 | master | 212 | require 'fog/core/model'
module Fog
module Compute
class Linode
class StackScript < Fog::Model
attr_accessor :options
identity :id
attribute :name
end
end
end
end |
github | fog/fog | https://github.com/fog/fog | lib/fog/linode/models/compute/disks.rb | Ruby | mit | 4,298 | master | 1,008 | require 'fog/core/collection'
require 'fog/linode/models/compute/disk'
module Fog
module Compute
class Linode
class Disks < Fog::Collection
model Fog::Compute::Linode::Disk
attribute :server
def all
requires :server
load disks(server.id)
end
def... |
github | fog/fog | https://github.com/fog/fog | lib/fog/linode/models/compute/node_balancer_flavors.rb | Ruby | mit | 4,298 | master | 885 | require 'fog/core/collection'
require 'fog/linode/models/compute/node_balancer_flavor'
module Fog
module Compute
class Linode
class NodeBalancerFlavors < Fog::Collection
model Fog::Compute::Linode::NodeBalancerFlavor
def all
load node_balancer_flavors
end
private... |
github | fog/fog | https://github.com/fog/fog | lib/fog/linode/models/compute/flavor.rb | Ruby | mit | 4,298 | master | 465 | require 'fog/core/model'
module Fog
module Compute
class Linode
class Flavor < Fog::Model
identity :id
attribute :disk
attribute :name
attribute :ram
attribute :transfer
attribute :price
attribute :price_hourly
attribute :cores
attribu... |
github | fog/fog | https://github.com/fog/fog | lib/fog/linode/models/compute/server.rb | Ruby | mit | 4,298 | master | 2,748 | require 'fog/compute/models/server'
module Fog
module Compute
class Linode
class Server < Fog::Compute::Server
attr_reader :stack_script
identity :id
attribute :name
attribute :status
def initialize(attributes={})
super
self.username = 'root'
... |
github | fog/fog | https://github.com/fog/fog | lib/fog/linode/models/compute/data_centers.rb | Ruby | mit | 4,298 | master | 696 | require 'fog/core/collection'
require 'fog/linode/models/compute/data_center'
module Fog
module Compute
class Linode
class DataCenters < Fog::Collection
model Fog::Compute::Linode::DataCenter
def all
load datacenters
end
private
def datacenters(id=nil)
... |
github | fog/fog | https://github.com/fog/fog | lib/fog/linode/models/compute/disk.rb | Ruby | mit | 4,298 | master | 1,815 | require 'fog/core/model'
module Fog
module Compute
class Linode
class Disk < Fog::Model
identity :id
attribute :name
attribute :type
def save
requires :server
raise Fog::Errors::Error.new('Resaving an existing object may create a duplicate') if persisted... |
github | fog/fog | https://github.com/fog/fog | lib/fog/linode/models/compute/servers.rb | Ruby | mit | 4,298 | master | 751 | require 'fog/core/collection'
require 'fog/linode/models/compute/server'
module Fog
module Compute
class Linode
class Servers < Fog::Collection
model Fog::Compute::Linode::Server
def all
load servers
end
def get(id)
new servers(id).first
rescue ... |
github | fog/fog | https://github.com/fog/fog | lib/fog/linode/models/compute/flavors.rb | Ruby | mit | 4,298 | master | 1,069 | require 'fog/core/collection'
require 'fog/linode/models/compute/flavor'
module Fog
module Compute
class Linode
class Flavors < Fog::Collection
model Fog::Compute::Linode::Flavor
def all
load flavors
end
def get(id)
new flavors(id).first
rescue ... |
github | fog/fog | https://github.com/fog/fog | lib/fog/linode/models/compute/data_center.rb | Ruby | mit | 4,298 | master | 208 | require 'fog/core/model'
module Fog
module Compute
class Linode
class DataCenter < Fog::Model
identity :id
attribute :location
attribute :abbr
end
end
end
end |
github | fog/fog | https://github.com/fog/fog | lib/fog/linode/models/compute/ips.rb | Ruby | mit | 4,298 | master | 979 | require 'fog/core/collection'
require 'fog/linode/models/compute/ip'
module Fog
module Compute
class Linode
class Ips < Fog::Collection
model Fog::Compute::Linode::Ip
attribute :server
def all
requires :server
load ips(server.id)
end
def get(id)... |
github | fog/fog | https://github.com/fog/fog | lib/fog/linode/requests/dns/domain_delete.rb | Ruby | mit | 4,298 | master | 615 | module Fog
module DNS
class Linode
class Real
# Delete the given domain from the list Linode hosts
#
# ==== Parameters
# * domain_id<~Integer>: id of domain to delete
#
# ==== Returns
# * response<~Excon::Response>:
# * body<~Hash>:
#... |
github | fog/fog | https://github.com/fog/fog | lib/fog/linode/requests/dns/domain_create.rb | Ruby | mit | 4,298 | master | 1,443 | module Fog
module DNS
class Linode
class Real
# Creates a domain record
#
# ==== Parameters
# * domain<~String>: The zone's name. Note, if master zone, SOA_email is required and if slave
# master_ips is/are required
# * type<~String>: maste... |
github | fog/fog | https://github.com/fog/fog | lib/fog/linode/requests/dns/domain_resource_list.rb | Ruby | mit | 4,298 | master | 1,734 | module Fog
module DNS
class Linode
class Real
# List of resource records for a domain
#
# ==== Parameters
# * domain_id<~Integer>: limit the list to the domain ID specified
# * resource_id<~Integer>: optional. use if want only a specific resource record
#
... |
github | fog/fog | https://github.com/fog/fog | lib/fog/linode/requests/dns/domain_resource_update.rb | Ruby | mit | 4,298 | master | 1,863 | module Fog
module DNS
class Linode
class Real
# Updates a resource record in a domain
#
# ==== Parameters
# * domain_id<~Integer>: limit the list to the domain ID specified
# * resource_id<~Integer>: id of resource to delete
# * options<~Hash>
# * ty... |
github | fog/fog | https://github.com/fog/fog | lib/fog/linode/requests/dns/domain_update.rb | Ruby | mit | 4,298 | master | 1,302 | module Fog
module DNS
class Linode
class Real
# Update a domain record
#
# ==== Parameters
# * domain_id<~Integer>: The ID to identify the zone
# * options<~Hash>
# * domain<~String>: The zone's name.
# * type<~String>: master or slave
# ... |
github | fog/fog | https://github.com/fog/fog | lib/fog/linode/requests/dns/domain_list.rb | Ruby | mit | 4,298 | master | 1,132 | module Fog
module DNS
class Linode
class Real
# List of domains (you have access to)
#
# ==== Parameters
# * domain_id<~Integer>: limit the list to the domain ID specified
#
# ==== Returns
# * response<~Excon::Response>:
# * body<~Array>:
... |
github | fog/fog | https://github.com/fog/fog | lib/fog/linode/requests/dns/domain_resource_create.rb | Ruby | mit | 4,298 | master | 1,781 | module Fog
module DNS
class Linode
class Real
# Creates a resource record in a domain
#
# ==== Parameters
# * domain_id<~Integer>: limit the list to the domain ID specified
# * type<~String>: One of: NS, MX, A, AAAA, CNAME, TXT, or SRV
# * options<~Hash>
... |
github | fog/fog | https://github.com/fog/fog | lib/fog/linode/requests/dns/domain_resource_delete.rb | Ruby | mit | 4,298 | master | 783 | module Fog
module DNS
class Linode
class Real
# Delete the given resource from a domain
#
# ==== Parameters
# * domain_id<~Integer>: id of domain resource belongs to
# * resource_id<~Integer>: id of resource to delete
#
# ==== Returns
# * respo... |
github | fog/fog | https://github.com/fog/fog | lib/fog/linode/requests/compute/linode_reboot.rb | Ruby | mit | 4,298 | master | 1,079 | module Fog
module Compute
class Linode
class Real
# Issues a shutdown, and then a boot job for a given linode
#
# ==== Parameters
# * linode_id<~Integer>: id of linode to reboot
# * options<~Hash>:
# * configId<~Boolean>: id of config to boot server with
... |
github | fog/fog | https://github.com/fog/fog | lib/fog/linode/requests/compute/linode_shutdown.rb | Ruby | mit | 4,298 | master | 664 | module Fog
module Compute
class Linode
class Real
def linode_shutdown(linode_id)
request(
:expects => 200,
:method => 'GET',
:query => { :api_action => 'linode.shutdown', :linodeId => linode_id }
)
end
end
class Mock
... |
github | fog/fog | https://github.com/fog/fog | lib/fog/linode/requests/compute/linode_disk_update.rb | Ruby | mit | 4,298 | master | 896 | module Fog
module Compute
class Linode
class Real
def linode_disk_update(linode_id, disk_id, label, isreadonly)
request(
:expects => 200,
:method => 'GET',
:query => {
:api_action => 'linode.disk.update',
:linodeId => li... |
github | fog/fog | https://github.com/fog/fog | lib/fog/linode/requests/compute/linode_ip_addprivate.rb | Ruby | mit | 4,298 | master | 330 | module Fog
module Compute
class Linode
class Real
def linode_ip_addprivate(linode_id)
request(
:expects => 200,
:method => 'GET',
:query => { :api_action => 'linode.ip.addprivate', :linodeId => linode_id }
)
end
end
end
... |
github | fog/fog | https://github.com/fog/fog | lib/fog/linode/requests/compute/linode_create.rb | Ruby | mit | 4,298 | master | 1,294 | module Fog
module Compute
class Linode
class Real
# Creates a linode and assigns you full privileges
#
# ==== Parameters
# * datacenter_id<~Integer>: id of datacenter to place new linode in
# * plan_id<~Integer>: id of plan to boot new linode with
# * payment_... |
github | fog/fog | https://github.com/fog/fog | lib/fog/linode/requests/compute/linode_delete.rb | Ruby | mit | 4,298 | master | 1,071 | module Fog
module Compute
class Linode
class Real
# List all linodes user has access or delete to
#
# ==== Parameters
# * linode_id<~Integer>: id of linode to delete
# * options<~Hash>:
# * skipChecks<~Boolean>: skips safety checks and always deletes
... |
github | fog/fog | https://github.com/fog/fog | lib/fog/linode/requests/compute/linode_disk_duplicate.rb | Ruby | mit | 4,298 | master | 869 | module Fog
module Compute
class Linode
class Real
def linode_disk_duplicate(linode_id, disk_id)
request(
:expects => 200,
:method => 'GET',
:query => {
:api_action => 'linode.disk.duplicate',
:linodeId => linode_id,
... |
github | fog/fog | https://github.com/fog/fog | lib/fog/linode/requests/compute/avail_kernels.rb | Ruby | mit | 4,298 | master | 1,856 | module Fog
module Compute
class Linode
class Real
# Get available kernels
#
# ==== Parameters
# * options<~Hash>
# * isXen<~Boolean> Show or hide Xen compatible kernels
# * isKVM<~Boolean> Show or hide KVM compatible kernels
#
# ==== Return... |
github | fog/fog | https://github.com/fog/fog | lib/fog/linode/requests/compute/linode_disk_createfromdistribution.rb | Ruby | mit | 4,298 | master | 1,054 | module Fog
module Compute
class Linode
class Real
def linode_disk_createfromdistribution(linode_id, distro_id, name, size, password)
request(
:expects => 200,
:method => 'GET',
:query => {
:api_action => 'linode.disk.createfromdistrib... |
github | fog/fog | https://github.com/fog/fog | lib/fog/linode/requests/compute/linode_ip_list.rb | Ruby | mit | 4,298 | master | 1,571 | module Fog
module Compute
class Linode
class Real
def linode_ip_list(linode_id, ip_id=nil)
options = {}
if ip_id
options.merge!(:ipaddressId => ip_id)
end
request(
:expects => 200,
:method => 'GET',
:query ... |
github | fog/fog | https://github.com/fog/fog | lib/fog/linode/requests/compute/linode_disk_createfromstackscript.rb | Ruby | mit | 4,298 | master | 704 | module Fog
module Compute
class Linode
class Real
def linode_disk_createfromstackscript(linode_id, script_id, distro_id, name, size, password, options={})
request(
:expects => 200,
:method => 'GET',
:query => {
:api_action => 'linode.... |
github | fog/fog | https://github.com/fog/fog | lib/fog/linode/requests/compute/linode_config_delete.rb | Ruby | mit | 4,298 | master | 795 | module Fog
module Compute
class Linode
class Real
def linode_config_delete(linode_id, config_id)
request(
:expects => 200,
:method => 'GET',
:query => {
:api_action => 'linode.config.delete',
:linodeId => linode_id,
... |
github | fog/fog | https://github.com/fog/fog | lib/fog/linode/requests/compute/linode_config_list.rb | Ruby | mit | 4,298 | master | 2,241 | module Fog
module Compute
class Linode
class Real
def linode_config_list(linode_id, config_id=nil, options={})
if config_id
options.merge!(:configid => config_id)
end
request(
:expects => 200,
:method => 'GET',
:query ... |
github | fog/fog | https://github.com/fog/fog | lib/fog/linode/requests/compute/linode_config_create.rb | Ruby | mit | 4,298 | master | 888 | module Fog
module Compute
class Linode
class Real
def linode_config_create(linode_id, kernel_id, name, disk_list)
request(
:expects => 200,
:method => 'GET',
:query => {
:api_action => 'linode.config.create',
:linodeId =... |
github | fog/fog | https://github.com/fog/fog | lib/fog/linode/requests/compute/linode_disk_imagize.rb | Ruby | mit | 4,298 | master | 978 | module Fog
module Compute
class Linode
class Real
def linode_disk_imagize(linode_id, disk_id, description, label)
request(
:expects => 200,
:method => 'GET',
:query => {
:api_action => 'linode.disk.imagize',
:linodeId =>... |
github | fog/fog | https://github.com/fog/fog | lib/fog/linode/requests/compute/image_delete.rb | Ruby | mit | 4,298 | master | 1,364 | module Fog
module Compute
class Linode
class Real
def image_delete(image_id)
request(
:expects => 200,
:method => 'GET',
:query => {
:api_action => 'image.delete',
:imageId => image_id
}
)
e... |
github | fog/fog | https://github.com/fog/fog | lib/fog/linode/requests/compute/linode_boot.rb | Ruby | mit | 4,298 | master | 694 | module Fog
module Compute
class Linode
class Real
def linode_boot(linode_id, config_id)
request(
:expects => 200,
:method => 'GET',
:query => { :api_action => 'linode.boot', :linodeId => linode_id, :configId => config_id }
)
end
e... |
github | fog/fog | https://github.com/fog/fog | lib/fog/linode/requests/compute/avail_linodeplans.rb | Ruby | mit | 4,298 | master | 1,885 | module Fog
module Compute
class Linode
class Real
# Get available plans
#
# ==== Parameters
# * linodeplanId<~Integer>: id to limit results to
#
# ==== Returns
# * response<~Excon::Response>:
# * body<~Array>:
# TODO: docs
def... |
github | fog/fog | https://github.com/fog/fog | lib/fog/linode/requests/compute/linode_config_update.rb | Ruby | mit | 4,298 | master | 905 | module Fog
module Compute
class Linode
class Real
# api docs say LinodeID is optional, turns out its required
def linode_config_update(linode_id, config_id, options={})
request(
:expects => 200,
:method => 'GET',
:query => {
... |
github | fog/fog | https://github.com/fog/fog | lib/fog/linode/requests/compute/linode_disk_list.rb | Ruby | mit | 4,298 | master | 1,627 | module Fog
module Compute
class Linode
class Real
def linode_disk_list(linode_id, disk_id=nil)
options = {}
if disk_id
options.merge!(:diskId => disk_id)
end
request(
:expects => 200,
:method => 'GET',
:query ... |
github | fog/fog | https://github.com/fog/fog | lib/fog/linode/requests/compute/avail_datacenters.rb | Ruby | mit | 4,298 | master | 1,645 | module Fog
module Compute
class Linode
class Real
# Get available data centers
#
# ==== Returns
# * response<~Excon::Response>:
# * body<~Array>:
# TODO: docs
def avail_datacenters
request(
:expects => 200,
:method ... |
github | fog/fog | https://github.com/fog/fog | lib/fog/linode/requests/compute/linode_disk_createfromimage.rb | Ruby | mit | 4,298 | master | 1,092 | module Fog
module Compute
class Linode
class Real
def linode_disk_createfromimage(linode_id, image_id, label, size, password, sshkey)
request(
:expects => 200,
:method => 'GET',
:query => {
:api_action => 'linode.disk.createfromimage'... |
github | fog/fog | https://github.com/fog/fog | lib/fog/linode/requests/compute/avail_nodebalancers.rb | Ruby | mit | 4,298 | master | 1,096 | module Fog
module Compute
class Linode
class Real
# Get NodeBalancer pricing information.
#
# ==== Parameters
#
# ==== Returns
# * response<~Excon::Response>:
# * body<~Array>:
# * 'MONTHLY'<~Float> - Monthly price
# ... |
github | fog/fog | https://github.com/fog/fog | lib/fog/linode/requests/compute/stackscript_list.rb | Ruby | mit | 4,298 | master | 809 | module Fog
module Compute
class Linode
class Real
# Get available stack scripts
#
# ==== Parameters
# * scriptId<~Integer>: id to limit results to
#
# ==== Returns
# * response<~Excon::Response>:
# * body<~Array>:
# TODO: docs
... |
github | fog/fog | https://github.com/fog/fog | lib/fog/linode/requests/compute/linode_disk_delete.rb | Ruby | mit | 4,298 | master | 825 | module Fog
module Compute
class Linode
class Real
def linode_disk_delete(linode_id, disk_id)
request(
:expects => 200,
:method => 'GET',
:query => {
:api_action => 'linode.disk.delete',
:linodeId => linode_id,
... |
github | fog/fog | https://github.com/fog/fog | lib/fog/linode/requests/compute/linode_disk_create.rb | Ruby | mit | 4,298 | master | 908 | module Fog
module Compute
class Linode
class Real
def linode_disk_create(linode_id, name, type, size)
request(
:expects => 200,
:method => 'GET',
:query => {
:api_action => 'linode.disk.create',
:linodeId => linode_id,
... |
github | fog/fog | https://github.com/fog/fog | lib/fog/linode/requests/compute/linode_disk_resize.rb | Ruby | mit | 4,298 | master | 900 | module Fog
module Compute
class Linode
class Real
def linode_disk_resize(linode_id, disk_id, size)
request(
:expects => 200,
:method => 'GET',
:query => {
:api_action => 'linode.disk.resize',
:linodeId => linode_id,
... |
github | fog/fog | https://github.com/fog/fog | lib/fog/linode/requests/compute/image_list.rb | Ruby | mit | 4,298 | master | 1,872 | module Fog
module Compute
class Linode
class Real
def image_list(pending=nil, image_id=nil)
options = {}
if pending
options.merge!(:pending => pending)
end
if image_id
options.merge!(:imageId => image_id)
end
request... |
github | fog/fog | https://github.com/fog/fog | lib/fog/linode/requests/compute/avail_distributions.rb | Ruby | mit | 4,298 | master | 1,882 | module Fog
module Compute
class Linode
class Real
# Get available distributions
#
# ==== Parameters
# * distributionId<~Integer>: id to limit results to
#
# ==== Returns
# * response<~Excon::Response>:
# * body<~Array>:
# TODO: docs
... |
github | fog/fog | https://github.com/fog/fog | lib/fog/linode/requests/compute/linode_update.rb | Ruby | mit | 4,298 | master | 705 | module Fog
module Compute
class Linode
class Real
def linode_update(linode_id, options={})
request(
:expects => 200,
:method => 'GET',
:query => { :api_action => 'linode.update', :linodeId => linode_id }.merge!(options)
)
end
... |
github | fog/fog | https://github.com/fog/fog | lib/fog/linode/requests/compute/linode_list.rb | Ruby | mit | 4,298 | master | 2,532 | module Fog
module Compute
class Linode
class Real
# List all linodes user has access or delete to
#
# ==== Parameters
# * linodeId<~Integer>: Limit the list to the specified LinodeID
#
# ==== Returns
# * response<~Excon::Response>:
# * body<~... |
github | fog/fog | https://github.com/fog/fog | lib/fog/linode/requests/compute/avail_stackscripts.rb | Ruby | mit | 4,298 | master | 1,810 | module Fog
module Compute
class Linode
class Real
def avail_stackscripts(options={})
result = request(
:expects => 200,
:method => 'GET',
:query => { :api_action => 'avail.stackscripts' }.merge!(options)
)
result.body['DATA'].ea... |
github | fog/fog | https://github.com/fog/fog | lib/fog/bin/bare_metal_cloud.rb | Ruby | mit | 4,298 | master | 753 | class BareMetalCloud < Fog::Bin
class << self
def class_for(key)
case key
when :compute
Fog::Compute::BareMetalCloud
else
raise ArgumentError, "Unsupported #{self} service: #{key}"
end
end
def [](service)
@@connections ||= Hash.new do |hash, key|
hash... |
github | fog/fog | https://github.com/fog/fog | lib/fog/bin/vcloud.rb | Ruby | mit | 4,298 | master | 591 | class Vcloud < Fog::Bin
class << self
def class_for(key)
case key
when :compute
Fog::Vcloud::Compute
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/ibm.rb | Ruby | mit | 4,298 | master | 701 | class IBM < Fog::Bin
class << self
def class_for(key)
case key
when :compute
Fog::Compute::IBM
when :storage
Fog::Storage::IBM
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/vcloud_director.rb | Ruby | mit | 4,298 | master | 623 | class VcloudDirector < Fog::Bin
class << self
def class_for(key)
case key
when :compute
Fog::Compute::VcloudDirector
else
raise ArgumentError, "Unrecognized service: #{key}"
end
end
def [](service)
@@connections ||= Hash.new do |hash, key|
hash[key] =... |
github | fog/fog | https://github.com/fog/fog | lib/fog/bin/glesys.rb | Ruby | mit | 4,298 | master | 701 | class Glesys < Fog::Bin
class << self
def class_for(key)
case key
when :compute
Fog::Compute::Glesys
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/cloudsigma.rb | Ruby | mit | 4,298 | master | 683 | class CloudSigma < Fog::Bin
class << self
def class_for(key)
case key
when :compute
Fog::Compute::CloudSigma
else
raise ArgumentError, "Unrecognized service: #{key}"
end
end
def [](service)
@@connections ||= Hash.new do |hash, key|
hash[key] =... |
github | fog/fog | https://github.com/fog/fog | lib/fog/bin/go_grid.rb | Ruby | mit | 4,298 | master | 705 | class GoGrid < Fog::Bin
class << self
def class_for(key)
case key
when :compute
Fog::Compute::GoGrid
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/softlayer.rb | Ruby | mit | 4,298 | master | 1,749 | #
# Author:: Matt Eldridge (<matt.eldridge@us.ibm.com>)
# © Copyright IBM Corporation 2014.
#
# LICENSE: MIT (http://opensource.org/licenses/MIT)
#
class Softlayer < Fog::Bin
class << self
def class_for(key)
case key
when :compute
Fog::Compute::Softlayer
when :dns
Fog::D... |
github | fog/fog | https://github.com/fog/fog | lib/fog/bin/openstack.rb | Ruby | mit | 4,298 | master | 2,732 | class OpenStack < Fog::Bin
class << self
def class_for(key)
case key
when :compute
Fog::Compute::OpenStack
when :identity
Fog::Identity::OpenStack
when :image
Fog::Image::OpenStack
when :network
Fog::Network::OpenStack
when :storage
Fog::... |
github | fog/fog | https://github.com/fog/fog | lib/fog/bin/opennebula.rb | Ruby | mit | 4,298 | master | 1,571 | module OpenNebula # deviates from other bin stuff to accommodate gem
class << self
def class_for(key)
case key
when :compute
Fog::Compute::OpenNebula
else
raise ArgumentError, "Unrecognized service: #{key}"
end
end
def [](service)
@@connections ||= Hash.new ... |
github | fog/fog | https://github.com/fog/fog | lib/fog/bin/dnsmadeeasy.rb | Ruby | mit | 4,298 | master | 704 | class DNSMadeEasy < Fog::Bin
class << self
def class_for(key)
case key
when :dns
Fog::DNS::DNSMadeEasy
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/brightbox.rb | Ruby | mit | 4,298 | master | 838 | class Brightbox < Fog::Bin
class << self
def class_for(key)
case key
when :compute
Fog::Brightbox::Compute
when :storage
Fog::Brightbox::Storage
else
raise ArgumentError, "Unsupported #{self} service: #{key}"
end
end
def [](service)
@@connection... |
github | fog/fog | https://github.com/fog/fog | lib/fog/bin/dreamhost.rb | Ruby | mit | 4,298 | master | 692 | class Dreamhost < Fog::Bin
class << self
def class_for(key)
case key
when :dns
Fog::DNS::Dreamhost
else
raise ArgumentError, "Unrecognized service: #{key}"
end
end
def [](service)
@@connections ||= Hash.new do |hash, key|
hash[key] = case key
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.