Commit Graph

166 Commits

Author SHA1 Message Date
Seth House
6af934c986 Removed unused import 2012-11-21 11:47:38 -07:00
Seth House
06cb3a5a9b Updated HTML skeleton with req'd angular markup 2012-11-21 11:47:38 -07:00
Seth House
f48dca4610 Move config specific to the REST app into that handler 2012-11-20 20:12:01 -07:00
Seth House
76453826df Added serving static media from a configurable directory 2012-11-20 20:12:00 -07:00
Seth House
addca3c47b Document function/class params 2012-11-20 14:27:52 -07:00
Seth House
45bceaaf7b Corrected casting 'arg' to a list 2012-11-20 11:10:57 -07:00
Seth House
23159e1244 Patch the auth token into the lowdata 2012-11-20 11:10:57 -07:00
Seth House
876788a9ee Added a tool to patch the custom auth header into the cookie dict
This allows us to continue happily using CherryPy sessions.
2012-11-20 11:10:57 -07:00
Seth House
3d024801f6 Don't shoe-horn complicated low-data structures into urlencoded params
Fixes #24
2012-11-19 18:24:04 -07:00
Seth House
2df1ddd1e4 Bumped version to 0.7.1 2012-11-17 09:48:32 -07:00
Seth House
fa38b05726 Bumped version to 0.7.0 2012-11-16 11:40:17 -07:00
Seth House
ce85644f7e Removed the rest_flask module 2012-11-16 11:36:05 -07:00
Seth House
4822123afd Improved the APIClient docstrings 2012-11-16 11:18:04 -07:00
Seth House
5ad538d183 Added a (short) explanation page on Salt's client interfaces 2012-11-16 10:45:40 -07:00
Seth House
2c3f5d3b11 Fleshed out the remaining rest_cherrypy docstrings 2012-11-16 10:39:48 -07:00
Seth House
344f57c4f6 Fixed adding an actual wsgi app from switch from cheroot to cherrypy 2012-11-15 21:28:16 -07:00
Seth House
38fd2da0ec Fixed ssl_adapter for switch from cheroot to cherrypy 2012-11-15 21:28:16 -07:00
Seth House
84f8889a1c Moved custom tools out of the module namespace 2012-11-15 21:10:31 -07:00
Seth House
71fd69927a Don't output traceback if debug is not set 2012-11-15 19:59:47 -07:00
Seth House
7808f8bec5 Added many o' docstring 2012-11-15 14:32:45 -07:00
Seth House
fb517ead6d Return a dict 2012-11-15 14:32:45 -07:00
Seth House
12ac667893 Allow handlers to supply their own outputters 2012-11-15 14:32:45 -07:00
Seth House
d410fbe5f0 Style fixes 2012-11-15 14:32:45 -07:00
Seth House
ca70bed995 Allow individual handlers to add/modify accepted content types 2012-11-15 14:32:45 -07:00
Seth House
f6d9b74cfe Added explanation of mapping 2012-11-15 14:32:45 -07:00
Seth House
26bcd4437f Change 'in' lookup to 'startswith' 2012-11-15 14:32:45 -07:00
Seth House
4d98d72cd7 Revert "port format_all to salt-api pending updates in salt core"
This reverts commit bc3d492791.

These changes are now in Salt core.

Conflicts:
	saltapi/__init__.py
2012-11-15 14:32:45 -07:00
Seth House
385530b967 Removed FIXME; this will be a touch tricky and should be a full ticket 2012-11-15 14:32:45 -07:00
Seth House
62c7047896 Add check for response._tmpl before trying to use it 2012-11-15 14:32:45 -07:00
Seth House
8a25235088 Quiet some common warnings with CherryPy
CherryPy uses accessing "private" members often enough to silence.
2012-11-15 14:32:45 -07:00
Seth House
fa7867af13 Revert "Moved fmt_lowdata into a module-level function"
This reverts commit 7a319e36c5.

Reformatting the POST data isn't really a content_type concern.

Conflicts:
	saltapi/netapi/rest_cherrypy/__init__.py
2012-11-15 14:32:45 -07:00
Seth House
6289b6bd8a Added index template 2012-11-15 14:32:30 -07:00
Seth House
e7993de3ac Use CherryPy builtin content type processors 2012-11-15 08:54:18 -07:00
Seth House
8ecbbd6529 Success is determined by HTTP status code 2012-11-15 08:30:54 -07:00
Seth House
f0c4df9f87 Don't catch CherryPy exceptions 2012-11-14 21:37:19 -07:00
Seth House
37e3f7cb2c Use jinja templates for the html output 2012-11-14 17:30:13 -07:00
Seth House
92c8d7dfc9 Moved rest_cherrypy module into a package 2012-11-14 15:28:20 -07:00
Seth House
78b023e898 Replaced error page with try..except to work with the hypermedia handler 2012-11-14 12:24:32 -07:00
Seth House
d84c5ea740 Changed value of authentication header; still arbitrary and custom 2012-11-14 09:15:24 -07:00
Seth House
2ea3a06a6a Enable gzipping output 2012-11-14 09:15:24 -07:00
Seth House
6f24a47a11 Moved the hypermedia handler into individual functions 2012-11-14 09:15:24 -07:00
Seth House
765c502f05 Tweaked salt_auth for better use as a tool 2012-11-14 09:02:31 -07:00
Seth House
f1dd9dbdaa Removed SimpleTool; not needed for multiple hooks 2012-11-14 09:00:33 -07:00
Seth House
7a319e36c5 Moved fmt_lowdata into a module-level function 2012-11-14 08:59:16 -07:00
Seth House
1467824c0b Import yaml from salt.utils instead 2012-11-14 08:57:30 -07:00
Seth House
6f6027631f Updated fetching opts to not namespace all opts under 'saltapi' 2012-11-14 08:55:47 -07:00
Seth House
473958fd84 Added a hypermedia handler for accepting/sending various content types 2012-11-08 01:03:10 -07:00
Seth House
93837afaac Removed placeholder comment
Streaming responses will be set in the individual handlers.
2012-11-07 23:47:51 -07:00
Seth House
07fd5c4ff4 Added custom authorization tool and login handler 2012-11-07 23:46:24 -07:00
Seth House
f8f8e2c241 Removed old comments 2012-11-02 16:14:47 -06:00
Seth House
db7d98b7a7 Added custom SessionAuth subclass 2012-11-02 16:13:05 -06:00
Seth House
d353eb2b4b Change root URL command to issue a compound command 2012-11-02 11:59:37 -06:00
Seth House
7cd10b4b62 Added GET response to the root URL to fetch minion infos 2012-11-01 14:28:51 -06:00
Seth House
38c95ed144 Factored out executing lowdata into something reusable 2012-11-01 14:27:31 -06:00
Seth House
673e6caa40 Added reminder note about enabling streaming responses 2012-11-01 11:54:10 -06:00
Seth House
cba4b0976b Gracefully shutdown on a sigint (don't see KeyboardInterrupt from here) 2012-11-01 11:45:53 -06:00
Thomas S Hatch
2e66ca9181 Add wheel function to the api class 2012-11-01 11:43:57 -06:00
Seth House
a676fe08f4 Simplified lookup for grabbing global conf values 2012-11-01 11:28:38 -06:00
Seth House
8665b627f9 Format all JSON through Salt 2012-11-01 11:27:59 -06:00
Seth House
a1b2c478b8 Fixed incorrect variable names 2012-11-01 10:27:54 -06:00
Seth House
0e0cd7e189 Removed unused import 2012-11-01 10:27:35 -06:00
Seth House
02a8c39446 Updated imports from standalone cheroot to cherrypy proper 2012-11-01 10:19:01 -06:00
Seth House
836ffdebae Return the reponse from low-data calls as JSON 2012-11-01 10:18:07 -06:00
Seth House
f91847a5fe Added a default error page to return errors as JSON 2012-11-01 10:17:10 -06:00
Seth House
c57399a1a3 Updated formatting low-data for CherryPy 2012-11-01 10:09:29 -06:00
Seth House
18e29551b8 Added REST module written in CherryPy 2012-10-30 16:55:10 -06:00
Seth House
a33e01a580 Added secret_key to config 2012-10-29 14:35:08 -06:00
Seth House
b0dd811561 Fixed comment for the ca -> tls module 2012-10-29 14:32:57 -06:00
Seth House
c1cddf4a5f Only set cookies over SSL 2012-10-29 14:31:37 -06:00
Seth House
aa10e39e40 Updated config names for the SSL cert/key 2012-10-29 13:10:25 -06:00
Seth House
26ab78ba2a Switched to using the cheroot server with SSL (and using __opts__)
Fixes #16 and fixes #18
2012-10-26 14:08:26 -06:00
Seth House
a10eaa89f2 Copy pulling version from Git from Salt 2012-10-25 15:09:46 -06:00
Seth House
0249292a47 Reigned in some wild imports 2012-10-24 16:32:12 -06:00
Seth House
b6071638b9 Minor tweaks/fixes to the runner and inspect functions 2012-10-24 12:14:01 -06:00
Seth House
ae3d1595b0 Added root URL view to utilize the new low-data interface 2012-10-24 12:13:58 -06:00
Thomas S Hatch
e172a65a6a bump version to 0.6.0 2012-10-24 10:31:05 -06:00
Thomas S Hatch
bc3d492791 port format_all to salt-api pending updates in salt core 2012-10-24 10:26:38 -06:00
Thomas S Hatch
3bade9d625 Add API wrapper to saltapi 2012-10-17 12:41:00 -06:00
Seth House
cfff36f78a Improve / correct view docstrings 2012-10-16 16:59:32 -06:00
Seth House
0bf51dc1c8 Run salt-api out of the CLI entry point; use Salt's parser mixins 2012-10-09 20:13:10 -06:00
Seth House
a987233030 Replaced copy-and-pasted salt-cloud references 2012-10-09 17:15:40 -06:00
Seth House
f7b270a56f Updated runner to use the new RunnerClient 2012-10-09 16:06:22 -06:00
Seth House
84640ee38c Moved awesomer remote ex functionality to /minions URIs 2012-10-09 16:03:11 -06:00
Seth House
93e04d3a30 Also serve custom error page on HTTPException's 2012-10-08 16:20:06 -06:00
Seth House
9f75c09635 Renamed bind to start to be more consistent with other Saltnesses 2012-10-08 16:20:06 -06:00
Seth House
0ddecd11ef Pass the Flask app into the view class 2012-10-08 16:20:05 -06:00
Thomas S Hatch
905a110345 negate the need to pass in alternative base_path args
This fixes using built in salt apis
2012-10-08 16:17:55 -06:00
Seth House
926fab516f Avoid the Werkzeug debugger on errors and return JSON 2012-10-02 14:49:44 -06:00
Seth House
408c46fb9f Dangit, Tom 2012-10-02 14:41:01 -06:00
Seth House
35c29b3f6c Added basic runners interface 2012-10-01 16:15:55 -06:00
Seth House
a33e885957 Removed casting jid arg to an int 2012-10-01 16:00:14 -06:00
Seth House
bc5f8c7751 Import werkzeug exceptions wholesale 2012-10-01 15:59:41 -06:00
Seth House
28f6371ae1 Removed empty __init__() 2012-10-01 15:58:14 -06:00
Seth House
4f6d77a40b Fixed missing *args, **kwargs; this is all Tom's fault 2012-10-01 14:22:10 -06:00
Seth House
89993bfb45 Fixed Tom's restoration from Tom's fix 2012-10-01 14:00:57 -06:00
Thomas S Hatch
a64d7dabe9 make a base class again 2012-10-01 13:41:58 -06:00
Thomas S Hatch
ca477006ce we were not jsonify-ing 2012-10-01 13:23:36 -06:00
Thomas S Hatch
ee76aac6f4 Some cleanup
Change the Flask loader to hold the runner functions and the
localclient. Fix spacing, only have one class, remove unused
get methods
2012-10-01 12:57:46 -06:00
Thomas S Hatch
2ea6dcc532 Bypass loader basepath in runner dict generation 2012-10-01 12:56:39 -06:00
Thomas S Hatch
e11b9164d6 clean up extra empy line 2012-10-01 11:37:32 -06:00