mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
default to Ubuntu 10.04 LTS 64bit for image id
This commit is contained in:
parent
331d58dabf
commit
945df29845
10 changed files with 39 additions and 10 deletions
|
@ -205,6 +205,8 @@ module Fog
|
|||
@aws_access_key_id = options[:aws_access_key_id]
|
||||
@aws_secret_access_key = options[:aws_secret_access_key]
|
||||
@hmac = Fog::HMAC.new('sha256', @aws_secret_access_key)
|
||||
@region = options[:region] ||= 'us-east-1'
|
||||
|
||||
if @endpoint = options[:endpoint]
|
||||
endpoint = URI.parse(@endpoint)
|
||||
@host = endpoint.host
|
||||
|
@ -212,7 +214,6 @@ module Fog
|
|||
@port = endpoint.port
|
||||
@scheme = endpoint.scheme
|
||||
else
|
||||
options[:region] ||= 'us-east-1'
|
||||
@host = options[:host] || case options[:region]
|
||||
when 'ap-northeast-1'
|
||||
'ec2.ap-northeast-1.amazonaws.com'
|
||||
|
|
|
@ -42,8 +42,22 @@ module Fog
|
|||
attr_writer :private_key, :private_key_path, :public_key, :public_key_path, :username
|
||||
|
||||
def initialize(attributes={})
|
||||
self.groups ||= ["default"] unless attributes[:subnet_id]
|
||||
self.flavor_id ||= 'm1.small'
|
||||
self.groups ||= ["default"] unless attributes[:subnet_id]
|
||||
self.flavor_id ||= 'c1.medium'
|
||||
self.image_id ||= begin
|
||||
case attributes[:connection].instance_variable_get(:@region) # Ubuntu 10.04 LTS 64bit (EBS)
|
||||
when 'ap-northeast-1'
|
||||
'ami-5e0fa45f'
|
||||
when 'ap-southeast-1'
|
||||
'ami-f092eca2'
|
||||
when 'eu-west-1'
|
||||
'ami-3d1f2b49'
|
||||
when 'us-east-1'
|
||||
'ami-3202f25b'
|
||||
when 'us-west-1'
|
||||
'ami-f5bfefb0'
|
||||
end
|
||||
end
|
||||
super
|
||||
end
|
||||
|
||||
|
|
|
@ -25,7 +25,8 @@ module Fog
|
|||
attr_writer :private_key, :private_key_path, :public_key, :public_key_path, :username
|
||||
|
||||
def initialize(attributes={})
|
||||
self.flavor_id ||= '94fd37a7-2606-47f7-84d5-9000deda52ae'
|
||||
self.flavor_id ||= '94fd37a7-2606-47f7-84d5-9000deda52ae' # Block 1GB Virtual Server
|
||||
self.image_id ||= '03807e08-a13d-44e4-b011-ebec7ef2c928' # Ubuntu LTS 10.04 64bit
|
||||
super
|
||||
end
|
||||
|
||||
|
|
|
@ -28,6 +28,12 @@ module Fog
|
|||
attribute :cloud_ips
|
||||
attribute :interfaces
|
||||
|
||||
def initialize(attributes={})
|
||||
self.flavor_id ||= 'typ-4nssg' # Nano
|
||||
self.image_id ||= 'img-tjjt6' # Lucid 10.04 LTS 64bit
|
||||
super
|
||||
end
|
||||
|
||||
def snapshot
|
||||
requires :identity
|
||||
connection.snapshot_server(identity)
|
||||
|
|
|
@ -21,6 +21,7 @@ module Fog
|
|||
attribute :sandbox # Optional. Default: False
|
||||
|
||||
def initialize(attributes={})
|
||||
image_id ||= 'ubuntu_10_04_LTS_64_base' # Ubuntu 10.04 LTS 64bit
|
||||
super
|
||||
end
|
||||
|
||||
|
|
|
@ -22,7 +22,8 @@ module Fog
|
|||
attr_writer :private_key, :private_key_path, :public_key, :public_key_path, :username
|
||||
|
||||
def initialize(attributes={})
|
||||
self.flavor_id ||= 1
|
||||
self.flavor_id ||= 1 # 256 server
|
||||
self.image_id ||= 49 # Ubuntu 10.04 LTS 64bit
|
||||
super
|
||||
end
|
||||
|
||||
|
|
|
@ -23,7 +23,8 @@ module Fog
|
|||
attr_writer :private_key, :private_key_path, :public_key, :public_key_path, :username
|
||||
|
||||
def initialize(attributes={})
|
||||
self.flavor_id ||= 1
|
||||
self.flavor_id ||= 1 # 256 server
|
||||
self.image_id ||= 49 # Ubuntu 10.04 LTS 64bit
|
||||
super
|
||||
end
|
||||
|
||||
|
|
|
@ -4,8 +4,11 @@ module Fog
|
|||
module Voxel
|
||||
class Compute
|
||||
class Image < Fog::Model
|
||||
|
||||
identity :id
|
||||
attribute :name
|
||||
|
||||
attribute :summary
|
||||
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -16,6 +16,7 @@ module Fog
|
|||
attribute :ip_assignments, :aliases => 'ipassignments'
|
||||
|
||||
def initialize(attributes={})
|
||||
self.image_id ||= '55' # Ubuntu 10.04 LTS 64bit
|
||||
super
|
||||
end
|
||||
|
||||
|
|
|
@ -16,10 +16,10 @@ module Fog
|
|||
options[:image_id] = image_id
|
||||
end
|
||||
|
||||
data = request("voxel.images.list", options).body
|
||||
data = request("voxel.images.list", options)
|
||||
|
||||
if data['stat'] == "ok"
|
||||
data['images']
|
||||
if data.body['stat'] == "ok"
|
||||
data
|
||||
else
|
||||
raise Fog::Voxel::Compute::NotFound
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue