mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
Merge pull request #560 from xtoddx/oszones
[OpenStack|compute] add zone awareness
This commit is contained in:
commit
3f00d86102
2 changed files with 6 additions and 1 deletions
|
@ -20,6 +20,7 @@ module Fog
|
||||||
attribute :progress
|
attribute :progress
|
||||||
attribute :accessIPv4
|
attribute :accessIPv4
|
||||||
attribute :accessIPv6
|
attribute :accessIPv6
|
||||||
|
attribute :availability_zone
|
||||||
attribute :state, :aliases => 'status'
|
attribute :state, :aliases => 'status'
|
||||||
|
|
||||||
attr_reader :password
|
attr_reader :password
|
||||||
|
@ -153,7 +154,8 @@ module Fog
|
||||||
'metadata' => meta_hash,
|
'metadata' => meta_hash,
|
||||||
'personality' => personality,
|
'personality' => personality,
|
||||||
'accessIPv4' => accessIPv4,
|
'accessIPv4' => accessIPv4,
|
||||||
'accessIPv6' => accessIPv6
|
'accessIPv6' => accessIPv6,
|
||||||
|
'availability_zone' => availability_zone
|
||||||
}
|
}
|
||||||
options = options.reject {|key, value| value.nil?}
|
options = options.reject {|key, value| value.nil?}
|
||||||
data = connection.create_server(name, image_ref, flavor_ref, options)
|
data = connection.create_server(name, image_ref, flavor_ref, options)
|
||||||
|
|
|
@ -30,6 +30,9 @@ module Fog
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
if options['availability_zone']
|
||||||
|
data['server']['availability_zone'] = options['availability_zone']
|
||||||
|
end
|
||||||
request(
|
request(
|
||||||
:body => MultiJson.encode(data),
|
:body => MultiJson.encode(data),
|
||||||
:expects => [200, 202],
|
:expects => [200, 202],
|
||||||
|
|
Loading…
Add table
Reference in a new issue