+ newproperty(:domain) do
+ desc 'Domain for tenant.'
+ newvalues(nil, /\S+/)
+ def insync?(is)
+ raise(Puppet::Error, "The domain cannot be changed from #{self.should} to #{is}") unless self.should == is
+ true
+ end
+ end
+
+ autorequire(:keystone_domain) do
+ # use the domain parameter if given, or the one from name if any
+ self[:domain] || Util.split_domain(self[:name])[1]
+ end
+