1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00

[bluebox] rename blocks to compute for consistency

This commit is contained in:
geemus 2010-09-08 12:07:45 -07:00
parent 3d3d247a99
commit a637504d18
18 changed files with 26 additions and 26 deletions

View file

@ -4,14 +4,14 @@ module Fog
extend Fog::Provider
service_path 'fog/bluebox'
service :blocks
service :compute
def self.new(attributes = {})
location = caller.first
warning = "[yellow][WARN] Fog::Bluebox#new is deprecated, use Fog::Bluebox::Blocks#new instead[/]"
warning = "[yellow][WARN] Fog::Bluebox#new is deprecated, use Fog::Bluebox::Compute#new instead[/]"
warning << " [light_black](" << location << ")[/] "
Formatador.display_line(warning)
Fog::Bluebox::Blocks.new(attributes)
Fog::Bluebox::Compute.new(attributes)
end
end

View file

@ -10,21 +10,21 @@ module Bluebox
def [](service)
@@connections ||= Hash.new do |hash, key|
hash[key] = case key
when :blocks
Fog::Bluebox::Blocks.new
when :compute
Fog::Bluebox::Compute.new
end
end
@@connections[service]
end
def services
[:blocks]
[:compute]
end
for collection in Fog::Bluebox::Blocks.collections
for collection in Fog::Bluebox::Compute.collections
module_eval <<-EOS, __FILE__, __LINE__
def #{collection}
self[:blocks].#{collection}
self[:compute].#{collection}
end
EOS
end

View file

@ -1,10 +1,10 @@
module Fog
module Bluebox
class Blocks < Fog::Service
class Compute < Fog::Service
requires :bluebox_api_key, :bluebox_customer_id
model_path 'fog/bluebox/models/blocks'
model_path 'fog/bluebox/models/compute'
model :flavor
collection :flavors
model :image
@ -12,7 +12,7 @@ module Fog
model :server
collection :servers
request_path 'fog/bluebox/requests/blocks'
request_path 'fog/bluebox/requests/compute'
request :create_block
request :destroy_block
request :get_block

View file

@ -2,7 +2,7 @@ require 'fog/model'
module Fog
module Bluebox
class Blocks
class Compute
class Flavor < Fog::Model

View file

@ -3,7 +3,7 @@ require 'fog/bluebox/models/flavor'
module Fog
module Bluebox
class Blocks
class Compute
class Flavors < Fog::Collection

View file

@ -2,7 +2,7 @@ require 'fog/model'
module Fog
module Bluebox
class Blocks
class Compute
class Image < Fog::Model

View file

@ -3,7 +3,7 @@ require 'fog/bluebox/models/image'
module Fog
module Bluebox
class Blocks
class Compute
class Images < Fog::Collection

View file

@ -2,7 +2,7 @@ require 'fog/model'
module Fog
module Bluebox
class Blocks
class Compute
class BlockInstantiationError < StandardError; end

View file

@ -3,7 +3,7 @@ require 'fog/bluebox/models/server'
module Fog
module Bluebox
class Blocks
class Compute
class Servers < Fog::Collection

View file

@ -1,6 +1,6 @@
module Fog
module Bluebox
class Blocks
class Compute
class Real
# Create a new block

View file

@ -1,6 +1,6 @@
module Fog
module Bluebox
class Blocks
class Compute
class Real
# Destroy a block

View file

@ -1,6 +1,6 @@
module Fog
module Bluebox
class Blocks
class Compute
class Real
# Get details of a block.

View file

@ -1,6 +1,6 @@
module Fog
module Bluebox
class Blocks
class Compute
class Real
# Get list of blocks

View file

@ -1,6 +1,6 @@
module Fog
module Bluebox
class Blocks
class Compute
class Real
# Get details of a product

View file

@ -1,6 +1,6 @@
module Fog
module Bluebox
class Blocks
class Compute
class Real
# Get list of products

View file

@ -1,6 +1,6 @@
module Fog
module Bluebox
class Blocks
class Compute
class Real
# Get details of a template

View file

@ -1,6 +1,6 @@
module Fog
module Bluebox
class Blocks
class Compute
class Real
# Get list of OS templates

View file

@ -1,6 +1,6 @@
module Fog
module Bluebox
class Blocks
class Compute
class Real
# Reboot block