On Tue, Dec 9, 2014 at 9:00 PM, Brian Stansberry <brian.stansberry@redhat.com> wrote:
5) Why would I use an attribute group instead of a child resource?

Because requiring users to add a child resource just to set a bunch of
values that are really part of the config of the parent resource forces
them to use a CLI batch to correctly configure the parent resource.


One thing that I am not sure about this is, how do we do validation for things like this?

Simple example would be "required" validation for attribute group.
You want to enforce few attributes that are part of the group to be required.

but on other hand you don't want to enforce them as part of resource:add operation.
as they are only "required" when you are editing / adding attribute group.

With current code we enforce required for all attributes on a resource that is being added.
Which is bit inconvenient for when we have attribute groups and want to do it bit differently.

So question is should we support selective validation based on groups or not?


--
tomaz