예제 #1
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)
예제 #2
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)
예제 #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)