Hi all,
There is a pending PR on inventory to add support for checking configurations
against a schema. The configs are directly mappable to JSON and the schemas
are actual JSON schemas.
Now to create a resource with configuration is a two-step process. First one
creates a resource without configuration and then adds a configuration to it.
When the PR is merged the configuration will be checked against the schema
(stored at the resource type) but that check will only happen when the config
is created (or updated), not when the resource itself is created.
Today, Heiko asked if a URL resource could be made required to have a valid
URL. Given the above, the answer is yes, but the URL resource can exist
without any URL, too, until someone assigns one to it (at which point it can
be ensured that it is a valid URL using some regex magic).
My question is, do we actually want to support Heiko's scenario (i.e. disallow
resource creation without also supplying valid config)? In my mind, one of the
reasons for bothering with Hawkular and abandoning RHQ was to ease up on the
strict rules we had there about resource hierarchies and resource creation.
Certainly, those restrictions and rules made sense, but at the same time
forced a rigid and non-modifiable workflow when working with RHQ.
IMHO, there should be an understanding of an "incomplete" resource - i.e. one
that doesn't have all the data with it that is should have - either because
that piece of data hasn't trickled down to the inventory or because the user
actually didn't decide yet what the resource will end up being. Having the
support for incomplete resources also makes the future support for changing
the resources' types easier - it could be done in steps.
Do you see strong reasons for requiring valid config at resource creation time
or do you think that current workflow is "workable" and my reasons for doing
it that way at least partially valid?
Thanks for input,
Lukas
Show replies by date