22 |
class PartSpec(object): |
class PartSpec(object): |
23 |
def __init__(self, mountpoint=None, fstype=None, size=None, maxSize=None, |
def __init__(self, mountpoint=None, fstype=None, size=None, maxSize=None, |
24 |
grow=False, asVol=False, singlePV=False, weight=0, |
grow=False, asVol=False, singlePV=False, weight=0, |
25 |
requiredSpace=0): |
requiredSpace=0, useRAID=False): |
26 |
""" Create a new storage specification. These are used to specify |
""" Create a new storage specification. These are used to specify |
27 |
the default partitioning layout as an object before we have the |
the default partitioning layout as an object before we have the |
28 |
storage system up and running. The attributes are obvious |
storage system up and running. The attributes are obvious |
45 |
other LVs are created inside it. If not enough |
other LVs are created inside it. If not enough |
46 |
space exists, this PartSpec will never get turned |
space exists, this PartSpec will never get turned |
47 |
into an LV. |
into an LV. |
48 |
|
useRAID -- Should a RAID1 array be created for this volume? If |
49 |
|
not, it will be allocated as a partition. |
50 |
""" |
""" |
51 |
|
|
52 |
self.mountpoint = mountpoint |
self.mountpoint = mountpoint |
58 |
self.singlePV = singlePV |
self.singlePV = singlePV |
59 |
self.weight = weight |
self.weight = weight |
60 |
self.requiredSpace = requiredSpace |
self.requiredSpace = requiredSpace |
61 |
|
self.useRAID = useRAID |
62 |
|
|
63 |
if self.singlePV and not self.asVol: |
if self.singlePV and not self.asVol: |
64 |
self.asVol = True |
self.asVol = True |