Verbose version output, provide noteDb and index versions
Extend the "version" program, the "version" SSH command and the
/config/server/version REST API to optionally provide verbose output
which, in addition to the Gerrit version, provides the NoteDb version
and the version of each index.
Example for the SSH command:
$ ssh <gerrit> version
gerrit version 3.8.0-335-g711a875804-dirty
$ ssh <gerrit> version --verbose
gerrit version 3.8.0-335-g711a875804-dirty
NoteDb version 185
Index versions
changes 83
accounts 13
projects 6
groups 10
Release-Notes: Add verbose version output
Change-Id: Ic6021df637df57d6e903c3520df77f67ec6aac70
diff --git a/Documentation/rest-api-config.txt b/Documentation/rest-api-config.txt
index fe9b13c..a347d6c 100644
--- a/Documentation/rest-api-config.txt
+++ b/Documentation/rest-api-config.txt
@@ -30,6 +30,32 @@
"2.7"
----
+The `verbose` option can be used to provide a verbose version output as
+link:#version-info[VersionInfo].
+
+.Request
+----
+ GET /config/server/version?verbose HTTP/1.0
+----
+
+.Response
+----
+ HTTP/1.1 200 OK
+ Content-Type: application/json; charset=UTF-8
+
+ )]}'
+ {
+ "gerrit_version": "3.8.0",
+ "note_db_version": 185,
+ "change_index_version": 83,
+ "account_index_version": 13,
+ "project_index_version": 6,
+ "group_index_version": 10
+ }
+----
+
+
+
[[get-info]]
=== Get Server Info
--
@@ -1968,6 +1994,22 @@
details.
|=======================================
+[[version-info]]
+=== VersionInfo
+The `VersionInfo` entity contains information about the version of the
+Gerrit server.
+
+[options="header",cols="1,^1,5"]
+|=======================================
+|Field Name ||Description
+|`gerrit_version` ||Gerrit server version
+|`note_db_version` ||NoteDb version
+|`change_index_version` ||Change index version
+|`account_index_version` ||Account index version
+|`project_index_version` ||Project index version
+|`group_index_version` ||Group index version
+|=======================================
+
[[server-info]]
=== ServerInfo
The `ServerInfo` entity contains information about the configuration of