* 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
We should not try to access the data, or decode it as JSON if the
request failed, because in that case the data will not be JSON and
we will get errors from the decoder.
Change-Id: Ibe663992a0487284d79e100b36392534fcbe88db
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 now initialize the user agent on construction, not on every request,
so the verbose mode needs to be setup there too. And it needs to support
both setting it up and tearing it down.
Change-Id: Ifa176522302db118f1702ee3b1c7ccd6b7cfabad
Fixes: commit 155873d532
We need to track whether we are within the current iterator by using an
additional variable.
Ideally we'd use a proper iterator object that is independent from the
object state, but this should do for now and fixes the regression.
Change-Id: Icc8d06f55277f49ef67fbd023fd53daa22962bce
Fixes: commit 155873d532
When moving to per-object options, we switched to set the page rows
directly from the constructor, and switched from the _rows to
_opts.page_rows.
Change-Id: Ia663dbba4a330813d67f6bbdbb50ad37419ad5d5
Fixes: commit 97c0fb6412
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
The former will properly parse query strings separated by «?», the
latter will escape the «?» which will break the query arguments.
Change-Id: I29f4916a54f3d49bd5d8b7a2d0a998d57977e1dd
Update copyright years and change license to match the one declared in
debian/copyright, and the other perl programs in the repo.
Change-Id: I8d2cb1d38f267bea8c4f399ce4b921a260e2e862
We should not consider a missing configuration file a fatal problem,
now that we have defaults for almost every configuration setting,
and can override them at constructor time.
Change-Id: I371498e9d75e81c4c759012ec38b44d050bdea8f
We might want to use different values in the constructor, instead
of the ones coming from the configuration file or the global defauls.
Change-Id: Ifc9e3d762cf46a036bffb8073cd3c41a42589510
When we are just using the defaults and there's been no authentication
configured, we should just not use any authentication.
This makes it possible to use the code with no config file.
Change-Id: I9b23cd5ac806f6a56456d70175f9bdfcb436b62c