#NEWLINE# def __init__( self , name , port_id , vnic_type , profile , network_context ) : #NEWLINE# #INDENT# self . _port = { #NEWLINE# #INDENT# 'status' : None , #NEWLINE# 'id' : port_id , #NEWLINE# 'name' : port_id , #NEWLINE# 'device_owner' : n_const . DEVICE_OWNER_DHCP , #NEWLINE# portbindings . HOST_ID : HOST1 , #NEWLINE# portbindings . VNIC_TYPE : vnic_type , #NEWLINE# portbindings . PROFILE : profile , #NEWLINE# #UNINDENT# } #NEWLINE# self . _network = network_context #NEWLINE# self . _segment = network_context . network_segments [ 0 ] #NEWLINE# self . session = db_api . get_session ( )