#NEWLINE# def execute( self , service , shared_data ) : #NEWLINE# #INDENT# if CONF . mtu_use_dhcp_config : #NEWLINE# #INDENT# osutils = osutils_factory . get_os_utils ( ) #NEWLINE# dhcp_hosts = osutils . get_dhcp_hosts_in_use ( ) #NEWLINE# for ( mac_address , dhcp_host ) in dhcp_hosts : #NEWLINE# #INDENT# options_data = dhcp . get_dhcp_options ( dhcp_host , [ dhcp . OPTION_MTU ] ) #NEWLINE# if options_data : #NEWLINE# #INDENT# mtu_option_data = options_data . get ( dhcp . OPTION_MTU ) #NEWLINE# if mtu_option_data : #NEWLINE# #INDENT# mtu = struct . unpack ( '!H' , mtu_option_data ) [ 0 ] #NEWLINE# osutils . set_network_adapter_mtu ( mac_address , mtu ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# LOG . debug ( ( 'Could not obtain the MTU configuration via DHCP for interface "%s"' % mac_address ) ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# return ( base . PLUGIN_EXECUTE_ON_NEXT_BOOT , False )