]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Pylint fixes for GlusterFS driver
authorEric Harney <eharney@redhat.com>
Mon, 16 Dec 2013 22:44:02 +0000 (17:44 -0500)
committerEric Harney <eharney@redhat.com>
Mon, 16 Dec 2013 22:44:02 +0000 (17:44 -0500)
Remove unused 're' import
Remove unused parameter for _create_snapshot()

Change-Id: I40411b6206d282ae07c905faa44dcccecb45c120

cinder/volume/drivers/glusterfs.py

index bf2a49ad85e4f30301a0f41a9e7f1642249fc9e1..0cc82afe8f356a9af9e8df5451842067705f37ca 100644 (file)
@@ -19,7 +19,6 @@ import errno
 import hashlib
 import json
 import os
-import re
 import stat
 import tempfile
 import time
@@ -453,8 +452,7 @@ class GlusterfsDriver(nfs.RemoteFsDriver):
         LOG.debug(_('volume id: %s') % snapshot['volume_id'])
 
         path_to_disk = self._local_path_volume(snapshot['volume'])
-        snap_id = snapshot['id']
-        self._create_snapshot(snapshot, path_to_disk, snap_id)
+        self._create_snapshot(snapshot, path_to_disk)
 
     def _create_qcow2_snap_file(self, snapshot, backing_filename,
                                 new_snap_path):
@@ -483,7 +481,7 @@ class GlusterfsDriver(nfs.RemoteFsDriver):
                    new_snap_path]
         self._execute(*command, run_as_root=True)
 
-    def _create_snapshot(self, snapshot, path_to_disk, snap_id):
+    def _create_snapshot(self, snapshot, path_to_disk):
         """Create snapshot (offline case)."""
 
         # Requires volume status = 'available'