Hello,

I'm trying to create my own custom type according to guide at http://garylarizza.com/blog/2013/12/15/seriously-what-is-this-provider-doing/.

My problem is that I want one of the resource's properties to be mandatory and failed if the property is not defined. So in the type I have:

newproperty(:bp) do
  defaultto do :absent end
  validate do |value|
    raise ArgumentError, "'bp' property is mandatory"
  end
end

With this code, evertyhing seems fine when I'm programming puppet and if I try to create a resource without a "bp" property, I get the error message.

But my problem is that with this code, I can't use "puppet resource" order, because I get the error too when it tries to get the list of resources already defined.

        Any help?

--
Angel L. Mateo Martínez
Sección de Telemática
Área de Tecnologías de la Información
y las Comunicaciones Aplicadas (ATICA)
http://www.um.es/atica
Tfo: 868887590
Fax: 868888337

--
You received this message because you are subscribed to the Google Groups "Puppet 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/54D9DA34.2060601%40um.es.
For more options, visit https://groups.google.com/d/optout.

Reply via email to