shreddd/newt-2.0 — pull request #2 by ttsun (2014-06-12 22:20:37+00:00)
Title: Standardized All Modules

# Summary
- All modules have been standardized and the template files for each of the types of adapters is in the /adapters folder of each module.
- A skeleton of how the implementation should structure their adapters is provided so that all adapters written will work correctly with the different view within the modules.
- NERSC authentication fixed and working
- Account adapter can be extended to respond to any user-defined API call to /api/account/.../

## NERSC Authentication
- Authentication is implemented for myproxy in myproxy_adapter.py
- Implementation is slightly hacking, almost completely using the old NEWT 1.0 myproxy_backend code

## Account Adapter
- A routing view is implemented to route all the requests to /api/account/.../ that do not match the user and group info view.
- The variable `patterns` is a tuple list in the form of:

(
(compiled_regex_exp, associated_function, request_required),
...
)
- The compiled_regex_exp must have named groups corresponding to the arguments of the associated_function
- If request_required is True, the associated_function must have request as the first argument
- Example:

patterns = (
(re.compile(r'/usage/(?P.+)$'), get_usage, False),
(re.compile(r'/image/(?P.+)$'), get_image, False),
(re.compile(r'/(?P.+)$'), get_resource, False),
)

## ToDo
- login_required decorator
- Job module for manipulating jobs (processes)
- More verbose logging mechanism
- Globus file backend
- Swagger API docs (?)
- Base64 encryption of store data to allow for storage of binary data (?)