#NEWLINE# def get_network_attach_config_spec( client_factory , vif_info , index ) : #NEWLINE# #INDENT# 'Builds the vif attach config spec.' #NEWLINE# config_spec = client_factory . create ( 'ns0:VirtualMachineConfigSpec' ) #NEWLINE# vif_spec = _create_vif_spec ( client_factory , vif_info ) #NEWLINE# config_spec . deviceChange = [ config_spec ] #NEWLINE# if ( vif_info [ 'iface_id' ] is not None ) : #NEWLINE# #INDENT# config_spec . extraConfig = [ _iface_id_option_value ( client_factory , vif_info [ 'iface_id' ] , index ) ] #NEWLINE# #UNINDENT# return config_spec