def execute(self, ns, name, devices, _extent_size=None): """ Implementation of 'vg create' command. """ if _extent_size: _extent_size = str2size(_extent_size) lvm.create_vg(ns, devices, name, _extent_size)
def execute(self, ns, device, size=None, _extended=None, _logical=None): """ Implementation of 'partition create' command. """ device = str2device(ns, device) size = str2size(size) ptype = None if _extended: ptype = partition.PARTITION_TYPE_EXTENDED elif _logical: ptype = partition.PARTITION_TYPE_LOGICAL p = partition.create_partition(ns, device, size, ptype) print "Partition %s, with DeviceID %s created." % (p.Name, p.DeviceID)
def execute(self, ns, device, size=None, _extended=None, _logical=None): """ Implementation of 'partition create' command. """ device = str2device(ns, device) if size: size = str2size(size) ptype = None if _extended: ptype = partition.PARTITION_TYPE_EXTENDED elif _logical: ptype = partition.PARTITION_TYPE_LOGICAL partition.create_partition(ns, device, size, ptype)
def execute(self, ns, vg, name, size): """ Implementation of 'lv create' command. """ vg = str2vg(ns, vg[0]) lvm.create_lv(ns, vg, name, str2size(size, vg.ExtentSize, 'E'))
def execute(self, ns, name, vg, size): """ Implementation of 'thinpool create' command. """ lvm.create_tp(ns, name, vg, str2size(size))
def execute(self, ns, tp, name, size): """ Implementation of 'thinlv create' command. """ tp = str2vg(ns, tp[0]) lvm.create_tlv(ns, tp, name, str2size(size))