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