-# Copyright (c) 2011 Red Hat, Inc.
-#
-# Licensed under the Apache License, Version 2.0 (the "License"); you may
-# not use this file except in compliance with the License. You may obtain
-# a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-# License for the specific language governing permissions and limitations
-# under the License.
self.TEST_MNT_POINT_BASE)
def test_get_mount_point_base(self):
- (mox, drv) = self._mox, self._driver
+ drv = self._driver
self.assertEqual(drv._get_mount_point_base(),
self.TEST_MNT_POINT_BASE)
self.driver.do_setup(None)
self.driver.create_volume(MANAGED_VOLUME)
existing_ref = {'source-name': MANAGED_VOLUME['name']}
- has_volume = self.driver.manage_existing(
- VOLUME,
- existing_ref)
+ self.driver.manage_existing(VOLUME, existing_ref)
self.assertEqual(VOLUME['size'], MANAGED_VOLUME['size'])
# cover both case, whether driver renames the volume or not
def execute_cmd(cmd=None):
proc = subprocess.Popen(cmd, stdout=subprocess.PIPE,
stderr=subprocess.STDOUT, shell=True)
- output = proc.communicate()[0]
+ proc.communicate()[0]
self.assertEqual(0, proc.returncode)
for key, engine in self.engines.items():
reservations = sqlalchemy.Table('reservations',
metadata,
autoload=True)
- index_colums = []
+ index_columns = []
for idx in reservations.indexes:
if idx.name == 'reservations_deleted_expire_idx':
index_columns = idx.columns.keys()
for line in lines:
if 'evs' in line and 'admin' not in line:
inf = line.split()
- (evsnum, evsname, ip) = (inf[1], inf[2], inf[3])
+ (evsnum, ip) = (inf[1], inf[3])
newout += "CTL: %s Port: 0 IP: %s Port: 3260 Link: Up\n" \
% (evsnum, ip)
continue
if 'GB' in line or 'TB' in line:
inf = line.split()
- (fsid, fslabel, evsnum, capacity, used, perstr) = \
- (inf[0], inf[1], inf[2], inf[3], inf[5], inf[7])
+ (fsid, fslabel, capacity, used, perstr) = \
+ (inf[0], inf[1], inf[3], inf[5], inf[7])
(availunit, usedunit) = (inf[4], inf[6])
if usedunit == 'GB':
usedmultiplier = units.Ki
for line in lines:
if 'Export' in line:
inf = line.split()
- (export, path, fslabel, hdp, evs, ip1) = \
- inf[1], inf[3], inf[5], inf[7], inf[9], inf[11]
+ (export, path, fslabel, hdp, ip1) = \
+ inf[1], inf[3], inf[5], inf[7], inf[11]
# 9, 10, etc are IP addrs
key = ip1 + ':' + export
conf[key] = {}
# F841,H302,H305,H307,H405
-ignore = E251,E265,F402,F841,H104,H302,H305,H307,H402,H405,H803,H904
+ignore = E251,E265,F402,H302,H305,H307,H402,H405,H803,H904
builtins = _
exclude = .git,.venv,.tox,dist,tools,doc,common,*egg,build