LGTM, thanks
On Tue, Aug 6, 2013 at 2:53 PM, Thomas Thrainer <[email protected]> wrote: > Also print the VCS version in the output of `gnt-cluster version`. This > makes the VCS version also available over RAPI, etc. > > Signed-off-by: Thomas Thrainer <[email protected]> > --- > lib/client/gnt_cluster.py | 1 + > lib/cmdlib/cluster.py | 1 + > lib/query.py | 2 ++ > src/Ganeti/Query/Server.hs | 1 + > 4 files changed, 5 insertions(+) > > diff --git a/lib/client/gnt_cluster.py b/lib/client/gnt_cluster.py > index a6d3d01..e70361b 100644 > --- a/lib/client/gnt_cluster.py > +++ b/lib/client/gnt_cluster.py > @@ -351,6 +351,7 @@ def ShowClusterVersion(opts, args): > ToStdout("Configuration format: %s", result["config_version"]) > ToStdout("OS api version: %s", result["os_api_version"]) > ToStdout("Export interface: %s", result["export_version"]) > + ToStdout("VCS version: %s", result["vcs_version"]) > return 0 > > > diff --git a/lib/cmdlib/cluster.py b/lib/cmdlib/cluster.py > index 658407b..d3c5aae 100644 > --- a/lib/cmdlib/cluster.py > +++ b/lib/cmdlib/cluster.py > @@ -291,6 +291,7 @@ class LUClusterQuery(NoHooksLU): > "config_version": constants.CONFIG_VERSION, > "os_api_version": max(constants.OS_API_VERSIONS), > "export_version": constants.EXPORT_VERSION, > + "vcs_version": constants.VCS_VERSION, > "architecture": runtime.GetArchInfo(), > "name": cluster.cluster_name, > "master": cluster.master_node, > diff --git a/lib/query.py b/lib/query.py > index 1516372..9bf5983 100644 > --- a/lib/query.py > +++ b/lib/query.py > @@ -2549,6 +2549,8 @@ _CLUSTER_VERSION_FIELDS = { > "API version for OS template scripts"), > "export_version": ("ExportVersion", QFT_NUMBER, > constants.EXPORT_VERSION, > "Import/export file format version"), > + "vcs_version": ("VCSVersion", QFT_TEXT, constants.VCS_VERSION, > + "VCS version"), > } > > > diff --git a/src/Ganeti/Query/Server.hs b/src/Ganeti/Query/Server.hs > index 3839715..ef2f6b5 100644 > --- a/src/Ganeti/Query/Server.hs > +++ b/src/Ganeti/Query/Server.hs > @@ -96,6 +96,7 @@ handleCall cdata QueryClusterInfo = > , ("config_version", showJSON C.configVersion) > , ("os_api_version", showJSON $ maximum C.osApiVersions) > , ("export_version", showJSON C.exportVersion) > + , ("vcs_version", showJSON C.vcsVersion) > , ("architecture", showJSON arch_tuple) > , ("name", showJSON $ clusterClusterName cluster) > , ("master", showJSON $ clusterMasterNode cluster) > -- > 1.8.3 > >
