예제 #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)
예제 #2
0
파일: vg.py 프로젝트: jsafrane/openlmi-doc
 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)
예제 #3
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)
예제 #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)
예제 #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)
예제 #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'))
예제 #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'))
예제 #8
0
 def execute(self, ns, name, vg, size):
     """
     Implementation of 'thinpool create' command.
     """
     lvm.create_tp(ns, name, vg, str2size(size))
예제 #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))