diff --git a/tempest/api/volume/admin/test_volumes_backup.py b/tempest/api/volume/admin/test_volumes_backup.py
index 0399413..ed34a9b 100644
--- a/tempest/api/volume/admin/test_volumes_backup.py
+++ b/tempest/api/volume/admin/test_volumes_backup.py
@@ -48,7 +48,7 @@
         # Create backup
         backup_name = data_utils.rand_name('Backup')
         create_backup = self.backups_adm_client.create_backup
-        backup = create_backup(self.volume['id'],
+        backup = create_backup(volume_id=self.volume['id'],
                                name=backup_name)['backup']
         self.addCleanup(self.backups_adm_client.delete_backup,
                         backup['id'])
@@ -85,9 +85,8 @@
     def test_volume_backup_export_import(self):
         # Create backup
         backup_name = data_utils.rand_name('Backup')
-        backup = (self.backups_adm_client.create_backup(self.volume['id'],
-                                                        name=backup_name)
-                  ['backup'])
+        backup = (self.backups_adm_client.create_backup(
+            volume_id=self.volume['id'], name=backup_name)['backup'])
         self.addCleanup(self._delete_backup, backup['id'])
         self.assertEqual(backup_name, backup['name'])
         self.backups_adm_client.wait_for_backup_status(backup['id'],
diff --git a/tempest/services/volume/base/base_backups_client.py b/tempest/services/volume/base/base_backups_client.py
index be926e6..fc9a40a 100644
--- a/tempest/services/volume/base/base_backups_client.py
+++ b/tempest/services/volume/base/base_backups_client.py
@@ -25,26 +25,17 @@
 class BaseBackupsClient(service_client.ServiceClient):
     """Client class to send CRUD Volume backup API requests"""
 
-    def create_backup(self, volume_id, container=None, name=None,
-                      description=None):
+    def create_backup(self, **kwargs):
         """Creates a backup of volume."""
-        post_body = {'volume_id': volume_id}
-        if container:
-            post_body['container'] = container
-        if name:
-            post_body['name'] = name
-        if description:
-            post_body['description'] = description
-        post_body = json.dumps({'backup': post_body})
+        post_body = json.dumps({'backup': kwargs})
         resp, body = self.post('backups', post_body)
         body = json.loads(body)
         self.expected_success(202, resp.status)
         return service_client.ResponseBody(resp, body)
 
-    def restore_backup(self, backup_id, volume_id=None):
+    def restore_backup(self, backup_id, **kwargs):
         """Restore volume from backup."""
-        post_body = {'volume_id': volume_id}
-        post_body = json.dumps({'restore': post_body})
+        post_body = json.dumps({'restore': kwargs})
         resp, body = self.post('backups/%s/restore' % (backup_id), post_body)
         body = json.loads(body)
         self.expected_success(202, resp.status)
@@ -82,11 +73,9 @@
         self.expected_success(200, resp.status)
         return service_client.ResponseBody(resp, body)
 
-    def import_backup(self, backup_service, backup_url):
+    def import_backup(self, **kwargs):
         """Import backup metadata record."""
-        post_body = {'backup_service': backup_service,
-                     'backup_url': backup_url}
-        post_body = json.dumps({'backup-record': post_body})
+        post_body = json.dumps({'backup-record': kwargs})
         resp, body = self.post("backups/import_record", post_body)
         body = json.loads(body)
         self.expected_success(201, resp.status)
