Files
puppet-sabayon/spec/unit/type
Ben Roberts 5e5d056025 Remove required attribute validation
Previously, the entropy types would require that either package, tag, or repo
were provided, since that makes sense for the entropy files. Having a resource
that could not provide any of these would leave a malformed entry in the files.

I've had to remove that due to a deficiency in Puppet that's taken a long time
to track down. While the validation works fine for resources specified in
manifests, it breaks when parsing the records back in. Here's why:

- The provider instances method is called to retrieve a list of all entries
  in the entropy files. This correctly parses the name and properties into the
  provider instance object
- Puppet's type.rb enumerates through each of these, and tries to create a new
  Type insance using just the name and provider parameters from the provider
  instance. It then intends to iterate through the properties and add them one
  at a time.
  0c2157974a/lib/puppet/type.rb (L1180)
- The problem is that the top-level validation function is called when the
  object is first created, and at this time, none of the properties have been
  set, so the required properties have not been set and validation fails.

The top-level validation block cannot mandate a property be set, only other
types of condition.
2016-10-13 16:52:29 +01:00
..