On Fri, Sep 27, 2013 at 12:02 PM, Spyros Trigazis <[email protected]>wrote:
> Add MonD's latest HTTP API version in lib/constants.py. > Instead of just writing the same message as in the patch title, it's better to add some more details. Like, in this case: "Extract the version number from MonD's own file into the constants file, so that it can be accessed from other parts of the system as well (e.g.: to perform queries over the MonD protocol)." Don't resend the patch, though. I'll update the message myself before pushing it. > Signed-off-by: Spyros Trigazis <[email protected]> > --- > lib/constants.py | 3 +++ > src/Ganeti/Monitoring/Server.hs | 2 +- > 2 files changed, 4 insertions(+), 1 deletion(-) > > diff --git a/lib/constants.py b/lib/constants.py > index 218e937..6e79f85 100644 > --- a/lib/constants.py > +++ b/lib/constants.py > @@ -2257,6 +2257,9 @@ CPUAVGLOAD_WINDOW_SIZE = 600 > # Mond's variable for periodical data collection > MOND_TIME_INTERVAL = _constants.MOND_TIME_INTERVAL > > +# MonD's latest API version > +MOND_LATEST_API_VERSION = 1 > + > # Do not re-export imported modules > del re, _vcsversion, _constants, socket, pathutils, compat > > diff --git a/src/Ganeti/Monitoring/Server.hs > b/src/Ganeti/Monitoring/Server.hs > index d30c7d1..59968d2 100644 > --- a/src/Ganeti/Monitoring/Server.hs > +++ b/src/Ganeti/Monitoring/Server.hs > @@ -63,7 +63,7 @@ type PrepResult = Config Snap () > > -- | Version of the latest supported http API. > latestAPIVersion :: Int > -latestAPIVersion = 1 > +latestAPIVersion = C.mondLatestApiVersion > > -- | A report of a data collector might be stateful or stateless. > data Report = StatelessR (IO DCReport) > -- > 1.7.10.4 > > LGTM, thanks. Michele -- Google Germany GmbH Dienerstr. 12 80331 München Registergericht und -nummer: Hamburg, HRB 86891 Sitz der Gesellschaft: Hamburg Geschäftsführer: Graham Law, Christine Elizabeth Flores
