[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [Pki-devel] [PATCH] misc fixes for Profile REST API and CLI

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,

Some comments:

1. The URL in profile-show output is missing a '/rest':


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" is more user-friendly than "ProfileData".

9. The input element can also be simplified as follows:

  <Input id="i1">
    <attribute name="...">

10. The unused code in createProfileDataInfo() can be removed.

Endi S. Dewata

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]