def get_resources(cls): """Returns Ext Resources.""" exts = [] plugin = directory.get_plugin() for resource_name in ['security_group', 'security_group_rule']: collection_name = resource_name.replace('_', '-') + "s" params = RESOURCE_ATTRIBUTE_MAP.get(resource_name + "s", dict()) resource_registry.register_resource_by_name(resource_name) controller = base.create_resource(collection_name, resource_name, plugin, params, allow_bulk=True, allow_pagination=True, allow_sorting=True) ex = extensions.ResourceExtension(collection_name, controller, attr_map=params) exts.append(ex) return exts
def test_resource_extension_with_custom_member_action_and_attr_map(self): controller = self.ResourceExtensionController() member = {'custom_member_action': "GET"} params = { 'tweedles': { 'id': {'allow_post': False, 'allow_put': False, 'validate': {'type:uuid': None}, 'is_visible': True}, 'name': {'allow_post': True, 'allow_put': True, 'validate': {'type:string': None}, 'default': '', 'is_visible': True}, } } res_ext = extensions.ResourceExtension('tweedles', controller, member_actions=member, attr_map=params) test_app = _setup_extensions_test_app(SimpleExtensionManager(res_ext)) response = test_app.get("/tweedles/some_id/custom_member_action") self.assertEqual(200, response.status_int) self.assertEqual(jsonutils.loads(response.body)['member_action'], "value")
def get_resources(cls): """Returns Ext Resources.""" my_plurals = [(key, key[:-1]) for key in RESOURCE_ATTRIBUTE_MAP.keys()] attr.PLURALS.update(dict(my_plurals)) exts = [] plugin = manager.NeutronManager.get_plugin() for resource_name in ['security_group', 'security_group_rule']: collection_name = resource_name.replace('_', '-') + "s" params = RESOURCE_ATTRIBUTE_MAP.get(resource_name + "s", dict()) resource_registry.register_resource_by_name(resource_name) controller = base.create_resource(collection_name, resource_name, plugin, params, allow_bulk=True, allow_pagination=True, allow_sorting=True) ex = extensions.ResourceExtension(collection_name, controller, attr_map=params) exts.append(ex) return exts
def get_resources(cls): """ Returns Ext Resources """ exts = [] plugin = manager.NeutronManager.get_plugin() for resource_name in ['policy']: collection_name = resource_name + "s" params = RESOURCE_ATTRIBUTE_MAP.get(collection_name, dict()) member_actions = {} controller = base.create_resource(collection_name, resource_name, plugin, params, member_actions=member_actions) ex = extensions.ResourceExtension(collection_name, controller, member_actions=member_actions) exts.append(ex) return exts
def get_resources(cls): """Returns Ext Resources.""" special_mappings = {'policies': 'policy'} plural_mappings = resource_helper.build_plural_mappings( special_mappings, itertools.chain(RESOURCE_ATTRIBUTE_MAP, SUB_RESOURCE_ATTRIBUTE_MAP)) attr.PLURALS.update(plural_mappings) resources = resource_helper.build_resource_info(plural_mappings, RESOURCE_ATTRIBUTE_MAP, constants.QOS, translate_name=True, allow_bulk=True) plugin = manager.NeutronManager.get_service_plugins()[constants.QOS] for collection_name in SUB_RESOURCE_ATTRIBUTE_MAP: resource_name = collection_name[:-1] parent = SUB_RESOURCE_ATTRIBUTE_MAP[collection_name].get('parent') params = SUB_RESOURCE_ATTRIBUTE_MAP[collection_name].get( 'parameters') controller = base.create_resource(collection_name, resource_name, plugin, params, allow_bulk=True, parent=parent, allow_pagination=True, allow_sorting=True) resource = extensions.ResourceExtension(collection_name, controller, parent, path_prefix=QOS_PREFIX, attr_map=params) resources.append(resource) return resources
def get_resources(cls): """Returns Ext Resources.""" exts = [] plugin = manager.NeutronManager.get_plugin() resource_name = 'ext_test_resource' collection_name = resource_name + "s" params = RESOURCE_ATTRIBUTE_MAP.get(collection_name, dict()) resource_registry.register_resource_by_name(resource_name) controller = base.create_resource(collection_name, resource_name, plugin, params, member_actions={}) ex = extensions.ResourceExtension(collection_name, controller, member_actions={}) exts.append(ex) return exts
def get_resources(cls): plural_mappings = resource_helper.build_plural_mappings( {}, RESOURCE_ATTRIBUTE_MAP) action_map = {'loadbalancer': {'stats': 'GET', 'statuses': 'GET'}} plural_mappings['members'] = 'member' resource_registry.register_resource_by_name('member', 'members') plural_mappings['sni_container_refs'] = 'sni_container_ref' plural_mappings['sni_container_ids'] = 'sni_container_id' resources = resource_helper.build_resource_info( plural_mappings, RESOURCE_ATTRIBUTE_MAP, constants.LOADBALANCERV2, action_map=action_map, register_quota=True) plugin = directory.get_plugin(constants.LOADBALANCERV2) for collection_name in SUB_RESOURCE_ATTRIBUTE_MAP: # Special handling needed for sub-resources with 'y' ending # (e.g. proxies -> proxy) resource_name = collection_name[:-1] parent = SUB_RESOURCE_ATTRIBUTE_MAP[collection_name].get('parent') params = SUB_RESOURCE_ATTRIBUTE_MAP[collection_name].get( 'parameters') controller = base.create_resource(collection_name, resource_name, plugin, params, allow_bulk=True, parent=parent, allow_pagination=True, allow_sorting=True) resource = extensions.ResourceExtension( collection_name, controller, parent, path_prefix=LOADBALANCERV2_PREFIX, attr_map=params) resources.append(resource) return resources
def get_resources(cls): plural_mappings = resource_helper.build_plural_mappings( {}, RESOURCE_ATTRIBUTE_MAP) action_map = {'loadbalancer': {'stats': 'GET'}} plural_mappings['members'] = 'member' attr.PLURALS.update(plural_mappings) resources = resource_helper.build_resource_info( plural_mappings, RESOURCE_ATTRIBUTE_MAP, constants.LOADBALANCERV2, action_map=action_map, register_quota=True) plugin = manager.NeutronManager.get_service_plugins()[ constants.LOADBALANCERV2] for collection_name in SUB_RESOURCE_ATTRIBUTE_MAP: # Special handling needed for sub-resources with 'y' ending # (e.g. proxies -> proxy) resource_name = collection_name[:-1] parent = SUB_RESOURCE_ATTRIBUTE_MAP[collection_name].get('parent') params = SUB_RESOURCE_ATTRIBUTE_MAP[collection_name].get( 'parameters') controller = base.create_resource(collection_name, resource_name, plugin, params, allow_bulk=True, parent=parent, allow_pagination=True, allow_sorting=True) resource = extensions.ResourceExtension( collection_name, controller, parent, path_prefix=constants.COMMON_PREFIXES[ constants.LOADBALANCERV2], attr_map=params) resources.append(resource) return resources
def get_resources(cls): """Returns Ext Resources.""" special_mappings = {'policies': 'policy'} plural_mappings = resource_helper.build_plural_mappings( special_mappings, itertools.chain( apidef.RESOURCE_ATTRIBUTE_MAP, apidef.SUB_RESOURCE_ATTRIBUTE_MAP)) resources = resource_helper.build_resource_info( plural_mappings, apidef.RESOURCE_ATTRIBUTE_MAP, constants.QOS, translate_name=True, allow_bulk=True) plugin = directory.get_plugin(constants.QOS) for collection_name in apidef.SUB_RESOURCE_ATTRIBUTE_MAP: resource_name = collection_name[:-1] parent = apidef.SUB_RESOURCE_ATTRIBUTE_MAP[ collection_name].get('parent') params = apidef.SUB_RESOURCE_ATTRIBUTE_MAP[collection_name].get( 'parameters') controller = base.create_resource(collection_name, resource_name, plugin, params, allow_bulk=True, parent=parent, allow_pagination=True, allow_sorting=True) resource = extensions.ResourceExtension( collection_name, controller, parent, path_prefix=apidef.API_PREFIX, attr_map=params) resources.append(resource) return resources
def get_resources(cls): l7_plurals = {'l7policies': 'l7policy', 'rules': 'rule'} plural_mappings = resource_helper.build_plural_mappings( l7_plurals, RESOURCE_ATTRIBUTE_MAP) resources = resource_helper.build_resource_info( plural_mappings, RESOURCE_ATTRIBUTE_MAP, constants.LOADBALANCERV2, register_quota=True) plugin = directory.get_plugin(constants.LOADBALANCERV2) for collection_name in SUB_RESOURCE_ATTRIBUTE_MAP: # Special handling needed for sub-resources with 'y' ending # (e.g. proxies -> proxy) resource_name = plural_mappings.get(collection_name, collection_name[:-1]) parent = SUB_RESOURCE_ATTRIBUTE_MAP[collection_name].get('parent') params = SUB_RESOURCE_ATTRIBUTE_MAP[collection_name].get( 'parameters') controller = base.create_resource(collection_name, resource_name, plugin, params, allow_bulk=True, parent=parent, allow_pagination=True, allow_sorting=True) resource = extensions.ResourceExtension( collection_name, controller, parent, path_prefix=LOADBALANCERV2_PREFIX, attr_map=params) resources.append(resource) return resources
def get_resources(cls): """Returns Ext Resources.""" special_mappings = {'floatingips': 'floatingip'} plural_mappings = resource_helper.build_plural_mappings( special_mappings, itertools.chain(apidef.RESOURCE_ATTRIBUTE_MAP, apidef.SUB_RESOURCE_ATTRIBUTE_MAP)) resources = resource_helper.build_resource_info( plural_mappings, apidef.RESOURCE_ATTRIBUTE_MAP, plugin_consts.PORTFORWARDING, translate_name=True, allow_bulk=True) plugin = directory.get_plugin(plugin_consts.PORTFORWARDING) parent = apidef.SUB_RESOURCE_ATTRIBUTE_MAP[apidef.COLLECTION_NAME].get( 'parent') params = apidef.SUB_RESOURCE_ATTRIBUTE_MAP[apidef.COLLECTION_NAME].get( 'parameters') controller = base.create_resource(apidef.COLLECTION_NAME, apidef.RESOURCE_NAME, plugin, params, allow_bulk=True, parent=parent, allow_pagination=True, allow_sorting=True) resource = extensions.ResourceExtension(apidef.COLLECTION_NAME, controller, parent, attr_map=params) resources.append(resource) return resources
def get_resources(cls): """Returns Ext Resources.""" plugin = manager.NeutronManager.get_plugin() params = RESOURCE_ATTRIBUTE_MAP.get(COLLECTION_NAME, dict()) member_actions = { 'connect_network': 'PUT', 'disconnect_network': 'PUT' } # register quotas for network gateways quota.QUOTAS.register_resource_by_name(RESOURCE_NAME) collection_name = COLLECTION_NAME.replace('_', '-') controller = base.create_resource(collection_name, RESOURCE_NAME, plugin, params, member_actions=member_actions) return [ extensions.ResourceExtension(COLLECTION_NAME, controller, member_actions=member_actions) ]
def get_resources(cls): plural_mappings = resource_helper.build_plural_mappings( {}, RESOURCE_ATTRIBUTE_MAP) plural_mappings['route_targets'] = 'route_target' plural_mappings['import_targets'] = 'import_target' plural_mappings['export_targets'] = 'export_target' plural_mappings['route_distinguishers'] = 'route_distinguishers' plural_mappings['network_associations'] = 'network_association' attr.PLURALS.update(plural_mappings) resources = resource_helper.build_resource_info(plural_mappings, RESOURCE_ATTRIBUTE_MAP, constants.BGPVPN, register_quota=True, translate_name=True) plugin = manager.NeutronManager.get_service_plugins()[constants.BGPVPN] for collection_name in SUB_RESOURCE_ATTRIBUTE_MAP: # Special handling needed for sub-resources with 'y' ending # (e.g. proxies -> proxy) resource_name = collection_name[:-1] parent = SUB_RESOURCE_ATTRIBUTE_MAP[collection_name].get('parent') params = SUB_RESOURCE_ATTRIBUTE_MAP[collection_name].get( 'parameters') controller = base.create_resource(collection_name, resource_name, plugin, params, allow_bulk=True, parent=parent, allow_pagination=True, allow_sorting=True) resource = extensions.ResourceExtension( collection_name, controller, parent, path_prefix='bgpvpn', attr_map=params) resources.append(resource) return resources
def get_resources(cls): """Returns Ext Resources.""" plural_mappings = resource_helper.build_plural_mappings( {}, RESOURCE_ATTRIBUTE_MAP) resources = resource_helper.build_resource_info( plural_mappings, RESOURCE_ATTRIBUTE_MAP, constants.GATEWAY_DEVICE) plugin = directory.get_plugin(constants.GATEWAY_DEVICE) for collection_name in SUB_RESOURCE_ATTRIBUTE_MAP: # Special handling needed for sub-resources with 'y' ending # (e.g. proxies -> proxy) if collection_name[-3:] == PLURAL_IES: resource_name = collection_name[:-3] + 'y' else: resource_name = collection_name[:-1] parent = SUB_RESOURCE_ATTRIBUTE_MAP[collection_name].get('parent') params = SUB_RESOURCE_ATTRIBUTE_MAP[collection_name].get( 'parameters') controller = base.create_resource(collection_name, resource_name, plugin, params, allow_bulk=True, parent=parent) resource = extensions.ResourceExtension( collection_name, controller, parent, path_prefix=GATEWAY_DEVICE_PREFIX, attr_map=params) resources.append(resource) return resources
def get_resources(cls): """Returns uos Resources.""" exts = [] controller = resource.Resource(UosController(), base.FAULT_MAP) collection_actions = { 'add_tunnel_and_connection': 'POST', } member_actions = { 'get_router_details': 'GET', 'add_router_portforwarding': 'PUT', 'remove_router_portforwarding': 'PUT', 'update_floatingip_ratelimit': 'PUT', 'update_floatingip_registerno': 'PUT', 'associate_floatingip_router': 'PUT', 'update_port_sg': 'PUT', 'get_fip_usage': 'GET', 'ping_agent': 'PUT', 'remove_tunnel': 'PUT', 'get_tenant_resource_info': 'GET', 'get_agent_resource_info': 'GET', 'get_network_resource_info': 'GET', 'get_security_group_info': 'GET', 'get_subnet_resource_info': 'GET', 'get_resource_host_counter': 'GET', 'get_all_resource_counter': 'GET', 'get_resource_counter': 'GET', } ext = extensions.ResourceExtension( RESOURCES, controller, collection_actions=collection_actions, member_actions=member_actions) exts.append(ext) quota.QUOTAS.register_resource_by_name(PORTFOWRADINGS) return exts
def get_resources(cls): plural_mappings = resource_helper.build_plural_mappings( {}, bgpvpn_api_def.RESOURCE_ATTRIBUTE_MAP) resources = resource_helper.build_resource_info( plural_mappings, bgpvpn_api_def.RESOURCE_ATTRIBUTE_MAP, bgpvpn_api_def.ALIAS, register_quota=True, translate_name=True) plugin = directory.get_plugin(bgpvpn_api_def.ALIAS) for collection_name in bgpvpn_api_def.SUB_RESOURCE_ATTRIBUTE_MAP: # Special handling needed for sub-resources with 'y' ending # (e.g. proxies -> proxy) resource_name = collection_name[:-1] parent = bgpvpn_api_def.SUB_RESOURCE_ATTRIBUTE_MAP[ collection_name].get('parent') params = bgpvpn_api_def.SUB_RESOURCE_ATTRIBUTE_MAP[ collection_name].get('parameters') controller = base.create_resource(collection_name, resource_name, plugin, params, allow_bulk=True, parent=parent, allow_pagination=True, allow_sorting=True) resource = extensions.ResourceExtension( collection_name, controller, parent, path_prefix=bgpvpn_api_def.ALIAS, attr_map=params) resources.append(resource) return resources
def get_resources(cls): """Returns Ext Resources.""" my_plurals = [(key, key[:-1]) for key in RESOURCE_ATTRIBUTE_MAP.keys()] attr.PLURALS.update(dict(my_plurals)) exts = [] plugin = manager.NeutronManager.get_service_plugins()[ constants.L3_ROUTER_NAT] for resource_name in ['router', 'floatingip']: collection_name = resource_name + "s" params = RESOURCE_ATTRIBUTE_MAP.get(collection_name, dict()) member_actions = {} if resource_name == 'router': member_actions = { 'add_router_interface': 'PUT', 'remove_router_interface': 'PUT' } quota.QUOTAS.register_resource_by_name(resource_name) controller = base.create_resource( collection_name, resource_name, plugin, params, member_actions=member_actions, allow_pagination=cfg.CONF.allow_pagination, allow_sorting=cfg.CONF.allow_sorting) ex = extensions.ResourceExtension(collection_name, controller, member_actions=member_actions, attr_map=params) exts.append(ex) return exts
def build_resource_info(plural_mappings, resource_map, which_service, action_map=None, register_quota=False, translate_name=False, allow_bulk=False): """Build resources for advanced services. Takes the resource information, and singular/plural mappings, and creates API resource objects for advanced services extensions. Will optionally translate underscores to dashes in resource names, register the resource, and accept action information for resources. """ resources = [] if action_map is None: action_map = {} plugin = manager.NeutronManager.get_service_plugins()[which_service] for collection_name in resource_map: resource_name = plural_mappings[collection_name] params = resource_map.get(collection_name, {}) if translate_name: collection_name = collection_name.replace('_', '-') if register_quota: quota.QUOTAS.register_resource_by_name(resource_name) member_actions = action_map.get(resource_name, {}) controller = base.create_resource( collection_name, resource_name, plugin, params, member_actions=member_actions, allow_bulk=allow_bulk, allow_pagination=cfg.CONF.allow_pagination, allow_sorting=cfg.CONF.allow_sorting) resource = extensions.ResourceExtension( collection_name, controller, path_prefix=constants.COMMON_PREFIXES[which_service], member_actions=member_actions, attr_map=params) resources.append(resource) return resources
def get_resources(cls): """Returns Ext Resources.""" my_plurals = [(key, key[:-1]) for key in RESOURCE_ATTRIBUTE_MAP.keys()] attr.PLURALS.update(dict(my_plurals)) exts = [] plugin = manager.NeutronManager.get_service_plugins()[ constants.SERVICE_CHAIN] for resource_name in [ 'service_traffic_classifier', 'service_function_instance', 'service_function_group', 'service_chain' ]: collection_name = resource_name + "s" params = RESOURCE_ATTRIBUTE_MAP.get(collection_name, dict()) member_actions = {} quota.QUOTAS.register_resource_by_name(resource_name) controller = base.create_resource( collection_name, resource_name, plugin, params, allow_bulk=True, member_actions=member_actions, allow_pagination=cfg.CONF.allow_pagination, allow_sorting=cfg.CONF.allow_sorting) ex = extensions.ResourceExtension(collection_name, controller, member_actions=member_actions, attr_map=params) exts.append(ex) return exts
def get_resources(cls): attr.validators['type:peer_cidr'] = _validate_openvpn_cidr plural_mapping = {'openvpnconnections': 'openvpnconnection'} my_plurals = [] for plural in RESOURCE_ATTRIBUTE_MAP: singular = plural_mapping.get(plural, plural[:-1]) my_plurals.append((plural, singular)) attr.PLURALS.update(dict(my_plurals)) resources = [] plugin = manager.NeutronManager.get_service_plugins()[constants.VPN] for collection_name in RESOURCE_ATTRIBUTE_MAP: resource_name = plural_mapping.get(collection_name, collection_name[:-1]) params = RESOURCE_ATTRIBUTE_MAP[collection_name] collection_name = collection_name.replace('_', '-') quota.QUOTAS.register_resource_by_name(resource_name) member_actions = { 'get_client_certificate': 'GET', } controller = base.create_resource( collection_name, resource_name, plugin, params, member_actions=member_actions, allow_pagination=cfg.CONF.allow_pagination, allow_sorting=cfg.CONF.allow_sorting) ext = extensions.ResourceExtension( resource_name + 's', controller, path_prefix=constants.COMMON_PREFIXES[constants.VPN], member_actions=member_actions) resources.append(ext) return resources
def build_resource_info(plural_mappings, resource_map, which_service, action_map=None, register_quota=False, translate_name=False, allow_bulk=False): """Build resources for advanced services. Takes the resource information, and singular/plural mappings, and creates API resource objects for advanced services extensions. Will optionally translate underscores to dashes in resource names, register the resource, and accept action information for resources. :param plural_mappings: mappings between singular and plural forms :param resource_map: attribute map for the WSGI resources to create :param which_service: The name of the service for which the WSGI resources are being created. This name will be used to pass the appropriate plugin to the WSGI resource. It can be set to None or "CORE" to create WSGI resources for the core plugin :param action_map: custom resource actions :param register_quota: it can be set to True to register quotas for the resource(s) being created :param translate_name: replaces underscores with dashes :param allow_bulk: True if bulk create are allowed """ resources = [] if not which_service: which_service = constants.CORE if action_map is None: action_map = {} if which_service != constants.CORE: plugin = manager.NeutronManager.get_service_plugins()[which_service] else: plugin = manager.NeutronManager.get_plugin() for collection_name in resource_map: resource_name = plural_mappings[collection_name] params = resource_map.get(collection_name, {}) if translate_name: collection_name = collection_name.replace('_', '-') if register_quota: quota.QUOTAS.register_resource_by_name(resource_name) member_actions = action_map.get(resource_name, {}) controller = base.create_resource( collection_name, resource_name, plugin, params, member_actions=member_actions, allow_bulk=allow_bulk, allow_pagination=cfg.CONF.allow_pagination, allow_sorting=cfg.CONF.allow_sorting) resource = extensions.ResourceExtension( collection_name, controller, path_prefix=constants.COMMON_PREFIXES[which_service], member_actions=member_actions, attr_map=params) resources.append(resource) return resources
def build_resource_info(plural_mappings, resource_map, which_service, action_map=None, register_quota=False, translate_name=False, allow_bulk=False): """Build resources for advanced services. Takes the resource information, and singular/plural mappings, and creates API resource objects for advanced services extensions. Will optionally translate underscores to dashes in resource names, register the resource, and accept action information for resources. :param plural_mappings: mappings between singular and plural forms :param resource_map: attribute map for the WSGI resources to create :param which_service: The name of the service for which the WSGI resources are being created. This name will be used to pass the appropriate plugin to the WSGI resource. It can be set to None or "CORE" to create WSGI resources for the core plugin :param action_map: custom resource actions :param register_quota: it can be set to True to register quotas for the resource(s) being created :param translate_name: replaces underscores with dashes :param allow_bulk: True if bulk create are allowed """ resources = [] if not which_service: which_service = constants.CORE if action_map is None: action_map = {} plugin = directory.get_plugin(which_service) path_prefix = getattr(plugin, "path_prefix", "") LOG.debug('Service %(service)s assigned prefix: %(prefix)s', { 'service': which_service, 'prefix': path_prefix }) for collection_name in resource_map: resource_name = plural_mappings[collection_name] params = resource_map.get(collection_name, {}) # If SUB_RESOURCE_ATTRIBUTE_MAP was passed in as a resource_map, we # need special handling for it. SUB_RESOURCE_ATTRIBUTE_MAP must have # a 'parent' and 'parameters' keys. 'parameters' key is going to # contain sub-resources that are being extended. parent = params.get('parent') params = params['parameters'] if params.get('parameters') else params if translate_name: collection_name = collection_name.replace('_', '-') if register_quota: resource_registry.register_resource_by_name(resource_name) member_actions = action_map.get(resource_name, {}) controller = base.create_resource(collection_name, resource_name, plugin, params, member_actions=member_actions, allow_bulk=allow_bulk, allow_pagination=True, allow_sorting=True, parent=parent) resource = extensions.ResourceExtension(collection_name, controller, path_prefix=path_prefix, member_actions=member_actions, attr_map=params, parent=parent) resources.append(resource) return resources
def get_resources(self): exts = [] controller = resource.Resource(BNPSwitchController(), base.FAULT_MAP) exts.append(extensions.ResourceExtension('bnp-switches', controller)) return exts
def get_resources(cls): """Returns Ext Resources.""" controller = IpAddressesController(manager.NeutronManager.get_plugin()) return [extensions.ResourceExtension( Ip_addresses.get_alias(), controller)]
def get_resources(cls): """Returns Ext Resources.""" plugin = manager.NeutronManager.get_plugin() controller = IPAvailabilityController(plugin) return [extensions.ResourceExtension(Ip_availability.get_alias(), controller)]
def get_resources(cls): """Returns Ext Resources.""" plugin = manager.NeutronManager.get_plugin() controller = MacAddressRangesController(plugin) return [extensions.ResourceExtension(Mac_address_ranges.get_alias(), controller)]
def get_resources(self): return [ extensions.ResourceExtension( 'dhrouterstatus', _authzbase.create_extension(RouterstatusResource())) ]
def get_resources(self): resources = [] resource = extensions.ResourceExtension('foxnsocks', FoxInSocksController()) resources.append(resource) return resources
def get_resources(cls): """Returns Ext Resources.""" plugin = manager.NeutronManager.get_plugin() controller = IPPoliciesController(plugin) return [extensions.ResourceExtension(Ip_policies.get_alias(), controller)]
def get_resources(self): return [extensions.ResourceExtension( 'dhportalias', _authzbase.create_extension(PortaliasResource()))]