TT#158350 Enhance information on ngcp-provisioning-template help

Currently, the command ngcp-provisioning-template --help provides (among others) the following information:

(a) Help information about --first_name=first-name

Provide the value for a form field "first_name" (if you have such in your provisioning template). Only relevant if no --file is specified.

I think the description is confusing, since it makes the reader understand that the --first_name option is a fixed argument. However, the number of arguments to be provided rely on the input variables defined in the batch provisioning template. Hence, more than one attribute name can be provided as argument (e.g. --first_name=John --last_name=Doe --cc=43 --ac=1 --sn=2521523)

My suggestion is changing the current description to:

--[input-attribute-name]=[attribute-value]

Description: Provide an input attribute name and its value, as defined within the 'fields' tag in the provisioning template (Attribute must not be internal, i.e. 'calculated' type).

(b) Help information about 'ngcp-provisioning-template' usage

Usage:
    ngcp-provisioning-template provisioning-template-name [options]
    ngcp-provisioning-template reseller-name/provisioning-template-name
    [options]

It may be confusing for an Administrator:
- In which cases the command syntax above should be used?
- 'provisioning-template-name' is a string which can contain spaces, hence the commands above should have the double quotes to ensure proper command execution.

My change suggestion:

Usage:

For templates defined in config.yml file:
   ngcp-provisioning-template "provisioning-template-name" [options]

For templates defined in database:
  ngcp-provisioning-template "reseller-name/provisioning-template-name" [options]

(c) Help option about CSV filename

--file=.csv-filename

If the file is local to where the command is executed: Is it mandatory to specify the dot at the beginning of the CSV filename?
I tested it with or without the dot, and the file is properly considered on both cases. Hence, I would suggest editing the description to just --file=csv-filename.

Change-Id: Id08f02900453ca7269d69e7521af099e4b4ca79d
mr10.4
Javier Rodriguez 4 years ago
parent 1be9e7fc88
commit 58c86414ef

@ -346,9 +346,13 @@ ngcp-provisioning-template - Create subscribers with detailed settings according
=head1 SYNOPSIS
B<ngcp-provisioning-template> I<provisioning-template-name> [I<options>]
For templates defined in config.yml file:
B<ngcp-provisioning-template> I<reseller-name>B</>I<provisioning-template-name> [I<options>]
E<9>B<ngcp-provisioning-template> "I<provisioning-template-name>" [I<options>]
For templates defined in database:
E<9>B<ngcp-provisioning-template> "I<reseller-name>B</>I<provisioning-template-name>" [I<options>]
=head1 DESCRIPTION
@ -383,14 +387,13 @@ Only relevant if B<--db-host> is specified.
The database user password (if any) for the ngcp database to connect to.
Only relevant if B<--db-host> is specified.
=item B<--file=>I<.csv-filename>
=item B<--file=>I<csv-filename>
Specify a .csv file to process. Each row represents form values for one subscriber to create.
=item B<--first-name=>I<first-name>
=item B<--[input-attribute-name]=>I<[attribute-value]>
Provide the value for a form field "first_name" (if you have such in your
provisioning template). Only relevant if no --file is specified.
Provide an input attribute name and its value, as defined within the 'fields' tag in the provisioning template (Attribute must not be internal, i.e. 'calculated' type). Only relevant if no --file is specified.
=item B<--purge>

Loading…
Cancel
Save