mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
Merge pull request #2119 from frodenas/config_drive
[openstack|compute] Add support for config_drive
This commit is contained in:
commit
de7fe5b768
3 changed files with 5 additions and 1 deletions
|
@ -31,6 +31,7 @@ module Fog
|
||||||
attribute :user_id
|
attribute :user_id
|
||||||
attribute :key_name
|
attribute :key_name
|
||||||
attribute :fault
|
attribute :fault
|
||||||
|
attribute :config_drive
|
||||||
attribute :os_dcf_disk_config, :aliases => 'OS-DCF:diskConfig'
|
attribute :os_dcf_disk_config, :aliases => 'OS-DCF:diskConfig'
|
||||||
attribute :os_ext_srv_attr_host, :aliases => 'OS-EXT-SRV-ATTR:host'
|
attribute :os_ext_srv_attr_host, :aliases => 'OS-EXT-SRV-ATTR:host'
|
||||||
attribute :os_ext_srv_attr_hypervisor_hostname, :aliases => 'OS-EXT-SRV-ATTR:hypervisor_hostname'
|
attribute :os_ext_srv_attr_hypervisor_hostname, :aliases => 'OS-EXT-SRV-ATTR:hypervisor_hostname'
|
||||||
|
@ -280,6 +281,7 @@ module Fog
|
||||||
'availability_zone' => availability_zone,
|
'availability_zone' => availability_zone,
|
||||||
'user_data' => user_data_encoded,
|
'user_data' => user_data_encoded,
|
||||||
'key_name' => key_name,
|
'key_name' => key_name,
|
||||||
|
'config_drive' => config_drive,
|
||||||
'security_groups' => @security_groups,
|
'security_groups' => @security_groups,
|
||||||
'min_count' => @min_count,
|
'min_count' => @min_count,
|
||||||
'max_count' => @max_count,
|
'max_count' => @max_count,
|
||||||
|
|
|
@ -13,7 +13,7 @@ module Fog
|
||||||
}
|
}
|
||||||
|
|
||||||
vanilla_options = ['metadata', 'accessIPv4', 'accessIPv6',
|
vanilla_options = ['metadata', 'accessIPv4', 'accessIPv6',
|
||||||
'availability_zone', 'user_data', 'key_name', 'adminPass']
|
'availability_zone', 'user_data', 'key_name', 'adminPass', 'config_drive']
|
||||||
vanilla_options.select{|o| options[o]}.each do |key|
|
vanilla_options.select{|o| options[o]}.each do |key|
|
||||||
data['server'][key] = options[key]
|
data['server'][key] = options[key]
|
||||||
end
|
end
|
||||||
|
@ -122,6 +122,7 @@ module Fog
|
||||||
'created' => '2012-09-27T00:04:18Z',
|
'created' => '2012-09-27T00:04:18Z',
|
||||||
'updated' => '2012-09-27T00:04:27Z',
|
'updated' => '2012-09-27T00:04:27Z',
|
||||||
'user_id' => @openstack_username,
|
'user_id' => @openstack_username,
|
||||||
|
'config_drive' => options['config_drive'] || '',
|
||||||
}
|
}
|
||||||
|
|
||||||
response_data = {
|
response_data = {
|
||||||
|
|
|
@ -16,6 +16,7 @@ Shindo.tests('Fog::Compute[:openstack] | server requests', ['openstack']) do
|
||||||
'created' => String,
|
'created' => String,
|
||||||
'updated' => String,
|
'updated' => String,
|
||||||
'user_id' => String,
|
'user_id' => String,
|
||||||
|
'config_drive' => String,
|
||||||
}
|
}
|
||||||
|
|
||||||
@create_format = {
|
@create_format = {
|
||||||
|
|
Loading…
Reference in a new issue