#NEWLINE# def create_network( self , parameters ) : #NEWLINE# #INDENT# ' Creates a new network in Google Compute Engine with the specified name.\n\n    Args:\n      parameters: A dict with keys for each parameter needed to connect to\n        Google Compute Engine, and an additional key indicating the name of the\n        network that we should create in GCE.\n    Returns:\n      The URL corresponding to the name of the network that was created, for use\n      with binding this network to one or more firewalls.\n    ' #NEWLINE# ( gce_service , credentials ) = self . open_connection ( parameters ) #NEWLINE# http = httplib2 . Http ( ) #NEWLINE# auth_http = credentials . authorize ( http ) #NEWLINE# request = gce_service . networks ( ) . insert ( project = parameters [ self . PARAM_PROJECT ] , body = { #NEWLINE# #INDENT# 'name' : parameters [ self . PARAM_GROUP ] , #NEWLINE# 'description' : 'Network used for AppScale instances' , #NEWLINE# 'IPv4Range' : '10.240.0.0/16' , #NEWLINE# #UNINDENT# } ) #NEWLINE# response = request . execute ( http = auth_http ) #NEWLINE# AppScaleLogger . verbose ( str ( response ) , parameters [ self . PARAM_VERBOSE ] ) #NEWLINE# self . ensure_operation_succeeds ( gce_service , auth_http , response , parameters [ self . PARAM_PROJECT ] ) #NEWLINE# return response [ 'targetLink' ]