]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
mgr/orch: test remove_daemons and remove_service
authorSage Weil <sage@redhat.com>
Tue, 11 Feb 2020 16:40:46 +0000 (10:40 -0600)
committerSage Weil <sage@redhat.com>
Thu, 13 Feb 2020 13:13:02 +0000 (07:13 -0600)
Signed-off-by: Sage Weil <sage@redhat.com>
src/pybind/mgr/cephadm/tests/test_cephadm.py
src/pybind/mgr/test_orchestrator/module.py

index 9b53e701881d38bccf3e91066f902d7ff52e37bc..f555cbf6205aaa5cdd0632e739f7a6c9f571e483 100644 (file)
@@ -151,7 +151,7 @@ class TestCephadm(object):
         with self._with_host(cephadm_module, 'test'):
             c = cephadm_module.list_daemons(refresh=True)
             wait(cephadm_module, c)
-            c = cephadm_module.remove_osds(['0'])
+            c = cephadm_module.remove_daemons(['osd.0'])
             out = wait(cephadm_module, c)
             assert out == ["Removed osd.0 from host 'test'"]
 
@@ -253,11 +253,11 @@ class TestCephadm(object):
             )
         ])
     ))
-    def test_remove_rgw(self, cephadm_module):
+    def test_remove_service(self, cephadm_module):
         with self._with_host(cephadm_module, 'test'):
             c = cephadm_module.list_daemons(refresh=True)
             wait(cephadm_module, c)
-            c = cephadm_module.remove_rgw('myrgw')
+            c = cephadm_module.remove_service('rgw', 'myrgw')
             out = wait(cephadm_module, c)
             assert out == ["Removed rgw.myrgw.foobar from host 'test'"]
 
index 9957573ef980f8dfba7b21fd34135cf40ac33801..4dcd847eb912502dade4c98575184c4780715afc 100644 (file)
@@ -212,9 +212,14 @@ class TestOrchestrator(MgrModule, orchestrator.Orchestrator):
         )
 
 
-    @deferred_write("remove_osds")
-    def remove_osds(self, osd_ids, destroy=False):
-        assert isinstance(osd_ids, list)
+    @deferred_write("remove_daemons")
+    def remove_daemons(self, names):
+        assert isinstance(names, list)
+
+    @deferred_write("remove_service")
+    def remove_service(self, service_type, service_name):
+        assert isinstance(service_type, str)
+        assert isinstance(service_name, str)
 
     @deferred_write("blink_device_light")
     def blink_device_light(self, ident_fault, on, locations):
@@ -231,10 +236,6 @@ class TestOrchestrator(MgrModule, orchestrator.Orchestrator):
         # type: (orchestrator.NFSServiceSpec) -> None
         assert isinstance(spec.pool, str)
 
-    @deferred_write("remove_nfs")
-    def remove_nfs(self, name):
-        pass
-
     @deferred_write("update_nfs")
     def update_nfs(self, spec):
         pass
@@ -243,19 +244,10 @@ class TestOrchestrator(MgrModule, orchestrator.Orchestrator):
     def add_mds(self, spec):
         pass
 
-    @deferred_write("remove_mds")
-    def remove_mds(self, name):
-        pass
-
     @deferred_write("add_rgw")
     def add_rgw(self, spec):
         pass
 
-    @deferred_write("remove_rgw")
-    def remove_rgw(self, zone):
-        pass
-
-
     @deferred_read
     def get_hosts(self):
         if self._inventory: