2 File.expand_path('../..', File.dirname(__FILE__)).tap { |dir| $LOAD_PATH.unshift(dir) unless $LOAD_PATH.include?(dir) }
3 File.expand_path('../../../../openstacklib/lib', File.dirname(__FILE__)).tap { |dir| $LOAD_PATH.unshift(dir) unless $LOAD_PATH.include?(dir) }
5 Puppet::Type.newtype(:keystone_user_role) do
8 This is currently used to model the creation of
11 User roles are an assignment of a role to a user on
12 a certain tenant. The combination of all of these
18 newparam(:name, :namevar => true) do
21 newproperty(:roles, :array_matching => :all) do
23 return false unless is.is_a? Array
24 # order of roles does not matter
25 is.sort == self.should.sort
29 autorequire(:keystone_user) do
30 self[:name].rpartition('@').first
33 autorequire(:keystone_tenant) do
34 self[:name].rpartition('@').last
37 autorequire(:keystone_role) do
41 # we should not do anything until the keystone service is started
42 autorequire(:service) do