[Freeipa-devel] [PATCHES] 0499-0502 permission CLI: rename --permissions to --right
Misnyovszki Adam
amisnyov at redhat.com
Thu Mar 20 18:20:40 UTC 2014
On Tue, 18 Mar 2014 12:02:06 +0100
Petr Viktorin <pviktori at redhat.com> wrote:
> Hello,
> This renames --permissions to --right. The old name is kept as a
> deprecated alias.
> FreeIPA didn't have a mechanism for doing this, so I added one.
> Also, while I was digging around in this part, I made the new IntEnum
> (and all future Enums) act like StrEnum in --help output.
>
>
> https://fedorahosted.org/freeipa/ticket/4231
>
499 ACK
500 ACK
501 ACK
- although should it allow mixing deprecated and current aliases(eg
--permission=read --right=write)?
- works fine with cli / webui also
- help displays nicely
502
- tested with more than one deprecated alias - API.txt validation
doesn't match, although it has the same output:
Got StrEnum('ipapermright', attribute=True, cli_name='right',
deprecated_cli_aliases=set(['testalias', 'permissions']),
multivalue=True, required=False, values=(u'read', u'search',
u'compare', u'write', u'add', u'delete', u'all'))
Expected StrEnum('ipapermright', attribute=True, cli_name='right',
deprecated_cli_aliases=set(['testalias','permissions']),
multivalue=True, required=False, values=(u'read', u'search',
u'compare', u'write', u'add', u'delete', u'all'))
API.txt:
option: StrEnum('ipapermright', attribute=True,
cli_name='right',
deprecated_cli_aliases=set(['testalias','permissions']),
multivalue=True, required=False, values=(u'read', u'search',
u'compare', u'write', u'add', u'delete', u'all'))
ipalib/plugins/permission.py:
StrEnum(
'ipapermright*',
cli_name='right',
deprecated_cli_aliases={'permissions','testalias'},
label=_('Granted
rights'),
doc=_('Rights to grant
'
'(read, search, compare, write, add, delete,
all)'),
values=(u'read', u'search',
u'compare',
u'write', u'add', u'delete',
u'all'),
),
don't know if it is a problem anyways
- other tests(cli, webui) works fine for me
- unit tests related to this ran as expected
so besides the multiple deprecated_cli_aliases issue, it's an ACK
Greets
Adam
More information about the Freeipa-devel
mailing list