Hey all, The webserver has undergone drastic revisions to now share code with publish_manifest. The two programs both have usage messages which should be relatively self explanatory. However, a break down of the directory structure follows: bin/webserver.py: Run via `python webserver.py <location of A/I service>` bin/publish_manifest.py: Run as root `python publish_manifest -c <criteria manifest> <src A/I manifest> <location of A/I service>` var/AI_service_1 Example partially populated A/I service directory var/AI_service_1/AI.db Current demo A/I webserver database var/AI_service_1/AI_files/ Files shared by the webserver at http://<hostname>:<port>/ai-files/<file name> (does not generate an index, should contain links to zlib's) var/AI_service_1/AI_data/ Files shared by the webserver at http://<hostname>:<port>/manifest/<file name> (does not generate an index, should contain actual A/I manifest files) export/home/jack Contains example A/I, Criteria, and SMF manifests
This code will shortly be integrated into the framework Sundar sent out this morning, however, until then, feedback would be appreciated on its operation and design. Webrev: http://cr.opensolaris.org/~clayb/AI_server/webrev/ Code: http://cr.opensolaris.org/~clayb/AI_server/AI_servea.finalCut.tgz Thank you, Clay On Mon, 15 Sep 2008, Clay Baenziger wrote: > Hello all, > I have written a prototype A/I webserver to serve files and A/I > manifests for the November release. The code and some example > databases are available at: > http://cr.opensolaris.org/~clayb/AI_server/AI_server.tgz > > This is only the webserver, however, and not the associated > manifest publishing utility to populate the server. I have included > databases and files to test various aspects, however: > AI.db.populated (which has a test with two manifests having overlapping > criteria -- shouldn't be allowed by publish_manifest and > generates an error) > AI.db.empty (which only has a schema but no entries - to test serving > simply a default manifest) > AI.db.populated2(this shows that the webserver and the DB format is > extensibility allowing extra criteria to be added modularly > though we will not be supporting such features for > November) > > To work with these databases rename the one to work with, as AI.db in the > AI_server directory. > > Similarly, you'll see I've two temporary files manifest[12].xml but no > manifest3.xml. This should generate a 404 Not Found error, if one matches > the correct criteria in AI.db.populated. Lastly, to serve the solaris.zlib > files there's also a /ai-files server path which serves out of AI_files. > > Next, try the following paths to request manifests: > /manifest.xml > /manifest.html > Both should accept data via POST with key value pairs such as: > MAC=c0ffee01;Ip=192168001002;arch=sun4v > > And lastly, to run the server run 'python webserver.py', you'll need the > CherryPy (http://cherrypy.org) and PySQLite2 (http://pysqlite.org) > Python modules. > > Thank you, > Clay > _______________________________________________ > caiman-discuss mailing list > caiman-discuss at opensolaris.org > http://mail.opensolaris.org/mailman/listinfo/caiman-discuss >