~ubuntu-branches/ubuntu/saucy/nova/saucy-proposed

« back to all changes in this revision

Viewing changes to nova/virt/libvirt/utils.py

  • Committer: Package Import Robot
  • Author(s): Chuck Short
  • Date: 2012-09-07 17:49:53 UTC
  • mto: This revision was merged to the branch mainline in revision 86.
  • Revision ID: package-import@ubuntu.com-20120907174953-awo1mmr0kalgb40d
Tags: upstream-2012.2~rc1~20120907.15996
ImportĀ upstreamĀ versionĀ 2012.2~rc1~20120907.15996

Show diffs side-by-side

added added

removed removed

Lines of Context:
138
138
    return int(out.strip())
139
139
 
140
140
 
 
141
def list_logical_volumes(vg):
 
142
    """List logical volumes paths for given volume group.
 
143
 
 
144
    :param vg: volume group name
 
145
    """
 
146
    out, err = execute('lvs', '--noheadings', '-o', 'lv_path', vg,
 
147
                       run_as_root=True)
 
148
 
 
149
    return [line.strip() for line in out.splitlines()]
 
150
 
 
151
 
141
152
def remove_logical_volumes(*paths):
142
153
    """Remove one or more logical volume."""
143
154
    if paths: