def mklabel(device, label_type):
 if (label_type not in set(['aix', 'amiga', 'bsd', 'dvh', 'gpt', 'loop', 'mac', 'msdos', 'pc98', 'sun'])):
  raise CommandExecutionError('Invalid label_type passed to partition.mklabel')
 cmd = ('parted', '-m', '-s', device, 'mklabel', label_type)
 out = __salt__['cmd.run'](cmd, python_shell=False).splitlines()
 return out

def mklabel ( device , label_type ) : if ( label_type not in set ( [ 'aix' , 'amiga' , 'bsd' , 'dvh' , 'gpt' , 'loop' , 'mac' , 'msdos' , 'pc98' , 'sun' ] ) ) : raise CommandExecutionError ( 'Invalid label_type passed to partition.mklabel' ) cmd = ( 'parted' , '-m' , '-s' , device , 'mklabel' , label_type ) out = __salt__ [ 'cmd.run' ] ( cmd , python_shell = False ) . splitlines ( ) return out
create a new disklabel of label_type .