[Pulp-list] pulp command line options

Jason Dobies jason.dobies at redhat.com
Tue Oct 12 16:39:46 UTC 2010


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 10/12/2010 12:26 PM, Jason L Connor wrote:
> Hi All,
> 
> I've been digging around in the cli a bit lately, and I wanted to
> propose some common options and option names for our cli. Please note
> that this is semantic nit-picking. :)
> 
> We use a --id option for most of our actions that pertain to which ever
> collection of resources the command is meant to manipulate.
> E.G in "pulp-admin repo sync --id my-repo", the 'my-repo' is a
> repository id. And it'll mean something else for the consumer command,
> the package command, etc.
> 
> Instead of using options called 'id' or even 'consumerid', 'repoid',
> etc. We should use options that associate themselves with the resources
> and provide short names for all of them. We should use this convention
> on all commands. This is what I propose:
> -c, --consumer : consumer id
> -C, --consumer-group : consumer group id
> -e, --errata : errata id
> -p, --package : package name
> -P, --package-group : package group id
> -r, --repo : repository id
> -u, --username : username
> 
> I think --id is ambiguous and using concatenated --conumserid or
> --repoid is probably unnecessary. These proposed changes will make the
> cli more consistent and intuitive for our end users.

For some reason this is taking me a bit to digest, but my gut instinct
is that I like this. I think I'm trying to draw a parallel to other
tools that do something similar but am drawing a blank.

Do we only have --password then and no shortcut to it? I think this is
fine since that should only be used in scripts; once we get the
echo-less password entry in place I suspect that will be common usage.

What does a user create look like? I know that's always been a tricky
example we use when talking about how the CLI reads. I think I remember
in the new CLI refactor the example being:

pulp-admin --username jdob --password awesome user create --username
jconnor --password lessawesome

So does that now become:

pulp-admin -u jdob --password awesome user create -u jconnor --password
lessawesome






> 
> 
> _______________________________________________
> Pulp-list mailing list
> Pulp-list at redhat.com
> https://www.redhat.com/mailman/listinfo/pulp-list


- -- 
Jason Dobies
RHCE# 805008743336126
Freenode: jdob
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJMtI9RAAoJEOMmcTqOSQHCjH0H/iPbHx4BrS6wnt6cliQepnq4
rWMZpp1E3lD1o7nL3oeFb4hjhg+iYmJ6Pqru12dMUTezNmtqrj1q3dxcVSvyvRcm
cfrPwoN+5GcN+gq03XFtCzZbWN59pgOsLF/28bjhT9K5WtpirzNQts9fyQPBK6Ye
cyyWWC1z3QJmP+Qa1KP3ZQrKXBifUN8X0JrvOg9PpDnLFCOFLgSBjWcN/vt1jHt9
bqjdaYJ1mLeFhtDVolU5QyPzVY8Jw5/DvV3eQZeBslR99EsSXYW1g+rta58628xj
wXVF5rjP7oDGQ8phzC0yMBkjVVEiyR+AJHVicGsKKKsTTblPqCS+zrxgiMQQIS0=
=qg5r
-----END PGP SIGNATURE-----




More information about the Pulp-list mailing list