]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
mgr/dashboard: pass a list of drive_group to create_osds
authorKefu Chai <kchai@redhat.com>
Fri, 31 Jan 2020 15:42:49 +0000 (23:42 +0800)
committerKefu Chai <kchai@redhat.com>
Fri, 31 Jan 2020 15:57:38 +0000 (23:57 +0800)
as orchestrator backends expect a list of drive_groups.

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/pybind/mgr/dashboard/services/orchestrator.py
src/pybind/mgr/orchestrator.py

index 6b6309f50e3d704f9e1af68c9a47f3ecd1c1d20f..c60e32cec691ae401eee1b54792034c679aee35b 100644 (file)
@@ -95,7 +95,7 @@ class OsdManager(ResourceManager):
 
     @wait_api_result
     def create(self, drive_group):
-        return self.api.create_osds(drive_group)
+        return self.api.create_osds([drive_group])
 
 
 class OrchClient(object):
index 0335b56a8c6d7cd9ef696bf8e0f6beb37690a881..410d5946a585f4b035c5d17459f28d0321435af4 100644 (file)
@@ -872,7 +872,7 @@ class Orchestrator(object):
         #assert not (service_name and service_id)
         raise NotImplementedError()
 
-    def create_osds(self, drive_group):
+    def create_osds(self, drive_groups):
         # type: (DriveGroupSpec) -> Completion
         """
         Create one or more OSDs within a single Drive Group.
@@ -882,7 +882,7 @@ class Orchestrator(object):
         finer-grained OSD feature enablement (choice of backing store,
         compression/encryption, etc).
 
-        :param drive_group: DriveGroupSpec
+        :param drive_groups: a list of DriveGroupSpec
         :param all_hosts: TODO, this is required because the orchestrator methods are not composable
                 Probably this parameter can be easily removed because each orchestrator can use
                 the "get_inventory" method and the "drive_group.host_pattern" attribute