]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
qa: Add removexattr to support setfattr removal.
authorChristopher Hoffman <choffman@redhat.com>
Thu, 22 Feb 2024 16:54:44 +0000 (16:54 +0000)
committerChristopher Hoffman <choffman@redhat.com>
Wed, 29 May 2024 13:43:32 +0000 (13:43 +0000)
Signed-off-by: Christopher Hoffman <choffman@redhat.com>
qa/tasks/cephfs/mount.py

index 61d8d5cb3da67782b3015bc44a2dd0b3a4622b52..d2829a0c99aa9eac4568c7f1cd0a8cd061a90835 100644 (file)
@@ -1560,6 +1560,20 @@ class CephFSMountBase(object):
             # gives you [''] instead of []
             return []
 
+    def removexattr(self, path, key, **kwargs):
+        """
+        Wrap setfattr removal.
+
+        :param path: relative to mount point
+        :param key: xattr name
+        :return: None
+        """
+        kwargs['args'] = ["setfattr", "-x", key, path]
+        if kwargs.pop('sudo', False):
+            kwargs['args'].insert(0, 'sudo')
+            kwargs['omit_sudo'] = False
+        self.run_shell(**kwargs)
+
     def setfattr(self, path, key, val, **kwargs):
         """
         Wrap setfattr.