diff --git a/manifests/init.pp b/manifests/init.pp index 33300722..a3d6c291 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -193,23 +193,23 @@ # # [*nova_compute_service_type*] # (optional) Nova service type to use when searching catalog. -# Defaults to 'compute'. +# Defaults to $facts['os_service_default']. # # [*cinder_service_type*] # (optional) Cinder service type to use when searching catalog. -# Defaults to 'volumev3'. +# Defaults to $facts['os_service_default']. # # [*swift_service_type*] # (optional) Swift service type to use when searching catalog. -# Defaults to 'object-store'. +# Defaults to $facts['os_service_default']. # # [*neutron_service_type*] # (optional) Neutron service type to use when searching catalog. -# Defaults to 'network'. +# Defaults to $facts['os_service_default']. # # [*glance_service_type*] # (optional) Glance service type to use when searching catalog. -# Defaults to 'image'. +# Defaults to $facts['os_service_default']. # # [*nova_compute_endpoint_type*] # (optional) Service endpoint type to use when searching catalog. @@ -282,11 +282,11 @@ class trove( $swift_url = $facts['os_service_default'], $neutron_url = $facts['os_service_default'], $glance_url = $facts['os_service_default'], - $nova_compute_service_type = 'compute', - $cinder_service_type = 'volumev3', - $swift_service_type = 'object-store', - $neutron_service_type = 'network', - $glance_service_type = 'image', + $nova_compute_service_type = $facts['os_service_default'], + $cinder_service_type = $facts['os_service_default'], + $swift_service_type = $facts['os_service_default'], + $neutron_service_type = $facts['os_service_default'], + $glance_service_type = $facts['os_service_default'], $nova_compute_endpoint_type = $facts['os_service_default'], $cinder_endpoint_type = $facts['os_service_default'], $swift_endpoint_type = $facts['os_service_default'], diff --git a/spec/classes/trove_init_spec.rb b/spec/classes/trove_init_spec.rb index 4f9e18ab..88f0844c 100644 --- a/spec/classes/trove_init_spec.rb +++ b/spec/classes/trove_init_spec.rb @@ -32,11 +32,11 @@ describe 'trove' do is_expected.to contain_trove_config('DEFAULT/swift_url').with_value('') is_expected.to contain_trove_config('DEFAULT/neutron_url').with_value('') is_expected.to contain_trove_config('DEFAULT/glance_url').with_value('') - is_expected.to contain_trove_config('DEFAULT/nova_compute_service_type').with_value('compute') - is_expected.to contain_trove_config('DEFAULT/cinder_service_type').with_value('volumev3') - is_expected.to contain_trove_config('DEFAULT/swift_service_type').with_value('object-store') - is_expected.to contain_trove_config('DEFAULT/neutron_service_type').with_value('network') - is_expected.to contain_trove_config('DEFAULT/glance_service_type').with_value('image') + is_expected.to contain_trove_config('DEFAULT/nova_compute_service_type').with_value('') + is_expected.to contain_trove_config('DEFAULT/cinder_service_type').with_value('') + is_expected.to contain_trove_config('DEFAULT/swift_service_type').with_value('') + is_expected.to contain_trove_config('DEFAULT/neutron_service_type').with_value('') + is_expected.to contain_trove_config('DEFAULT/glance_service_type').with_value('') is_expected.to contain_trove_config('DEFAULT/nova_compute_endpoint_type').with_value('') is_expected.to contain_trove_config('DEFAULT/cinder_endpoint_type').with_value('') is_expected.to contain_trove_config('DEFAULT/swift_endpoint_type').with_value('') @@ -103,11 +103,16 @@ describe 'trove' do context 'with parameters' do let :params do { - :nova_compute_url => 'http://localhost:8774/v2', - :cinder_url => 'http://localhost:8776/v1', - :swift_url => 'http://localhost:8080/v1/AUTH_', - :neutron_url => 'http://localhost:9696', - :glance_url => 'http://localhost:9292' + :nova_compute_url => 'http://localhost:8774/v2', + :cinder_url => 'http://localhost:8776/v1', + :swift_url => 'http://localhost:8080/v1/AUTH_', + :neutron_url => 'http://localhost:9696', + :glance_url => 'http://localhost:9292', + :nova_compute_service_type => 'compute', + :cinder_service_type => 'volumev3', + :swift_service_type => 'object-store', + :neutron_service_type => 'network', + :glance_service_type => 'image', } end @@ -117,6 +122,11 @@ describe 'trove' do is_expected.to contain_trove_config('DEFAULT/swift_url').with_value('http://localhost:8080/v1/AUTH_') is_expected.to contain_trove_config('DEFAULT/neutron_url').with_value('http://localhost:9696') is_expected.to contain_trove_config('DEFAULT/glance_url').with_value('http://localhost:9292') + is_expected.to contain_trove_config('DEFAULT/nova_compute_service_type').with_value('compute') + is_expected.to contain_trove_config('DEFAULT/cinder_service_type').with_value('volumev3') + is_expected.to contain_trove_config('DEFAULT/swift_service_type').with_value('object-store') + is_expected.to contain_trove_config('DEFAULT/neutron_service_type').with_value('network') + is_expected.to contain_trove_config('DEFAULT/glance_service_type').with_value('image') end end