Server/op5Monitor: Print duration in human-readable format

Since we get duration as "timestamp since last change", we need
to massage it a bit so humans can read it.

This patch modifies the unix timestamp to the format of
  Aw Bd Ch Dm Es
where A=weeks, B=days(24 hours, really), C=hours, D=minutes and
E=seconds.

Signed-off-by: Andreas Ericsson <ae@op5.se>
Server/op5Monitor: Submit commands via API

We don't support the CGI's anymore, so we have to submit commands
via our API. Fortunately, that's quite pleasant, so we end up
removing more code than we add, which is a Good Thing(tm).

Signed-off-by: Andreas Ericsson <ae@op5.se>
Server/op5Monitor: Submit timestamps as integers to recheck command

The op5 Monitor API will barf if it receives floating point values
where it expects integers, so we must make sure to cast the python
time types to int.

Signed-off-by: Andreas Ericsson <ae@op5.se>
Server/op5Monitor: Avoid syntax errors when scheduling downtime

The previous code was just plain wrong, so we borrow one
function (get_start_end()) from the Multisite driver instead,
as that one seems to work just fine. In order to make sure we
still pass timestamps to the API, we convert the human-readable
values back to timestamps in the _set_downtime() method.

Signed-off-by: Andreas Ericsson <ae@op5.se>
Server/op5Monitor: Avoid sending 'author' as a parameter to API

The API requires authentication (in some form or other), so it
will always take the "author" parameter from the logged in user
instead of as a user-controlled variable. This patch removes the
offending parameters from the commands that had them, allowing
the API to stop moping and start doing some work instead.

Signed-off-by: Andreas Ericsson <ae@op5.se>
Merge pull request #1 from ageric/dev/monitor_api

Dev/monitor api