#NEWLINE# def create_enet_networks( self , prefix , vid_start , vid_count , bw = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } ) : #NEWLINE# #INDENT# enet_list = [ ] #NEWLINE# try : #NEWLINE# #INDENT# for vid in range ( vid_start , ( vid_start + vid_count ) ) : #NEWLINE# #INDENT# enet_name = ( '%s%s' % ( prefix , vid ) ) #NEWLINE# enet_list . append ( self . create_enet_network ( enet_name , vid , bw = bw ) ) #NEWLINE# #UNINDENT# #UNINDENT# except http . client . HTTPException : #NEWLINE# #INDENT# for enet in enet_list : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# self . _con . delete ( enet [ 'uri' ] ) #NEWLINE# #UNINDENT# except http . client . HTTPException : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# #UNINDENT# raise HPOneViewException ( 'Could not create one or more networks' ) #NEWLINE# #UNINDENT# return enet_list