apmec.api.v1.resource_helper
Module¶apmec.api.v1.resource_helper.
build_plural_mappings
(special_mappings, resource_map)¶Create plural to singular mapping for all resources.
Allows for special mappings to be provided, like policies -> policy. Otherwise, will strip off the last character for normal mappings, like routers -> router.
apmec.api.v1.resource_helper.
build_resource_info
(plural_mappings, resource_map, which_service, action_map=None, 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.
Parameters: |
|
---|
Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.