Skip to content
This repository was archived by the owner on Apr 30, 2021. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
*.py[co]
*.egg-info
setup.cfg
/build/
/dist/
17 changes: 17 additions & 0 deletions .project
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>lvcache</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.python.pydev.PyDevBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.python.pydev.pythonNature</nature>
</natures>
</projectDescription>
8 changes: 8 additions & 0 deletions .pydevproject
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?eclipse-pydev version="1.0"?><pydev_project>
<pydev_pathproperty name="org.python.pydev.PROJECT_SOURCE_PATH">
<path>/${PROJECT_DIR_NAME}</path>
</pydev_pathproperty>
<pydev_property name="org.python.pydev.PYTHON_PROJECT_VERSION">python interpreter</pydev_property>
<pydev_property name="org.python.pydev.PYTHON_PROJECT_INTERPRETER">Default</pydev_property>
</pydev_project>
2 changes: 1 addition & 1 deletion lvcache/cmd_create.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@


def adjust_512(num):
return 512 * (num/512)
return 512 * int(num/512)


class Create(Command):
Expand Down
4 changes: 2 additions & 2 deletions lvcache/lvm.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ def cache_status(self):

status = dict(zip(cache_status_fields,
status.strip().split()[:len(cache_status_fields)]))
for k in status.keys():
for k in list(status.keys()):
if status[k].isdigit():
status[k] = int(status[k])
elif '/' in status[k]:
Expand All @@ -111,7 +111,7 @@ def remove_cache_pool(self):
self.log.info(line.strip())

def attach_cache_pool(self, cache_lv):
lvconvert('--type', 'cache',
lvconvert('--yes', '--type', 'cache',
'--cachepool', '%s/%s' % (cache_lv.vg.name,
cache_lv.name),
'%s/%s' % (self.vg.name, self.name))
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

setup(
name='lvcache',
version='1.0.1',
version='1.0.2',
description='Wrapper for creating cached LVM logical volumes',
author='Lars Kellogg-Stedman',
author_email='lars@oddbit.com',
Expand Down