Module Import alias Import alias ImportFrom alias ImportFrom alias identifier ImportFrom alias Import alias ImportFrom alias ImportFrom alias identifier Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore ListLoad Call AttributeLoad NameLoad attr Str keyword Call NameLoad Str Call AttributeLoad NameLoad attr Str keyword Call NameLoad Str Call AttributeLoad NameLoad attr Str keyword NameLoad keyword Call NameLoad Str Call AttributeLoad NameLoad attr Str keyword Num keyword Call NameLoad Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str ClassDef bases AttributeLoad NameLoad attr body Expr Str Assign NameStore NameLoad FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Assign AttributeStore NameLoad attr AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Assign AttributeStore NameLoad attr AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Assign AttributeStore NameLoad attr AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Call AttributeLoad NameLoad attr Str Str NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Call AttributeLoad NameLoad attr Str Str NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Call AttributeLoad NameLoad attr Str Str NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Call AttributeLoad NameLoad attr Str Str NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Call AttributeLoad NameLoad attr Str Str NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Call AttributeLoad NameLoad attr Str Str NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Call AttributeLoad NameLoad attr Str Str NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Call AttributeLoad NameLoad attr Str Str NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Call AttributeLoad NameLoad attr Str Str NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Expr Str If AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr NameLoad orelse Expr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad For NameStore NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad Assign NameStore Dict Str Dict Str Str Str NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Str Str NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Expr Str Assign AttributeStore NameLoad attr NameLoad Assign NameStore AttributeLoad NameLoad attr Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index Str Assign NameStore BinOpAdd BinOpAdd NameLoad Str NameLoad If CompareEq NameLoad Str body Expr Call AttributeLoad NameLoad attr Str NameLoad NameLoad orelse Assert BoolOpOr CompareEq NameLoad Str CompareEq NameLoad Str If CompareEq NameLoad Str body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Str NameLoad Dict Str NameLoad orelse If CompareEq NameLoad Str body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Str NameLoad Dict Str NameLoad orelse Assert CompareEq NameLoad Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Str NameLoad Dict Str NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Expr Str Assign NameStore ListComp Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad comprehension NameStore SubscriptLoad NameLoad Index Str Assign SubscriptStore NameLoad Index Str NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Dict Str Str If CompareIs NameLoad NameLoad body Assign NameStore NameLoad orelse Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword Num Assign NameStore NameLoad If BoolOpAnd AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Assign NameStore TupleLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr If AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad Str attr ListLoad AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If Call NameLoad NameLoad NameLoad body Assign NameStore Call NameLoad GeneratorExp TupleLoad Call AttributeLoad NameLoad attr NameLoad Call AttributeLoad NameLoad attr NameLoad comprehension TupleStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad If Call NameLoad NameLoad NameLoad body Assign NameStore ListComp Call AttributeLoad NameLoad attr NameLoad comprehension NameStore NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Return Call AttributeLoad NameLoad attr Str Str NameLoad decorator_list decorator_list
N/A N/A re N/A six oslo_config cfg oslo_log log logging oslo_serialization jsonutils N/A requests networking_cisco._i18n _ neutron.plugins.ml2 driver_api api N/A LOG N/A N/A logging getLogger __name__ N/A ncs_opts N/A N/A N/A cfg StrOpt url help N/A _ HTTP URL of Tail-f NCS REST interface. N/A N/A cfg StrOpt username help N/A _ HTTP username for authentication N/A N/A cfg StrOpt password secret True help N/A _ HTTP password for authentication N/A N/A cfg IntOpt timeout default 10 help N/A _ HTTP timeout in seconds. N/A N/A N/A N/A cfg CONF register_opts ncs_opts ml2_ncs NCSMechanismDriver N/A N/A api MechanismDriver N/A N/A Mechanism Driver for Tail-f Network Control System (NCS).

    This driver makes portions of the Neutron database available for
    service provisioning in NCS. For example, NCS can use this
    information to provision physical switches and routers in response
    to OpenStack configuration changes.

    The database is replicated from Neutron to NCS using HTTP and JSON.

    The driver has two states: out-of-sync (initially) and in-sync.

    In the out-of-sync state each driver event triggers an attempt
    to synchronize the complete database. On success the driver
    transitions to the in-sync state.

    In the in-sync state each driver event triggers synchronization
    of one network or port. On success the driver stays in-sync and
    on failure it transitions to the out-of-sync state.
     N/A out_of_sync True initialize N/A N/A self N/A N/A N/A N/A self url N/A N/A N/A cfg CONF ml2_ncs url N/A N/A self timeout N/A N/A N/A cfg CONF ml2_ncs timeout N/A N/A self username N/A N/A N/A cfg CONF ml2_ncs username N/A N/A self password N/A N/A N/A cfg CONF ml2_ncs password N/A create_network_postcommit N/A N/A self context N/A N/A N/A N/A N/A self synchronize create network context N/A update_network_postcommit N/A N/A self context N/A N/A N/A N/A N/A self synchronize update network context N/A delete_network_postcommit N/A N/A self context N/A N/A N/A N/A N/A self synchronize delete network context N/A create_subnet_postcommit N/A N/A self context N/A N/A N/A N/A N/A self synchronize create subnet context N/A update_subnet_postcommit N/A N/A self context N/A N/A N/A N/A N/A self synchronize update subnet context N/A delete_subnet_postcommit N/A N/A self context N/A N/A N/A N/A N/A self synchronize delete subnet context N/A create_port_postcommit N/A N/A self context N/A N/A N/A N/A N/A self synchronize create port context N/A update_port_postcommit N/A N/A self context N/A N/A N/A N/A N/A self synchronize update port context N/A delete_port_postcommit N/A N/A self context N/A N/A N/A N/A N/A self synchronize delete port context N/A synchronize N/A N/A self operation object_type context N/A N/A N/A Synchronize NCS with Neutron following a configuration change. N/A N/A self out_of_sync N/A N/A N/A N/A self sync_full context N/A N/A N/A N/A self sync_object operation object_type context N/A sync_full N/A N/A self context N/A N/A N/A Resync the entire database to NCS.
        Transition to the in-sync state on success.
         N/A dbcontext N/A context _plugin_context N/A networks N/A N/A N/A context _plugin get_networks dbcontext N/A subnets N/A N/A N/A context _plugin get_subnets dbcontext N/A ports N/A N/A N/A context _plugin get_ports dbcontext N/A port ports N/A N/A N/A N/A self add_security_groups context dbcontext port N/A json N/A openstack N/A network subnet port networks subnets ports N/A N/A N/A self sendjson put json N/A N/A self out_of_sync False N/A sync_object N/A N/A self operation object_type context N/A N/A N/A Synchronize the single modified record to NCS.
        Transition to the out-of-sync state on failure.
         N/A N/A self out_of_sync True N/A dbcontext N/A context _plugin_context N/A id N/A N/A context current N/A id N/A urlpath N/A N/A object_type / id N/A N/A operation delete N/A N/A N/A N/A self sendjson delete urlpath None N/A N/A N/A N/A operation create N/A operation update N/A N/A object_type network N/A N/A network N/A N/A N/A context _plugin get_network dbcontext id N/A N/A N/A self sendjson put urlpath N/A network network N/A N/A N/A object_type subnet N/A N/A subnet N/A N/A N/A context _plugin get_subnet dbcontext id N/A N/A N/A self sendjson put urlpath N/A subnet subnet N/A N/A N/A object_type port N/A port N/A N/A N/A context _plugin get_port dbcontext id N/A N/A N/A self add_security_groups context dbcontext port N/A N/A N/A self sendjson put urlpath N/A port port N/A N/A self out_of_sync False N/A add_security_groups N/A N/A self context dbcontext port N/A N/A N/A Populate the 'security_groups' field with entire records. N/A groups N/A N/A N/A N/A context _plugin get_security_group dbcontext sg N/A sg N/A port N/A security_groups N/A N/A port N/A security_groups groups N/A sendjson N/A N/A self method urlpath obj N/A N/A N/A obj N/A N/A self escape_keys obj N/A headers N/A Content-Type application/vnd.yang.data+json N/A N/A obj None N/A N/A data None N/A N/A data N/A N/A jsonutils dumps obj indent 2 N/A auth None N/A N/A N/A self username N/A self password N/A N/A auth N/A N/A self username N/A self password N/A N/A self url N/A N/A url N/A N/A / join N/A N/A self url urlpath N/A r N/A N/A requests request method url url headers headers data data auth auth timeout N/A self timeout N/A N/A N/A r raise_for_status N/A escape_keys N/A N/A self obj N/A N/A N/A Escape JSON keys to be NCS compatible.
        NCS does not allow period (.) or colon (:) characters.
         N/A N/A isinstance obj dict N/A N/A obj N/A dict N/A N/A N/A N/A self escape k N/A N/A self escape_keys v N/A N/A k v N/A N/A six iteritems obj N/A N/A isinstance obj list N/A N/A obj N/A N/A N/A self escape_keys x N/A x obj N/A obj N/A escape N/A N/A self string N/A N/A N/A N/A N/A re sub [:._] - string N/A N/A