The prevalent convention in the project is to use «-» instead of «_» to
split words in options. Switch the options to that, and keep backwards
compatibility option alias that emits a deprecation warning while people
transition to the new names. The alias will be removed on the next LTS.
Change-Id: I5dd702f68cbc548a027ba57a5bff1716944cf159
* supports --pbx_pilot option, has no effect if the customer
is non-pbx
* add support to check option aliases
* change cc,ac,sn options to be strings, to address possible
sn=000 scenarios
Change-Id: I1942120db04781ea70f3b72d22391f31cf4910bb
Just setup the object at construction time instead of changing it after
the fact, as we know off-hand what state it should be in. Use the new
constructor call form.
Change-Id: I5f7655eb083137b2af522038373cb7562fd7d14b
Make main() return a normal value, and let the call site act on it,
which in most cases implies doing an exit. This unifies the behavior
and gets rid of dead-code.
Change-Id: Id83284a95423b0d0e866d99f83bf546989054d76
There is no call that will pass such text as an argument, we only ever
pass the stringized list of missing parameters.
Change-Id: I1a9e2b05c59854c227685d53d9476c36086e38a9
The GetOptions() function will pass «$opt_name, $opt_value» to the
function refs in the options spec, which means that the usage()
function will consider that a missing parameters message and print
"help" as being a missing required parameter.
Use an anonymous function to wrap the usage() call and avoid the
unexpected arguments.
Change-Id: I5c10b241da23ccb7aa25a13dd5ebc1b4188b7370
We should only be printing relevant sections, not the entire man page,
which is rather verbose, and provides information not appropriate for a
--help output.
We use verbose level 1, for the commands that just have SYNOPSIS and
OPTIONS sections, and leave verbose level 99, but specify the relevant
sections which are 'SYNOPSIS|REQUIRED ARGUMENTS|OPTIONS'.
Change-Id: I59d1999599d553c396e60e183592c00e93d1a1db
We should not be outputting the usage() text when we get a run-time
error, as these are unrelated and depend on the state of the server,
not on how it was called.
Change-Id: I996d52cf2e4f4a834a281f8d85ea7571f61cf2e4
* Fixed the POST data to correctly
build the primary number hash in
the ngcp-create-subscriber script
Change-Id: I03e2e5270d5f93d518d889584a3657b9ca1b64c3
Names with underscores are more difficult to type. Use the prevalent
style of dashes as separators.
Add backwards compatibility symlinks to avoid breakage.
Change-Id: If6afcb1df4908ff6888afa3d9b2082eee4d3ed7d