示例#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)
 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)