@error.context_aware
def vg_create(vg_name, pv_list, force=False):
 error.context(("Creating volume group '%s' by using '%s'" % (vg_name, pv_list)), logging.info)
 if vg_check(vg_name):
  raise error.TestError(("Volume group '%s' already exist" % vg_name))
 if force:
  cmd = 'vgcreate -f'
 else:
  cmd = 'vgcreate'
 cmd += (' %s %s' % (vg_name, pv_list))
 result = utils.run(cmd)
 logging.info(result.stdout.rstrip())

@ error . context_aware def vg_create ( vg_name , pv_list , force = False ) : error . context ( ( "Creating volume group '%s' by using '%s'" % ( vg_name , pv_list ) ) , logging . info ) if vg_check ( vg_name ) : raise error . TestError ( ( "Volume group '%s' already exist" % vg_name ) ) if force : cmd = 'vgcreate -f' else : cmd = 'vgcreate' cmd += ( ' %s %s' % ( vg_name , pv_list ) ) result = utils . run ( cmd ) logging . info ( result . stdout . rstrip ( ) )
create a volume group by using the block special devices .