]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/orch: add apply grafana to CLI
authorSage Weil <sage@redhat.com>
Tue, 3 Mar 2020 13:26:02 +0000 (07:26 -0600)
committerSage Weil <sage@redhat.com>
Tue, 3 Mar 2020 14:24:46 +0000 (08:24 -0600)
Signed-off-by: Sage Weil <sage@redhat.com>
src/pybind/mgr/orchestrator/module.py

index bcc43f20bd350474d5d10635f3138250f9c4502c..27688033161bb1a3c3faf11f99c56ccb69473420 100644 (file)
@@ -844,6 +844,19 @@ Usage:
         self._orchestrator_wait([completion])
         return HandleCommandResult(stdout=completion.result_str())
 
+    @_cli_write_command(
+        'orch apply grafana',
+        'name=placement,type=CephString,n=N,req=false',
+        'Scale grafana service')
+    def _apply_grafana(self, placement=None):
+        spec = ServiceSpec(
+            'grafana',
+            placement=PlacementSpec.from_strings(placement),
+        )
+        completion = self.apply_grafana(spec)
+        self._orchestrator_wait([completion])
+        return HandleCommandResult(stdout=completion.result_str())
+
     @_cli_write_command(
         'orch apply node-exporter',
         'name=placement,type=CephString,n=N,req=false',