<s> from neutron_lib import exceptions as exc <EOL> from oslo_log import log <EOL> import six <EOL> from neutron . _i18n import _ , _LI <EOL> from neutron . plugins . common import constants as p_const <EOL> from neutron . plugins . ml2 import driver_api as api <EOL> LOG = log . getLogger ( __name__ ) <EOL> class LocalTypeDriver ( api . TypeDriver ) : <EOL> """<STR_LIT>""" <EOL> def __init__ ( self ) : <EOL> LOG . info ( _LI ( "<STR_LIT>" ) ) <EOL> def get_type ( self ) : <EOL> return p_const . TYPE_LOCAL <EOL> def initialize ( self ) : <EOL> pass <EOL> def is_partial_segment ( self , segment ) : <EOL> return False <EOL> def validate_provider_segment ( self , segment ) : <EOL> for key , value in six . iteritems ( segment ) : <EOL> if value and key != api . NETWORK_TYPE : <EOL> msg = _ ( "<STR_LIT>" ) % key <EOL> raise exc . InvalidInput ( error_message = msg ) <EOL> def reserve_provider_segment ( self , session , segment ) : <EOL> return segment <EOL> def allocate_tenant_segment ( self , session ) : <EOL> return { api . NETWORK_TYPE : p_const . TYPE_LOCAL } <EOL> def release_segment ( self , session , segment ) : <EOL> pass <EOL> def get_mtu ( self , physical_network = None ) : <EOL> pass </s>
