#NEWLINE# def __init__( self , * args , **kwargs ) : #NEWLINE# #INDENT# super ( AssociateIPAction , self ) . __init__ ( * args , ** kwargs ) #NEWLINE# if api . base . is_service_enabled ( self . request , 'network' ) : #NEWLINE# #INDENT# label = _ ( 'Port to be associated' ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# label = _ ( 'Instance to be associated' ) #NEWLINE# #UNINDENT# self . fields [ 'instance_id' ] . label = label #NEWLINE# q_instance_id = self . request . GET . get ( 'instance_id' ) #NEWLINE# if q_instance_id : #NEWLINE# #INDENT# target_id = api . network . floating_ip_target_get_by_instance ( self . request , q_instance_id ) #NEWLINE# self . initial [ 'instance_id' ] = target_id