[Pki-devel] [PATCH] misc fixes for Profile REST API and CLI
Ade Lee
alee at redhat.com
Wed Jul 31 19:54:47 UTC 2013
Revised patch with more fixes ..
Ade
On Wed, 2013-07-31 at 13:42 -0400, Ade Lee wrote:
> Fixed in attached patch. Apply on top of previous patches.
> (137 and 138).
>
> Ade
>
> On Tue, 2013-07-30 at 10:37 -0500, Endi Sukma Dewata wrote:
> > On 7/29/2013 12:16 PM, Ade Lee wrote:
> > > Fix various issues with Profile Interface
> > >
> > > 1. Fixed REST API as per review.
> > > 2. Add output for profile-show and profile-find
> > >
> > > Please review,
> > > Ade
> >
> > Some comments:
> >
> > 1. The URL in profile-show output is missing a '/rest':
> >
> > https://hostname:8443/ca/profiles/caManualRenewal
> >
> > 2. When calling profile-show as an agent/admin, the visibleOnly in
> > retrieveProfile() is set to true, so it fails showing invisible profiles.
> >
> > if (visibleOnly && !profile.isVisible()) {
> > throw new ProfileNotFoundException(profileId);
> > }
> >
> > The visibleOnly should be set to true by default, and set to false if
> > it's an privileged user, same thing as in listProfiles().
> >
> > 3. The output labels can be simplified up a little bit:
> >
> > Profile ID: ...
> > Name: ...
> > Description: ...
> >
> > 4. There is a double space between "Profile ID:" and the value.
> >
> > 5. In general the profile URL is not needed by CLI users. It may only be
> > useful for advanced users so it doesn't need to be displayed by default.
> > In user-find the user URL will only appear in verbose mode.
> >
> > 6. This line probably can be removed since the profile ID is already
> > displayed earlier.
> >
> > Profile Inputs: <profile ID>
> >
> > 7. The inputs probably can be simplified as follows:
> >
> > Input ID: i1
> > Name: Serial Number of Certificate to Renew
> > Class: serialNumRenewInputImpl
> > Attribute Name: serial_num
> > Attribute Description: Serial Number of Certificate to Renew
> > Attribute Syntax: string
> >
> > If there are multiple inputs they can be separated by blank lines. Same
> > thing for outputs and policy sets.
> >
> > Another possibility is to use separate commands such as
> > profile-input-find/show/add/del to manage the inputs.
> >
> > 8. In the XML output the profile element can be simplified as follows:
> >
> > <Profile id="caManualRenewal">
> > ...
> > </Profile>
> >
> > "Profile" is more user-friendly than "ProfileData".
> >
> > 9. The input element can also be simplified as follows:
> >
> > <Input id="i1">
> > <attribute name="...">
> > </attribute>
> > </Input>
> >
> > 10. The unused code in createProfileDataInfo() can be removed.
> >
>
> _______________________________________________
> Pki-devel mailing list
> Pki-devel at redhat.com
> https://www.redhat.com/mailman/listinfo/pki-devel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pki-vakwetu-0139-1-Fixes-for-profile-REST-interface-from-code-review.patch
Type: text/x-patch
Size: 22499 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/pki-devel/attachments/20130731/6b30b2de/attachment.bin>
More information about the Pki-devel
mailing list