Add client metadata and docs
diff --git a/gerrit/meta/sphinx.yml b/gerrit/meta/sphinx.yml
index f3ce10a..2d93205 100644
--- a/gerrit/meta/sphinx.yml
+++ b/gerrit/meta/sphinx.yml
@@ -1,12 +1,28 @@
-{%- from "gerrit/map.jinja" import server with context %}
-# Fill in documentation details
doc:
- name: gerrit
- description: Some service info
+ name: Gerrit
+ description: Gerrit provides web based code review and repository management for the Git version control system.
role:
+ {%- if pillar.gerrit.server is defined %}
server:
name: server
+ param: {}
+ {%- endif %}
+ {%- if pillar.gerrit.client is defined %}
+ {% from "gerrit/map.jinja" import client with context %}
+ client:
+ name: client
param:
- some_param:
- name: "Some name"
- value: "some value"
+ server:
+ value: "{{ client.server.user }}@{{ client.server.host }}:{{ client.server.http_port }} (ssh_port: {{ client.server.ssh_port }})"
+ {%- if client.get('project', {}) %}
+ projects:
+ value: {{ client.project.keys()|yaml }}
+ {%- endif %}
+ {%- if client.get('user', {}) %}
+ users:
+ value:
+ {%- for name, user in client.user.iteritems() %}
+ - "{{ name }} ({{ user.fullname }})"
+ {%- endfor %}
+ {%- endif %}
+ {%- endif %}
diff --git a/metadata/service/client.yml b/metadata/service/client.yml
new file mode 100644
index 0000000..5c4810f
--- /dev/null
+++ b/metadata/service/client.yml
@@ -0,0 +1,8 @@
+applications:
+- gerrit
+classes:
+ - service.gerrit.support
+parameters:
+ gerrit:
+ client:
+ enabled: True