]> git.donarmstrong.com Git - dsa-puppet.git/blob - 3rdparty/modules/keystone/lib/puppet/type/keystone_role.rb
c6e7d1d45fbcb3444450a8d482f3cf87d2830799
[dsa-puppet.git] / 3rdparty / modules / keystone / lib / puppet / type / keystone_role.rb
1 # LP#1408531
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_role) do
5
6   desc <<-EOT
7     This is currently used to model the creation of
8     keystone roles.
9   EOT
10
11   ensurable
12
13   newparam(:name, :namevar => true) do
14     newvalues(/\S+/)
15   end
16
17   newproperty(:id) do
18     validate do |v|
19       raise(Puppet::Error, 'This is a read only property')
20     end
21   end
22
23   # we should not do anything until the keystone service is started
24   autorequire(:service) do
25     ['keystone']
26   end
27
28   auth_param_doc=<<EOT
29 If no other credentials are present, the provider will search in
30 /etc/keystone/keystone.conf for an admin token and auth url.
31 EOT
32   Puppet::Util::Openstack.add_openstack_type_methods(self, auth_param_doc)
33 end