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_endpoint) do
6 desc 'Type for managing keystone endpoints.'
10 newparam(:name, :namevar => true) do
16 raise(Puppet::Error, 'This is a read only property')
20 newproperty(:region) do
23 newproperty(:public_url) do
26 newproperty(:internal_url) do
29 newproperty(:admin_url) do
32 # we should not do anything until the keystone service is started
33 autorequire(:service) do
37 autorequire(:keystone_service) do
38 (region, service_name) = self[:name].split('/')
43 If no other credentials are present, the provider will search in
44 /etc/keystone/keystone.conf for an admin token and auth url.
46 Puppet::Util::Openstack.add_openstack_type_methods(self, auth_param_doc)