Details
-
Improvement
-
Status: Closed
-
Normal
-
Resolution: Fixed
-
RAZOR 0.14.1
-
None
-
8
-
April 23
-
Major
Description
Right now, if the user wants to reference another entity on the command line, the following is necessary:
create-policy --repo '{"name":"centos6.4"}' --task '{"name":"centos"}' --broker '{"name":"noop"}' ...
|
This should be simplified to allow just the name of the reference. E.g.:
create-policy --repo centos6.4 --task centos --broker noop ...
|
This change will affect:
- Create Policy
- Create Repo
- Move Policy
Implementation-wise, this should be done on the server side by conforming the data from the short form to the long form, potentially allowing easier embedded, referenced objects to be created in the future.
In cases where you can supply a new entity, rather than just the reference (which should ideally be all of them), that should still be supported, and can use the string vs object distinction to choose between create and reference.
Ideally this data transformation should happen on the command object, where we attach a new "deprecated" type that will match earlier than validation, and can transform the supplied data from the shortcut form to the standard form, then validate only the standard form. That avoids our code having any special support for these mixed-datatype attributes.