<s> import abc <EOL> import six <EOL> ID = '<STR_LIT:id>' <EOL> NETWORK_TYPE = '<STR_LIT>' <EOL> PHYSICAL_NETWORK = '<STR_LIT>' <EOL> SEGMENTATION_ID = '<STR_LIT>' <EOL> MTU = '<STR_LIT>' <EOL> BOUND_DRIVER = '<STR_LIT>' <EOL> BOUND_SEGMENT = '<STR_LIT>' <EOL> @ six . add_metaclass ( abc . ABCMeta ) <EOL> class TypeDriver ( object ) : <EOL> """<STR_LIT>""" <EOL> @ abc . abstractmethod <EOL> def get_type ( self ) : <EOL> """<STR_LIT>""" <EOL> pass <EOL> @ abc . abstractmethod <EOL> def initialize ( self ) : <EOL> """<STR_LIT>""" <EOL> pass <EOL> @ abc . abstractmethod <EOL> def is_partial_segment ( self , segment ) : <EOL> """<STR_LIT>""" <EOL> @ abc . abstractmethod <EOL> def validate_provider_segment ( self , segment ) : <EOL> """<STR_LIT>""" <EOL> pass <EOL> @ abc . abstractmethod <EOL> def reserve_provider_segment ( self , session , segment ) : <EOL> """<STR_LIT>""" <EOL> pass <EOL> @ abc . abstractmethod <EOL> def allocate_tenant_segment ( self , session ) : <EOL> """<STR_LIT>""" <EOL> pass <EOL> @ abc . abstractmethod <EOL> def release_segment ( self , session , segment ) : <EOL> """<STR_LIT>""" <EOL> pass <EOL> @ abc . abstractmethod <EOL> def get_mtu ( self , physical ) : <EOL> """<STR_LIT>""" <EOL> pass <EOL> @ six . add_metaclass ( abc . ABCMeta ) <EOL> class NetworkContext ( object ) : <EOL> """<STR_LIT>""" <EOL> @ abc . abstractproperty <EOL> def current ( self ) : <EOL> """<STR_LIT>""" <EOL> pass <EOL> @ abc . abstractproperty <EOL> def original ( self ) : <EOL> """<STR_LIT>""" <EOL> pass <EOL> @ abc . abstractproperty <EOL> def network_segments ( self ) : <EOL> """<STR_LIT>""" <EOL> pass <EOL> @ six . add_metaclass ( abc . ABCMeta ) <EOL> class SubnetContext ( object ) : <EOL> """<STR_LIT>""" <EOL> @ abc . abstractproperty <EOL> def current ( self ) : <EOL> """<STR_LIT>""" <EOL> pass <EOL> @ abc . abstractproperty <EOL> def original ( self ) : <EOL> """<STR_LIT>""" <EOL> pass <EOL> @ six . add_metaclass ( abc . ABCMeta ) <EOL> class PortContext ( object ) : <EOL> """<STR_LIT>""" <EOL> @ abc . abstractproperty <EOL> def current ( self ) : <EOL> """<STR_LIT>""" <EOL> pass <EOL> @ abc . abstractproperty <EOL> def original ( self ) : <EOL> """<STR_LIT>""" <EOL> pass <EOL> @ abc . abstractproperty <EOL> def status ( self ) : <EOL> """<STR_LIT>""" <EOL> pass <EOL> @ abc . abstractproperty <EOL> def original_status ( self ) : <EOL> """<STR_LIT>""" <EOL> pass <EOL> @ abc . abstractproperty <EOL> def network ( self ) : <EOL> """<STR_LIT>""" <EOL> pass <EOL> @ abc . abstractproperty <EOL> def binding_levels ( self ) : <EOL> """<STR_LIT>""" <EOL> pass <EOL> @ abc . abstractproperty <EOL> def original_binding_levels ( self ) : <EOL> """<STR_LIT>""" <EOL> pass <EOL> @ abc . abstractproperty <EOL> def top_bound_segment ( self ) : <EOL> """<STR_LIT>""" <EOL> pass <EOL> @ abc . abstractproperty <EOL> def original_top_bound_segment ( self ) : <EOL> """<STR_LIT>""" <EOL> pass <EOL> @ abc . abstractproperty <EOL> def bottom_bound_segment ( self ) : <EOL> """<STR_LIT>""" <EOL> pass <EOL> @ abc . abstractproperty <EOL> def original_bottom_bound_segment ( self ) : <EOL> """<STR_LIT>""" <EOL> pass <EOL> @ abc . abstractproperty <EOL> def host ( self ) : <EOL> """<STR_LIT>""" <EOL> pass <EOL> @ abc . abstractproperty <EOL> def original_host ( self ) : <EOL> """<STR_LIT>""" <EOL> pass <EOL> @ abc . abstractproperty <EOL> def vif_type ( self ) : <EOL> """<STR_LIT>""" <EOL> pass <EOL> @ abc . abstractproperty <EOL> def original_vif_type ( self ) : <EOL> """<STR_LIT>""" <EOL> pass <EOL> @ abc . abstractproperty <EOL> def vif_details ( self ) : <EOL> """<STR_LIT>""" <EOL> pass <EOL> @ abc . abstractproperty <EOL> def original_vif_details ( self ) : <EOL> """<STR_LIT>""" <EOL> pass <EOL> @ abc . abstractproperty <EOL> def segments_to_bind ( self ) : <EOL> """<STR_LIT>""" <EOL> pass <EOL> @ abc . abstractmethod <EOL> def host_agents ( self , agent_type ) : <EOL> """<STR_LIT>""" <EOL> pass <EOL> @ abc . abstractmethod <EOL> def set_binding ( self , segment_id , vif_type , vif_details , <EOL> status = None ) : <EOL> """<STR_LIT>""" <EOL> pass <EOL> @ abc . abstractmethod <EOL> def continue_binding ( self , segment_id , next_segments_to_bind ) : <EOL> """<STR_LIT>""" <EOL> pass <EOL> @ abc . abstractmethod <EOL> def allocate_dynamic_segment ( self , segment ) : <EOL> """<STR_LIT>""" <EOL> pass <EOL> @ abc . abstractmethod <EOL> def release_dynamic_segment ( self , segment_id ) : <EOL> """<STR_LIT>""" <EOL> pass <EOL> @ six . add_metaclass ( abc . ABCMeta ) <EOL> class MechanismDriver ( object ) : <EOL> """<STR_LIT>""" <EOL> @ abc . abstractmethod <EOL> def initialize ( self ) : <EOL> """<STR_LIT>""" <EOL> pass <EOL> def create_network_precommit ( self , context ) : <EOL> """<STR_LIT>""" <EOL> pass <EOL> def create_network_postcommit ( self , context ) : <EOL> """<STR_LIT>""" <EOL> pass <EOL> def update_network_precommit ( self , context ) : <EOL> """<STR_LIT>""" <EOL> pass <EOL> def update_network_postcommit ( self , context ) : <EOL> """<STR_LIT>""" <EOL> pass <EOL> def delete_network_precommit ( self , context ) : <EOL> """<STR_LIT>""" <EOL> pass <EOL> def delete_network_postcommit ( self , context ) : <EOL> """<STR_LIT>""" <EOL> pass <EOL> def create_subnet_precommit ( self , context ) : <EOL> """<STR_LIT>""" <EOL> pass <EOL> def create_subnet_postcommit ( self , context ) : <EOL> """<STR_LIT>""" <EOL> pass <EOL> def update_subnet_precommit ( self , context ) : <EOL> """<STR_LIT>""" <EOL> pass <EOL> def update_subnet_postcommit ( self , context ) : <EOL> """<STR_LIT>""" <EOL> pass <EOL> def delete_subnet_precommit ( self , context ) : <EOL> """<STR_LIT>""" <EOL> pass <EOL> def delete_subnet_postcommit ( self , context ) : <EOL> """<STR_LIT>""" <EOL> pass <EOL> def create_port_precommit ( self , context ) : <EOL> """<STR_LIT>""" <EOL> pass <EOL> def create_port_postcommit ( self , context ) : <EOL> """<STR_LIT>""" <EOL> pass <EOL> def update_port_precommit ( self , context ) : <EOL> """<STR_LIT>""" <EOL> pass <EOL> def update_port_postcommit ( self , context ) : <EOL> """<STR_LIT>""" <EOL> pass <EOL> def delete_port_precommit ( self , context ) : <EOL> """<STR_LIT>""" <EOL> pass <EOL> def delete_port_postcommit ( self , context ) : <EOL> """<STR_LIT>""" <EOL> pass <EOL> def bind_port ( self , context ) : <EOL> """<STR_LIT>""" <EOL> pass <EOL> @ property <EOL> def _supports_port_binding ( self ) : <EOL> return self . __class__ . bind_port != MechanismDriver . bind_port <EOL> def check_vlan_transparency ( self , context ) : <EOL> """<STR_LIT>""" <EOL> pass <EOL> def get_workers ( self ) : <EOL> """<STR_LIT>""" <EOL> return ( ) <EOL> @ classmethod <EOL> def is_host_filtering_supported ( cls ) : <EOL> return ( cls . filter_hosts_with_segment_access != <EOL> MechanismDriver . filter_hosts_with_segment_access ) <EOL> def filter_hosts_with_segment_access ( <EOL> self , context , segments , candidate_hosts , agent_getter ) : <EOL> """<STR_LIT>""" <EOL> return candidate_hosts <EOL> @ six . add_metaclass ( abc . ABCMeta ) <EOL> class ExtensionDriver ( object ) : <EOL> """<STR_LIT>""" <EOL> @ abc . abstractmethod <EOL> def initialize ( self ) : <EOL> """<STR_LIT>""" <EOL> pass <EOL> @ property <EOL> def extension_alias ( self ) : <EOL> """<STR_LIT>""" <EOL> pass <EOL> def process_create_network ( self , plugin_context , data , result ) : <EOL> """<STR_LIT>""" <EOL> pass <EOL> def process_create_subnet ( self , plugin_context , data , result ) : <EOL> """<STR_LIT>""" <EOL> pass <EOL> def process_create_port ( self , plugin_context , data , result ) : <EOL> """<STR_LIT>""" <EOL> pass <EOL> def process_update_network ( self , plugin_context , data , result ) : <EOL> """<STR_LIT>""" <EOL> pass <EOL> def process_update_subnet ( self , plugin_context , data , result ) : <EOL> """<STR_LIT>""" <EOL> pass <EOL> def process_update_port ( self , plugin_context , data , result ) : <EOL> """<STR_LIT>""" <EOL> pass <EOL> def extend_network_dict ( self , session , base_model , result ) : <EOL> """<STR_LIT>""" <EOL> pass <EOL> def extend_subnet_dict ( self , session , base_model , result ) : <EOL> """<STR_LIT>""" <EOL> pass <EOL> def extend_port_dict ( self , session , base_model , result ) : <EOL> """<STR_LIT>""" <EOL> pass </s>
