Uploaded image for project: 'Razor (moved to puppet.atlassian.net)'
  1. Razor (moved to puppet.atlassian.net)
  2. RAZOR-192

Add `"broker": "foo"` as a shortcut for`"broker": {"name": "foo"}`

    XMLWordPrintable

Details

    • Improvement
    • Status: Closed
    • Normal
    • Resolution: Fixed
    • RAZOR 0.14.1
    • RAZOR 0.15.0
    • QA, Server
    • None
    • 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.

      Attachments

        Issue Links

          Activity

            People

              phong Phong Ly
              scott.mcclellan Scott McClellan
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Zendesk Support