2 File.expand_path('../..', File.dirname(__FILE__)).tap { |dir| $LOAD_PATH.unshift(dir) unless $LOAD_PATH.include?(dir) }
3 require 'puppet/util/openstack'
4 Puppet::Type.newtype(:keystone_service) do
6 desc 'This type can be used to manage keystone services.'
10 newparam(:name, :namevar => true) do
11 desc 'The name of the service.'
17 raise(Puppet::Error, 'This is a read only property')
22 desc 'The type of service'
24 fail('The service type is required.') unless value
28 newproperty(:description) do
29 desc 'A description of the service.'
33 # This ensures the service is started and therefore the keystone
34 # config is configured IF we need them for authentication.
35 # If there is no keystone config, authentication credentials
36 # need to come from another source.
37 autorequire(:service) do
42 If no other credentials are present, the provider will search in
43 /etc/keystone/keystone.conf for an admin token and auth url.
45 Puppet::Util::Openstack.add_openstack_type_methods(self, auth_param_doc)