def __init__(self): super(TricirclePlugin, self).__init__() core_plugins_namespace = 'neutron.core_plugins' plugin_provider = cfg.CONF.tricircle.real_core_plugin plugin_class = utils.load_class_by_alias_or_classname( core_plugins_namespace, plugin_provider) self.core_plugin = plugin_class() self.neutron_handle = resource_handle.NeutronResourceHandle( cfg.CONF.client.auth_url) self.neutron_handle.endpoint_url = \ cfg.CONF.tricircle.central_neutron_url # self.on_trunk_create = {} # self.on_subnet_delete = {} # self.tricircle_handle = resource_handle.NeutronResourceHandle( cfg.CONF.client.auth_url,'1.0') self.tricircle_handle.endpoint_url = \ cfg.CONF.tricircle.tricircle_url for field in (callbacks_resources.NETWORK,callbacks_resources.SUBNET, callbacks_resources.PORT,callbacks_resources.ROUTER): callbacks_registry.subscribe( self.after_resource_create, field, callbacks_events.AFTER_CREATE) callbacks_registry.subscribe( self.after_resource_update, field, callbacks_events.AFTER_UPDATE) callbacks_registry.subscribe( self.after_network_delete, callbacks_resources.NETWORK, callbacks_events.AFTER_DELETE) callbacks_registry.subscribe( self.after_router_delete, callbacks_resources.ROUTER, callbacks_events.AFTER_DELETE) callbacks_registry.subscribe( self.after_subnet_delete, callbacks_resources.SUBNET, callbacks_events.AFTER_DELETE) callbacks_registry.subscribe( self.after_port_delete, callbacks_resources.PORT, callbacks_events.AFTER_DELETE)
def __init__(self): super(TricirclePlugin, self).__init__() core_plugins_namespace = 'neutron.core_plugins' plugin_provider = cfg.CONF.tricircle.real_core_plugin plugin_class = utils.load_class_by_alias_or_classname( core_plugins_namespace, plugin_provider) self.core_plugin = plugin_class() self.neutron_handle = resource_handle.NeutronResourceHandle( cfg.CONF.client.auth_url) self.neutron_handle.endpoint_url = \ cfg.CONF.tricircle.central_neutron_url
def __init__(self): super(TricirclePlugin, self).__init__() core_plugins_namespace = 'neutron.core_plugins' plugin_provider = cfg.CONF.tricircle.real_core_plugin plugin_class = runtime.load_class_by_alias_or_classname( core_plugins_namespace, plugin_provider) self.core_plugin = plugin_class() self.neutron_handle = resource_handle.NeutronResourceHandle( cfg.CONF.client.auth_url) self.neutron_handle.endpoint_url = \ cfg.CONF.tricircle.central_neutron_url self.on_trunk_create = {} self.on_subnet_delete = {} neutronclient.USER_AGENT = t_constants.LOCAL