Example #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
 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)
 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
     )
Example #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
Example #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
     )
Example #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
Example #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
Example #8
0
File: l3.py Project: 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)
Example #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
     )
 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):
     """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)
Example #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)
Example #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
 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)
Example #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
     )
Example #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)
 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)
 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)
Example #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
 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)
Example #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)
Example #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)
Example #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)
Example #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)
Example #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)
Example #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)
Example #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)
Example #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
     )
Example #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)
Example #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
Example #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)
Example #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
Example #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
Example #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
Example #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)
 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)
Example #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)
Example #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)
Example #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)
Example #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
Example #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)
    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)
Example #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)
Example #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)
Example #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)
Example #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)
 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)
Example #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)    
Example #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)
Example #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)