mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
[Brightbox] Fix zone_id/flavour_id getter/setter for Server
This commit is contained in:
parent
63a204cae0
commit
60a3f4585f
1 changed files with 17 additions and 2 deletions
|
@ -27,8 +27,7 @@ module Fog
|
||||||
# Links - to be replaced
|
# Links - to be replaced
|
||||||
attribute :account_id, :aliases => "account", :squash => "id"
|
attribute :account_id, :aliases => "account", :squash => "id"
|
||||||
attribute :image_id, :aliases => "image", :squash => "id"
|
attribute :image_id, :aliases => "image", :squash => "id"
|
||||||
attribute :flavor_id, :aliases => "server_type", :squash => "id"
|
|
||||||
attribute :zone_id, :aliases => "zone", :squash => "id"
|
|
||||||
attribute :snapshots
|
attribute :snapshots
|
||||||
attribute :cloud_ips
|
attribute :cloud_ips
|
||||||
attribute :interfaces
|
attribute :interfaces
|
||||||
|
@ -39,6 +38,22 @@ module Fog
|
||||||
super
|
super
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def zone_id
|
||||||
|
attributes[:zone_id] || zone[:id] || zone['id']
|
||||||
|
end
|
||||||
|
|
||||||
|
def flavor_id
|
||||||
|
attributes[:flavor_id] || server_type[:id] || server_type['id']
|
||||||
|
end
|
||||||
|
|
||||||
|
def zone_id=(incoming_zone_id)
|
||||||
|
attributes[:zone_id] = incoming_zone_id
|
||||||
|
end
|
||||||
|
|
||||||
|
def flavor_id=(incoming_flavour_id)
|
||||||
|
attributes[:flavor_id] = incoming_flavour_id
|
||||||
|
end
|
||||||
|
|
||||||
def snapshot
|
def snapshot
|
||||||
requires :identity
|
requires :identity
|
||||||
connection.snapshot_server(identity)
|
connection.snapshot_server(identity)
|
||||||
|
|
Loading…
Reference in a new issue