Esempio n. 1
0
 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)
Esempio n. 2
0
 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)
Esempio n. 4
0
 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)
Esempio n. 5
0
 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)
Esempio n. 6
0
 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'))
Esempio n. 7
0
 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'))
Esempio n. 8
0
 def execute(self, ns, name, vg, size):
     """
     Implementation of 'thinpool create' command.
     """
     lvm.create_tp(ns, name, vg, str2size(size))
Esempio n. 9
0
 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))