anchor.diff:    #   defaultto :<%= resource.has_name? %>
     # end
   
  -<%  if resource.dsc_module %>
  +<%  if resource.dsc_module -%>
     newparam(:dscmeta_module_name) do
       defaultto "<%= resource.dsc_module %>"
     end
  
positive.code:   end
  
    validate do
  <% resource.properties.select{|rp| rp.required? }.each do |property| -%>
      fail('dsc_<%= property.name.downcase %> is a required attribute') if self[:dsc_<%= property.name.downcase %>].nil?
  <% end -%>
    end
  
    newparam(:dscmeta_resource_name) do
  
negative.code:     defaultto :present
    end
  
  <%  resource.properties.each do |property| -%>
    # Name:         <%= property.name %>
    # Type:         <%= property.type %>
    # IsMandatory:  <%= property.required? ? 'True' : 'False' %>
    # Values:       <%= property.values ? property.values : 'None' %>
    newparam(:dsc_<%= property.name.downcase %>) do
  <%    if property.required? -%>
      isrequired
  <%    end -%>
  <%    if property.values && property.values.any? -%>
      newvalues(<%= property.values.collect{|v| "\"#{v.downcase}\", \"#{v}\"" }.join(", ")%>)
  <%    end -%>
  <%    if property.bool? -%>
      newvalues("True", "False", "true", "false" ,:true, :false)
  <%    end -%>
  <%    if property.string? && property.values && !property.values.any? -%>
      munge do |value|
        value.downcase
      end
  <%    end -%>
  <%    if property.uint? -%>
      newvalues(/^\d+$/)
  <%    end -%>
  <%    if property.int? -%>
      newvalues(/^(\+|\-)\d+$/)
  <%    end -%>
    end
  
  <%  end %>
  end
  
  