]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/rook: Remove unused 'current' argument from update_func method
authorVarsha Rao <varao@redhat.com>
Wed, 28 Oct 2020 14:38:03 +0000 (20:08 +0530)
committerVarsha Rao <varao@redhat.com>
Tue, 3 Nov 2020 06:41:34 +0000 (12:11 +0530)
Signed-off-by: Varsha Rao <varao@redhat.com>
src/pybind/mgr/rook/rook_cluster.py

index 6ee1c7d6d47e2a622ffaccd8d197bc67706420a4..953b707da0db5f25ae7fcbb69278ad990a863cba 100644 (file)
@@ -389,8 +389,8 @@ class RookCluster(object):
         # TODO use spec.placement
         # TODO warn if spec.extended has entries we don't kow how
         #      to action.
-        def _update_fs(current, new):
-            # type: (cfs.CephFilesystem, cfs.CephFilesystem) -> cfs.CephFilesystem
+        def _update_fs(new):
+            # type: (cfs.CephFilesystem) -> cfs.CephFilesystem
             new.spec.metadataServer.activeCount = spec.placement.count or 1
             return new
 
@@ -447,7 +447,7 @@ class RookCluster(object):
                 )
             )
 
-        def _update_zone(current, new):
+        def _update_zone(new):
             new.spec.gateway.instances = spec.placement.count or 1
             return new
 
@@ -625,10 +625,9 @@ class RookCluster(object):
                 raise
 
         if current_json:
-            current = crd.from_json(current_json)
             new = crd.from_json(current_json)  # no deepcopy.
 
-            new = update_func(current, new)
+            new = update_func(new)
 
             patch = list(jsonpatch.make_patch(current_json, new.to_json()))