]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/test_orchestrator: add iscsi
authorMichael Fritch <mfritch@suse.com>
Mon, 15 Jun 2020 20:44:53 +0000 (14:44 -0600)
committerSebastian Wagner <sebastian.wagner@suse.com>
Tue, 14 Jul 2020 09:39:06 +0000 (11:39 +0200)
Signed-off-by: Michael Fritch <mfritch@suse.com>
(cherry picked from commit 37826d41b0bcf755fc9a837c72741542022a019a)

src/pybind/mgr/test_orchestrator/dummy_data.json
src/pybind/mgr/test_orchestrator/module.py

index 85f0d82f410abfefc669d3efe3e7fc322c568d7e..0eaa5af42cd0b7b6857a74cd75607904aae85c74 100644 (file)
         "running": 1,
         "size": 1
       }
+    },
+    {
+      "api_password": "api_password",
+      "api_user": "api_user",
+      "placement": {
+        "hosts": [
+          {
+            "hostname": "mgr0",
+            "name": "",
+            "network": ""
+          },
+          {
+            "hostname": "osd0",
+            "name": "",
+            "network": ""
+          }
+        ]
+      },
+      "pool": "pool",
+      "service_id": "iscsi",
+      "service_name": "iscsi.iscsi",
+      "service_type": "iscsi",
+      "status": {
+        "container_image_id": "36114e38494190b0c9d4b088c12e6e4086e8017b96b4d5fc14eb5406bd51b55b",
+        "container_image_name": "quay.io/ceph-ci/ceph:master",
+        "created": "2020-04-16T03:39:39.512721",
+        "last_refresh": "2020-04-16T06:51:42.412980",
+        "running": 1,
+        "size": 1
+      }
     }
   ],
   "daemons": [
       "status": 1,
       "status_desc": "running",
       "version": "3.2"
+    },
+    {
+      "container_id": "e695cd698d8a",
+      "container_image_id": "36114e38494190b0c9d4b088c12e6e4086e8017b96b4d5fc14eb5406bd51b55b",
+      "container_image_name": "quay.io/ceph-ci/ceph:master",
+      "created": "2020-04-16T05:44:41.551646",
+      "daemon_id": "iscsi.osd0.abc123",
+      "daemon_type": "iscsi",
+      "hostname": "osd0",
+      "last_refresh": "2020-04-16T06:51:43.182937",
+      "started": "2020-04-16T05:44:41.606514",
+      "status": 1,
+      "status_desc": "running",
+      "version": "3.4"
     }
   ]
 }
index 6e566909a4e80b006e478d86105295425b95e6c4..83100ab9a11b06cfb0e72f83e89796ec72fb788c 100644 (file)
@@ -7,7 +7,7 @@ import functools
 import itertools
 from subprocess import check_output, CalledProcessError
 
-from ceph.deployment.service_spec import NFSServiceSpec, ServiceSpec
+from ceph.deployment.service_spec import ServiceSpec, NFSServiceSpec, IscsiServiceSpec
 
 try:
     from typing import Callable, List, Sequence, Tuple
@@ -162,7 +162,7 @@ class TestOrchestrator(MgrModule, orchestrator.Orchestrator):
     def _get_ceph_daemons(self):
         # type: () -> List[orchestrator.DaemonDescription]
         """ Return ceph daemons on the running host."""
-        types = ("mds", "osd", "mon", "rgw", "mgr", "nfs")
+        types = ("mds", "osd", "mon", "rgw", "mgr", "nfs", "iscsi")
         out = map(str, check_output(['ps', 'aux']).splitlines())
         processes = [p for p in out if any(
             [('ceph-{} '.format(t) in p) for t in types])]
@@ -327,6 +327,16 @@ class TestOrchestrator(MgrModule, orchestrator.Orchestrator):
     def apply_nfs(self, spec):
         pass
 
+    @deferred_write("add_iscsi")
+    def add_iscsi(self, spec):
+        # type: (IscsiServiceSpec) -> None
+        pass
+
+    @deferred_write("apply_iscsi")
+    def apply_iscsi(self, spec):
+        # type: (IscsiServiceSpec) -> None
+        pass
+
     @deferred_write("add_mds")
     def add_mds(self, spec):
         pass