Exemplo n.º 1
0
    def get_resources(cls):
        """Returns Ext Resources."""
        plural_mappings = resource_helper.build_plural_mappings(
            {}, RESOURCE_ATTRIBUTE_MAP)
        attr.PLURALS.update(plural_mappings)
        resources = resource_helper.build_resource_info(
            plural_mappings,
            RESOURCE_ATTRIBUTE_MAP,
            constants.FLAVORS)
        plugin = manager.NeutronManager.get_service_plugins()[
            constants.FLAVORS]
        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)

            resource = extensions.ResourceExtension(
                collection_name,
                controller, parent,
                path_prefix=FLAVORS_PREFIX,
                attr_map=params)
            resources.append(resource)

        return resources
Exemplo n.º 2
0
 def get_resources(cls):
     plural_mappings = resource_helper.build_plural_mappings(
         {}, RESOURCE_ATTRIBUTE_MAP)
     attr.PLURALS.update(plural_mappings)
     return resource_helper.build_resource_info(plural_mappings,
                                                RESOURCE_ATTRIBUTE_MAP,
                                                constants.SERVICECHAIN)
Exemplo n.º 3
0
 def get_resources(cls):
     """Returns Ext Resources."""
     plural_mappings = resource_helper.build_plural_mappings({}, RESOURCE_ATTRIBUTE_MAP)
     plural_mappings["flow_classifiers"] = "flow_classifier"
     return resource_helper.build_resource_info(
         plural_mappings, RESOURCE_ATTRIBUTE_MAP, FLOW_CLASSIFIER_EXT, register_quota=True
     )
Exemplo n.º 4
0
    def get_resources(cls):
        plural_mappings = resource_helper.build_plural_mappings(
            {}, RESOURCE_ATTRIBUTE_MAP)
        plural_mappings['health_monitors_status'] = 'health_monitor_status'
        attr.PLURALS.update(plural_mappings)
        action_map = {'pool': {'stats': 'GET'}}
        resources = resource_helper.build_resource_info(plural_mappings,
                                                        RESOURCE_ATTRIBUTE_MAP,
                                                        constants.LOADBALANCER,
                                                        action_map=action_map)
        plugin = manager.NeutronManager.get_service_plugins()[
            constants.LOADBALANCER]
        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)

            resource = extensions.ResourceExtension(
                collection_name,
                controller, parent,
                path_prefix=constants.COMMON_PREFIXES[constants.LOADBALANCER],
                attr_map=params)
            resources.append(resource)

        return resources
Exemplo n.º 5
0
 def get_resources(cls):
     """Returns Ext Resources."""
     plural_mappings = resource_helper.build_plural_mappings({}, RESOURCE_ATTRIBUTE_MAP)
     plural_mappings["sfcs"] = "sfc"
     return resource_helper.build_resource_info(
         plural_mappings, RESOURCE_ATTRIBUTE_MAP, SFC_EXT, register_quota=True
     )
Exemplo n.º 6
0
    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
Exemplo n.º 7
0
    def get_resources(cls):
        """Returns Ext Resources."""
        plural_mappings = resource_helper.build_plural_mappings(
            {}, apidef.RESOURCE_ATTRIBUTE_MAP)
        resources = resource_helper.build_resource_info(
            plural_mappings,
            apidef.RESOURCE_ATTRIBUTE_MAP,
            constants.FLAVORS)
        plugin = directory.get_plugin(constants.FLAVORS)
        for collection_name in apidef.SUB_RESOURCE_ATTRIBUTE_MAP:
            # Special handling needed for sub-resources with 'y' ending
            # (e.g. proxies -> proxy)
            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)

            resource = extensions.ResourceExtension(
                collection_name,
                controller, parent,
                path_prefix=apidef.API_PREFIX,
                attr_map=params)
            resources.append(resource)

        return resources
Exemplo n.º 8
0
Arquivo: l3.py Projeto: cubeek/neutron
 def get_resources(cls):
     """Returns Ext Resources."""
     plural_mappings = resource_helper.build_plural_mappings(
         {}, l3_apidef.RESOURCE_ATTRIBUTE_MAP)
     return resource_helper.build_resource_info(
         plural_mappings, l3_apidef.RESOURCE_ATTRIBUTE_MAP,
         constants.L3, action_map=l3_apidef.ACTION_MAP,
         register_quota=True)
Exemplo n.º 9
0
 def get_resources(cls):
     special_mappings = {"firewall_policies": "firewall_policy"}
     plural_mappings = resource_helper.build_plural_mappings(special_mappings, RESOURCE_ATTRIBUTE_MAP)
     attr.PLURALS.update(plural_mappings)
     action_map = {"firewall_policy": {"insert_rule": "PUT", "remove_rule": "PUT"}}
     return resource_helper.build_resource_info(
         plural_mappings, RESOURCE_ATTRIBUTE_MAP, constants.FIREWALL, action_map=action_map
     )
Exemplo n.º 10
0
 def get_resources(cls):
     plural_mappings = resource_helper.build_plural_mappings(
         {}, RESOURCE_ATTRIBUTE_MAP)
     return resource_helper.build_resource_info(plural_mappings,
                                                RESOURCE_ATTRIBUTE_MAP,
                                                nconstants.VPN,
                                                register_quota=True,
                                                translate_name=True)
Exemplo n.º 11
0
 def get_resources(cls):
     """Returns Ext Resources."""
     plural_mappings = resource_helper.build_plural_mappings(
         {}, RESOURCE_ATTRIBUTE_MAP)
     attr.PLURALS.update(plural_mappings)
     return resource_helper.build_resource_info(plural_mappings,
                                                RESOURCE_ATTRIBUTE_MAP,
                                                constants.L3_ROUTER_NAT)
Exemplo n.º 12
0
 def get_resources(cls):
     special_mappings = {'firewall_policies': 'firewall_policy'}
     plural_mappings = resource_helper.build_plural_mappings(
         special_mappings, firewall.RESOURCE_ATTRIBUTE_MAP)
     return resource_helper.build_resource_info(
         plural_mappings, firewall.RESOURCE_ATTRIBUTE_MAP,
         fwaas_constants.FIREWALL, action_map=firewall.ACTION_MAP,
         register_quota=True)
Exemplo n.º 13
0
    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.OVSVAPP_PLUGIN)

        return resources
Exemplo n.º 14
0
 def get_resources(cls):
     plural_mappings = resource_helper.build_plural_mappings(
         {}, RESOURCE_ATTRIBUTE_MAP)
     attr.PLURALS.update(plural_mappings)
     return resource_helper.build_resource_info(plural_mappings,
                                                RESOURCE_ATTRIBUTE_MAP,
                                                constants.SERVICECHAIN,
                                                register_quota=True)
Exemplo n.º 15
0
 def get_resources(cls):
     special_mappings = {"ikepolicies": "ikepolicy", "ipsecpolicies": "ipsecpolicy"}
     plural_mappings = resource_helper.build_plural_mappings(special_mappings, RESOURCE_ATTRIBUTE_MAP)
     plural_mappings["peer_cidrs"] = "peer_cidr"
     attr.PLURALS.update(plural_mappings)
     return resource_helper.build_resource_info(
         plural_mappings, RESOURCE_ATTRIBUTE_MAP, constants.VPN, register_quota=True, translate_name=True
     )
Exemplo n.º 16
0
 def get_resources(cls):
     """Returns Ext Resources."""
     plural_mappings = resource_helper.build_plural_mappings(
         {}, RESOURCE_ATTRIBUTE_MAP)
     attr.PLURALS.update(plural_mappings)
     return resource_helper.build_resource_info(plural_mappings,
                                                RESOURCE_ATTRIBUTE_MAP,
                                                constants.L3_ROUTER_NAT)
Exemplo n.º 17
0
 def get_resources(cls):
     plural_mappings = resource_helper.build_plural_mappings(
         {}, RESOURCE_ATTRIBUTE_MAP)
     return resource_helper.build_resource_info(plural_mappings,
                                                RESOURCE_ATTRIBUTE_MAP,
                                                nconstants.VPN,
                                                register_quota=True,
                                                translate_name=True)
 def get_resources(cls):
     plural_mappings = resource_helper.build_plural_mappings(
         {}, extraroute_atomic.RESOURCE_ATTRIBUTE_MAP)
     return resource_helper.build_resource_info(
         plural_mappings,
         extraroute_atomic.RESOURCE_ATTRIBUTE_MAP,
         constants.L3,
         action_map=extraroute_atomic.ACTION_MAP)
Exemplo n.º 19
0
 def get_resources(cls):
     plural_mappings = resource_helper.build_plural_mappings(
         {}, RESOURCE_ATTRIBUTE_MAP)
     gbp_extensions.register_plurals(plural_mappings)
     return resource_helper.build_resource_info(plural_mappings,
                                                RESOURCE_ATTRIBUTE_MAP,
                                                constants.SERVICECHAIN,
                                                register_quota=True)
Exemplo n.º 20
0
    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, 'hyperswitch')

        return resources
Exemplo n.º 21
0
 def get_resources(cls):
     plural_mappings = resource_helper.build_plural_mappings(
         {}, RESOURCE_ATTRIBUTE_MAP)
     gbp_extensions.register_plurals(plural_mappings)
     return resource_helper.build_resource_info(plural_mappings,
                                                RESOURCE_ATTRIBUTE_MAP,
                                                constants.SERVICECHAIN,
                                                register_quota=True)
 def get_resources(cls):
     """Returns Ext Resources."""
     plural_mappings = resource_helper.build_plural_mappings(
         {}, RESOURCE_ATTRIBUTE_MAP)
     return resource_helper.build_resource_info(plural_mappings,
                                                RESOURCE_ATTRIBUTE_MAP,
                                                constants.NUAGE_APIS,
                                                translate_name=True)
Exemplo n.º 23
0
 def get_resources(cls):
     plural_mappings = resource_helper.build_plural_mappings(
         {}, RESOURCE_ATTRIBUTE_MAP)
     plural_mappings['service_graphs'] = 'service_graph'
     return resource_helper.build_resource_info(plural_mappings,
                                                RESOURCE_ATTRIBUTE_MAP,
                                                ext_sfc.SFC_EXT,
                                                register_quota=True)
Exemplo n.º 24
0
 def get_resources(cls):
     """Returns Ext Resources."""
     plural_mappings = resource_helper.build_plural_mappings(
         {}, RESOURCE_ATTRIBUTE_MAP)
     # attr.PLURALS.update(plural_mappings)
     return resource_helper.build_resource_info(plural_mappings,
                                                RESOURCE_ATTRIBUTE_MAP,
                                                None,
                                                register_quota=True)
Exemplo n.º 25
0
 def get_resources(cls):
     plural_mappings = resource_helper.build_plural_mappings(
         {}, RESOURCE_ATTRIBUTE_MAP)
     return resource_helper.build_resource_info(
         plural_mappings,
         RESOURCE_ATTRIBUTE_MAP,
         constants.NUAGE_NET_TOPOLOGY_SERVICE_PLUGIN,
         register_quota=True,
         allow_bulk=True)
Exemplo n.º 26
0
 def get_resources(cls):
     """Returns Ext Resources."""
     plural_mappings = resource_helper.build_plural_mappings(
         {}, RESOURCE_ATTRIBUTE_MAP)
     if NEUTRON_VERSION.version[0] <= NEUTRON_NEWTON_VERSION.version[0]:
         attr.PLURALS.update(plural_mappings)
     return resource_helper.build_resource_info(plural_mappings,
                                                RESOURCE_ATTRIBUTE_MAP,
                                                bc.constants.L3)
Exemplo n.º 27
0
 def get_resources(cls):
     """Returns Ext Resources."""
     plural_mappings = resource_helper.build_plural_mappings(
         {}, RESOURCE_ATTRIBUTE_MAP)
     # attr.PLURALS.update(plural_mappings)
     return resource_helper.build_resource_info(plural_mappings,
                                                RESOURCE_ATTRIBUTE_MAP,
                                                None,
                                                register_quota=True)
Exemplo n.º 28
0
 def get_resources(cls):
     plural_mappings = resource_helper.build_plural_mappings(
         {}, RESOURCE_ATTRIBUTE_MAP)
     plural_mappings['service_graphs'] = 'service_graph'
     return resource_helper.build_resource_info(
         plural_mappings,
         RESOURCE_ATTRIBUTE_MAP,
         ext_sfc.SFC_EXT,
         register_quota=True)
Exemplo n.º 29
0
 def get_resources(cls):
     """Returns Ext Resources."""
     plural_mappings = resource_helper.build_plural_mappings(
         {}, RESOURCE_ATTRIBUTE_MAP)
     plural_mappings['sfcs'] = 'sfc'
     return resource_helper.build_resource_info(plural_mappings,
                                                RESOURCE_ATTRIBUTE_MAP,
                                                SFC_EXT,
                                                register_quota=True)
Exemplo n.º 30
0
 def get_resources(cls):
     """Returns Ext Resources."""
     plural_mappings = resource_helper.build_plural_mappings({}, RESOURCE_ATTRIBUTE_MAP)
     plural_mappings["external_fixed_ips"] = "external_fixed_ip"
     attr.PLURALS.update(plural_mappings)
     action_map = {"router": {"add_router_interface": "PUT", "remove_router_interface": "PUT"}}
     return resource_helper.build_resource_info(
         plural_mappings, RESOURCE_ATTRIBUTE_MAP, constants.L3_ROUTER_NAT, action_map=action_map, register_quota=True
     )
Exemplo n.º 31
0
 def get_resources(cls):
     """Returns Ext Resources."""
     plural_mappings = resource_helper.build_plural_mappings(
         {}, metering_apidef.RESOURCE_ATTRIBUTE_MAP)
     # PCM: Metering sets pagination and sorting to True. Do we have cfg
     # entries for these so can be read? Else, must pass in.
     return resource_helper.build_resource_info(
         plural_mappings, metering_apidef.RESOURCE_ATTRIBUTE_MAP,
         constants.METERING, translate_name=True, allow_bulk=True)
Exemplo n.º 32
0
 def get_resources(cls):
     plural_mappings = resource_helper.build_plural_mappings(
         {}, RESOURCE_ATTRIBUTE_MAP)
     resources = resource_helper.build_resource_info(
         plural_mappings,
         RESOURCE_ATTRIBUTE_MAP,
         constants.LOADBALANCERV2,
         register_quota=True)
     return resources
Exemplo n.º 33
0
 def get_resources(cls):
     """Returns Ext Resources."""
     plural_mappings = resource_helper.build_plural_mappings(
         {}, RESOURCE_ATTRIBUTE_MAP)
     plural_mappings['flow_classifiers'] = 'flow_classifier'
     return resource_helper.build_resource_info(plural_mappings,
                                                RESOURCE_ATTRIBUTE_MAP,
                                                FLOW_CLASSIFIER_EXT,
                                                register_quota=True)
Exemplo n.º 34
0
    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.L2GW)

        return resources
Exemplo n.º 35
0
    def get_resources(cls):
        plural_mappings = rh.build_plural_mappings(
            {}, bgp_api_def.RESOURCE_ATTRIBUTE_MAP)
        exts = rh.build_resource_info(plural_mappings,
                                      bgp_api_def.RESOURCE_ATTRIBUTE_MAP,
                                      bgp_api_def.ALIAS,
                                      action_map=bgp_api_def.ACTION_MAP)

        return exts
Exemplo n.º 36
0
 def get_resources(cls):
     plural_mappings = resource_helper.build_plural_mappings(
         {}, RESOURCE_ATTRIBUTE_MAP)
     resources = resource_helper.build_resource_info(
         plural_mappings,
         RESOURCE_ATTRIBUTE_MAP,
         constants.LOADBALANCERV2,
         register_quota=True)
     return resources
Exemplo n.º 37
0
 def get_resources(cls):
     special_mappings = {'firewall_policies': 'firewall_policy'}
     plural_mappings = resource_helper.build_plural_mappings(
         special_mappings, RESOURCE_ATTRIBUTE_MAP)
     action_map = {'firewall_policy': {'insert_rule': 'PUT',
                                       'remove_rule': 'PUT'}}
     return resource_helper.build_resource_info(plural_mappings,
                                                RESOURCE_ATTRIBUTE_MAP,
                                                FIREWALL_CONST,
                                                action_map=action_map)
Exemplo n.º 38
0
 def get_resources(self):
     special_mappings = {'ipinfos': 'ipinfo'}
     plural_mappings = resource_helper.build_plural_mappings(
         special_mappings, RESOURCE_ATTRIBUTE_MAP)
     attr.PLURALS.update(plural_mappings)
     action_map = {}
     return resource_helper.build_resource_info(plural_mappings,
                                                RESOURCE_ATTRIBUTE_MAP,
                                      "ipinfo",
                                                action_map=action_map)
 def get_resources(cls):
     """Returns Ext Resources."""
     plural_mappings = resource_helper.build_plural_mappings(
         {}, subnetpool_def.RESOURCE_ATTRIBUTE_MAP)
     return resource_helper.build_resource_info(
         plural_mappings,
         subnetpool_def.RESOURCE_ATTRIBUTE_MAP,
         None,
         action_map=subnetpool_prefix_ops_def.ACTION_MAP,
         register_quota=True)
Exemplo n.º 40
0
 def get_resources(cls):
     """Returns Ext Resources."""
     plural_mappings = resource_helper.build_plural_mappings(
         {}, trunk.RESOURCE_ATTRIBUTE_MAP)
     return resource_helper.build_resource_info(
         plural_mappings,
         trunk.RESOURCE_ATTRIBUTE_MAP,
         trunk.ALIAS,
         action_map=trunk.ACTION_MAP,
         register_quota=True)
 def get_resources(cls):
     """Returns Ext Resources."""
     plural_mappings = resource_helper.build_plural_mappings(
         {}, RESOURCE_ATTRIBUTE_MAP)
     attr.PLURALS.update(plural_mappings)
     action_map = {DEVICE: {'get_hosting_device_config': 'GET'}}
     return resource_helper.build_resource_info(plural_mappings,
                                                RESOURCE_ATTRIBUTE_MAP,
                                                constants.DEVICE_MANAGER,
                                                action_map=action_map)
 def get_resources(self):
     special_mappings = {'gcloud_nats': 'gcloud_nat'}
     plural_mappings = resource_helper.build_plural_mappings(
         special_mappings, RESOURCE_ATTRIBUTE_MAP)
     attr.PLURALS.update(plural_mappings)
     action_map = {}
     return resource_helper.build_resource_info(plural_mappings,
                                                RESOURCE_ATTRIBUTE_MAP,
                                                "gcloud_nat",
                                                action_map=action_map)
 def get_resources(self):
     special_mappings = {'router_qoss': 'router_qos',"router_qosrules":"router_qosrule","router_qosrule_binds":"router_qosrule_bind"}
     plural_mappings = resource_helper.build_plural_mappings(
         special_mappings, RESOURCE_ATTRIBUTE_MAP)
     attr.PLURALS.update(plural_mappings)
     action_map = {}
     return resource_helper.build_resource_info(plural_mappings,
                                                RESOURCE_ATTRIBUTE_MAP,
                                      "gcloud_router_qos",
                                                action_map=action_map)
Exemplo n.º 44
0
 def get_resources(cls):
     special_mappings = {'firewall_policies': 'firewall_policy'}
     plural_mappings = resource_helper.build_plural_mappings(
         special_mappings, firewall_v2.RESOURCE_ATTRIBUTE_MAP)
     return resource_helper.build_resource_info(
         plural_mappings,
         firewall_v2.RESOURCE_ATTRIBUTE_MAP,
         fwaas_constants.FIREWALL_V2,
         action_map=firewall_v2.ACTION_MAP,
         register_quota=True)
Exemplo n.º 45
0
 def get_resources(cls):
     """Returns Ext Resources."""
     plural_mappings = resource_helper.build_plural_mappings(
         {}, l3_apidef.RESOURCE_ATTRIBUTE_MAP)
     return resource_helper.build_resource_info(
         plural_mappings,
         l3_apidef.RESOURCE_ATTRIBUTE_MAP,
         constants.L3,
         action_map=l3_apidef.ACTION_MAP,
         register_quota=True)
Exemplo n.º 46
0
 def get_resources(cls):
     plural_mappings = resource_helper.build_plural_mappings(
         {}, RESOURCE_ATTRIBUTE_MAP)
     attr.PLURALS.update(plural_mappings)
     for resource_name in ['servicechain_node', 'servicechain_spec',
                           'servicechain_instance', 'service_profile']:
         quota.QUOTAS.register_resource_by_name(resource_name)
     return resource_helper.build_resource_info(plural_mappings,
                                                RESOURCE_ATTRIBUTE_MAP,
                                                constants.SERVICECHAIN)
    def get_resources(cls):
        """Returns external resources."""
        my_plurals = resource_helper.build_plural_mappings(
            {}, RESOURCE_ATTRIBUTE_MAP)
        attributes.PLURALS.update(my_plurals)
        attr_map = RESOURCE_ATTRIBUTE_MAP
        ext_resources = resource_helper.build_resource_info(
            my_plurals, attr_map, constants.A10_CERTIFICATE)

        return ext_resources
Exemplo n.º 48
0
 def get_resources(cls):
     """Returns extension resources """
     plural_mappings = resource_helper.build_plural_mappings(
         {}, RESOURCE_ATTRIBUTE_MAP)
     action_map = {'host': {'bind_interface': 'PUT',
                            'unbind_interface': 'PUT'}}
     return resource_helper.build_resource_info(plural_mappings,
                                                RESOURCE_ATTRIBUTE_MAP,
                                                constants.CORE,
                                                action_map=action_map)
Exemplo n.º 49
0
    def get_resources(cls):
        plural_mappings = resource_helper.build_plural_mappings(
            {}, apidef.RESOURCE_ATTRIBUTE_MAP)

        return resource_helper.build_resource_info(
            plural_mappings,
            apidef.RESOURCE_ATTRIBUTE_MAP,
            nl_pl_const.QOS,
            translate_name=True,
            allow_bulk=True)
Exemplo n.º 50
0
 def get_resources(cls):
     """Returns Ext Resources."""
     plural_mappings = resource_helper.build_plural_mappings(
         {}, RESOURCE_ATTRIBUTE_MAP)
     attributes.PLURALS.update(plural_mappings)
     resources = resource_helper.build_resource_info(
         plural_mappings,
         RESOURCE_ATTRIBUTE_MAP,
         'bambuk')
     return resources
 def get_resources(cls):
     """Returns Ext Resources."""
     plural_mappings = resource_helper.build_plural_mappings(
         {}, RESOURCE_ATTRIBUTE_MAP)
     attr.PLURALS.update(plural_mappings)
     action_map = {DEVICE: {'get_hosting_device_config': 'GET'}}
     return resource_helper.build_resource_info(plural_mappings,
                                                RESOURCE_ATTRIBUTE_MAP,
                                                constants.DEVICE_MANAGER,
                                                action_map=action_map)
Exemplo n.º 52
0
 def get_resources(cls):
     """Returns floatingipset Resources."""
     plural_mappings = resource_helper.build_plural_mappings(
         {}, RESOURCE_ATTRIBUTE_MAP)
     attr.PLURALS.update(plural_mappings)
     #quota.QUOTAS.register_resource_by_name('floatingset')
     return resource_helper.build_resource_info(plural_mappings,
                                                RESOURCE_ATTRIBUTE_MAP,
                                                constants.L3_ROUTER_NAT,
                                                register_quota=True)
Exemplo n.º 53
0
 def get_resources(cls):
     """Returns floatingipset Resources."""
     plural_mappings = resource_helper.build_plural_mappings(
         {}, RESOURCE_ATTRIBUTE_MAP)
     attr.PLURALS.update(plural_mappings)
     #quota.QUOTAS.register_resource_by_name('floatingset')
     return resource_helper.build_resource_info(plural_mappings,
                                                RESOURCE_ATTRIBUTE_MAP,
                                                constants.L3_ROUTER_NAT,
                                                register_quota=True)
Exemplo n.º 54
0
    def get_resources(cls):
        """Returns Ext Resources."""
        plural_mappings = resource_helper.build_plural_mappings(
            {}, RESOURCE_ATTRIBUTE_MAP)

        return resource_helper.build_resource_info(plural_mappings,
                                                   RESOURCE_ATTRIBUTE_MAP,
                                                   constants.TAAS,
                                                   translate_name=False,
                                                   allow_bulk=True)
Exemplo n.º 55
0
 def get_resources(cls):
     special_mappings = {
         'l2_policies': 'l2_policy', 'l3_policies': 'l3_policy',
         'network_service_policies': 'network_service_policy'}
     plural_mappings = resource_helper.build_plural_mappings(
         special_mappings, RESOURCE_ATTRIBUTE_MAP)
     attr.PLURALS.update(plural_mappings)
     return resource_helper.build_resource_info(plural_mappings,
                                                RESOURCE_ATTRIBUTE_MAP,
                                                constants.GROUP_POLICY)
Exemplo n.º 56
0
 def get_resources(cls):
     """Returns Ext Resources."""
     plural_mappings = resource_helper.build_plural_mappings(
         {}, RESOURCE_ATTRIBUTE_MAP)
     attr.PLURALS.update(plural_mappings)
     return resource_helper.build_resource_info(plural_mappings,
                                                RESOURCE_ATTRIBUTE_MAP,
                                                constants.INSTANTVPN,
                                                translate_name=True,
                                                allow_bulk=True)    
Exemplo n.º 57
0
    def get_resources(cls):
        """Returns Ext Resources."""
        plural_mappings = resource_helper.build_plural_mappings(
            {}, RESOURCE_ATTRIBUTE_MAP)

        return resource_helper.build_resource_info(plural_mappings,
                                                   RESOURCE_ATTRIBUTE_MAP,
                                                   constants.ISOFLAT,
                                                   translate_name=False,
                                                   allow_bulk=True)
Exemplo n.º 58
0
 def get_resources(cls):
     """Returns Ext Resources."""
     plural_mappings = resource_helper.build_plural_mappings(
         {}, RESOURCE_ATTRIBUTE_MAP)
     member_actions = {}
     return resource_helper.build_resource_info(plural_mappings,
                                                RESOURCE_ATTRIBUTE_MAP,
                                                None,
                                                action_map=member_actions,
                                                register_quota=True,
                                                translate_name=True)