]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
pybind: Avoid type error in crush rule (str, not an int) 4677/head
authorjepst <jepst79@gmail.com>
Wed, 10 Dec 2014 14:17:56 +0000 (09:17 -0500)
committerKefu Chai <kchai@redhat.com>
Thu, 14 May 2015 02:12:06 +0000 (10:12 +0800)
* Make crush_rule parameter an int in create_pool

Signed-off-by: Jeff Epstein <jeff.epstein@commerceguys.com>
Signed-off-by: Kefu Chai <kchai@redhat.com>
src/pybind/rados.py

index de2c1f71de93915a02b6188a9f56fb77b9da4162..2a9d17cd6494197b16bdd16a4552c0a1343bfd7c 100644 (file)
@@ -584,7 +584,7 @@ Rados object in state %s." % self.state)
                 return c_name.value
                 break
 
-    @requires(('pool_name', str), ('auid', opt(int)), ('crush_rule', opt(str)))
+    @requires(('pool_name', str), ('auid', opt(int)), ('crush_rule', opt(int)))
     def create_pool(self, pool_name, auid=None, crush_rule=None):
         """
         Create a pool:
@@ -598,7 +598,7 @@ Rados object in state %s." % self.state)
         :param auid: the id of the owner of the new pool
         :type auid: int
         :param crush_rule: rule to use for placement in the new pool
-        :type crush_rule: str
+        :type crush_rule: int
 
         :raises: :class:`TypeError`, :class:`Error`
         """