Author: tmckay
Date: 2011-11-02 19:45:30 +0000 (Wed, 02 Nov 2011)
New Revision: 5105
Removed:
trunk/cumin/etc/cumin.crt
trunk/cumin/etc/cumin.key
trunk/cumin/python/cumin/tools.py
trunk/cumin/python/cumin/usergrid/submission.py
Modified:
trunk/cumin/python/cumin/inventory/main.strings
trunk/cumin/python/cumin/messaging/main.strings
Log:
Modifications arising out of rpmlint on the cumin package.
- Remove cumin.crt, cumin.key, and tools.py. The functionality
here is no longer used (benchmarking, test harness, and ssl).
If we need these things we can revisit.
- Add dummy tags to inventory/main.strings and
messaging/main.strings to prevent 0 length errors.
- Remove empty usergrid/submission.py
Deleted: trunk/cumin/etc/cumin.crt
===================================================================
--- trunk/cumin/etc/cumin.crt 2011-11-01 19:06:44 UTC (rev 5104)
+++ trunk/cumin/etc/cumin.crt 2011-11-02 19:45:30 UTC (rev 5105)
@@ -1,40 +0,0 @@
------BEGIN RSA PRIVATE KEY-----
-MIICXQIBAAKBgQC8zL7h6pevyBeme9LMDvCKEBOzKuBMr4QUsnsBdKa+DO21wZWd
-X3h/GKhV7ELgl7j/G4lZVYyy8jbFa7YlEawrTucryIv6VVCI4nKnw6KuclHP0UTm
-niENl6grDqu3s7cEom02nQTjtRAVn/2Tx+VO5b9M6u+4SNm686DdvH/7bwIDAQAB
-AoGBAJv4VVUTVX6dQZSCxLFZQjP8dhnUuPoBIY9rpxybvshQq+w0YaJh5Yyx1Rcu
-mE0samMt33jSqOqIGOFdS1syT1UFwdfN2PjoPCdwlkEefN1yOqlU3IYUs0AcU8Vt
-+HZfR5nCZl0lzV8bHVTOhkYBHvsTKT1RTqd6A6gPD2WMkt4xAkEA+SdLRmxigF5i
-1E02C2D3REVgdMG/8/s+y03QD1/eYb0T8H6RsUqdPbz7TfLdjBZSGe2Lqwaluq1E
-sc4ZDEhnlwJBAMH84oKGwO4XWTVQIPqZ0yNwAyi32Wk8FsHH484beJjvexclyysC
-kDoNURq1tP4wLInAs7gYzoBLkw3sHBCCRekCQF3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OJyp8OirnJRz9FE5p4hDZeoKw6rt7O3
-BKJtNp0E47UQFZ/9k8flTuW/TOrvuEjZuvOg3bx/+28CAwEAAaOCASQwggEgMB0G
-A1UdDgQWBBSG2ASHUAYMHesFOdIuwEP2JXLRETCB8AYDVR0jBIHoMIHlgBSG2ASH
-UAYMHesFOdIuwEP2JXLREaGBwaSBvjCBuzELMAkGA1UEBhMCLS0xEjAQBgNVBAgT
-CVNvbWVTdGF0ZTERMA8GA1UEBxMIU29tZUNpdHkxGTAXBgNVBAoTEFNvbWVPcmdh
-bml6YXRpb24xHzAdBgNVBAsTFlNvbWVPcmdhbml6YXRpb25hbFVuaXQxHjAcBgNV
-BAMTFWxvY2FsaG9zdC5sb2NhbGRvbWFpbjEpMCcGCSqGSIb3DQEJARYacm9vdEBs
-b2NhbGhvc3QubG9jYWxkb21haW6CCQCxcOENjls0ODAMBgNVHRMEBTADAQH/MA0G
-CSqGSIb3DQEBBQUAA4GBABAhLdp86AYqfd7g1ICfeXyQK9rAvg6dAzgND6PFE0mc
-8aBYGT7vkFFv97cxxfjtDlRpjfsxdIlKxeZZ2JpP0pW6DUdn243CUZ+4g0AYSUs6
-OboH5gkG03eJGYT1w8+7F13DQFAEvEwAtf28xItlH3Y4YeXU3Z5U/mpY+Rh6vlxk
------END CERTIFICATE-----
Deleted: trunk/cumin/etc/cumin.key
===================================================================
--- trunk/cumin/etc/cumin.key 2011-11-01 19:06:44 UTC (rev 5104)
+++ trunk/cumin/etc/cumin.key 2011-11-02 19:45:30 UTC (rev 5105)
@@ -1 +0,0 @@
-link cumin.crt
\ No newline at end of file
Modified: trunk/cumin/python/cumin/inventory/main.strings
===================================================================
--- trunk/cumin/python/cumin/inventory/main.strings 2011-11-01 19:06:44 UTC (rev 5104)
+++ trunk/cumin/python/cumin/inventory/main.strings 2011-11-02 19:45:30 UTC (rev 5105)
@@ -0,0 +1 @@
+[thisSpaceIntentionallyLeftBlank]
\ No newline at end of file
Modified: trunk/cumin/python/cumin/messaging/main.strings
===================================================================
--- trunk/cumin/python/cumin/messaging/main.strings 2011-11-01 19:06:44 UTC (rev 5104)
+++ trunk/cumin/python/cumin/messaging/main.strings 2011-11-02 19:45:30 UTC (rev 5105)
@@ -0,0 +1 @@
+[thisSpaceIntentionallyLeftBlank]
\ No newline at end of file
Deleted: trunk/cumin/python/cumin/tools.py
===================================================================
--- trunk/cumin/python/cumin/tools.py 2011-11-01 19:06:44 UTC (rev 5104)
+++ trunk/cumin/python/cumin/tools.py 2011-11-02 19:45:30 UTC (rev 5105)
@@ -1,247 +0,0 @@
-import sys, os, re, signal
-
-from mint import *
-from parsley.config import *
-from parsley.command import *
-from wooly.bench import *
-from time import sleep
-
-from util import *
-from cumin import Cumin
-from cumin.account.model import *
-from cumin.config import CuminConfig
-from cumin.server import CuminServer
-from test import *
-
-class BaseCuminTool(Command):
- def __init__(self, name):
- super(BaseCuminTool, self).__init__(None, name)
-
- self.config = CuminConfig()
-
- opt = CommandOption(self, "data")
- opt.argument = "URI"
- opt.description = "Connect to database at URI"
-
- opt = CommandOption(self, "qmf")
- opt.argument = "URI"
- opt.description = "Connect to QMF server at URI"
-
- opt = CommandOption(self, "log-file")
- opt.argument = "PATH"
- opt.description = "Log to file at PATH"
-
- opt = CommandOption(self, "log-level")
- opt.argument = "LEVEL"
- opt.description = "Log messages at or above LEVEL " + \
- "('debug', 'info', 'warn',
'error')"
-
- opt = CommandOption(self, "debug")
- opt.description = "Enable debugging; print logging to console"
-
- def check(self):
- if os.getuid() not in (os.stat(sys.argv[0]).st_uid, 0):
- print "Error: You have insufficient privileges"
- sys.exit(1)
-
- def init(self):
- super(BaseCuminTool, self).init()
-
- # Drop privileges
-
- if os.getuid() == 0:
- os.setuid(os.stat(sys.argv[0]).st_uid)
-
- self.config.init()
-
- def run(self):
- try:
- opts, args = self.parse(sys.argv)
- except CommandException, e:
- print "Error: %s" % e
- e.command.print_help()
- sys.exit(1)
-
- if "help" in opts:
- self.print_help()
- sys.exit(0)
-
- self.config.load_dict(opts)
-
- if self.config.debug:
- self.config.prt()
-
- self.do_run(opts, args)
-
- def do_run(self, opts, args):
- raise Exception("Not implemented")
-
- def main(self):
- self.check()
- self.init()
- self.run()
-
-class CuminServerTool(BaseCuminTool):
- def __init__(self, name):
- super(CuminServerTool, self).__init__(name)
-
- self.description = "Cumin web server"
-
- param = ConfigParameter(self.config, "addr", str)
- param.default = "localhost"
-
- param = ConfigParameter(self.config, "port", int)
- param.default = 45672
-
- param = ConfigParameter(self.config, "ssl", bool)
- param.default = False
-
- opt = CommandOption(self, "addr")
- opt.argument = "ADDR"
- opt.description = "Run web server at address ADDR"
-
- opt = CommandOption(self, "port")
- opt.argument = "PORT"
- opt.description = "Run web server on port PORT"
-
- opt = CommandOption(self, "ssl")
- opt.description = "Serve web pages using SSL"
-
- def do_run(self, opts, args):
- app = Cumin(self.config)
-
- try:
- app.check()
- except Exception, e:
- log.exception(e)
- sys.exit(1)
-
- app.init()
-
- server = CuminServer(app, self.config.addr, self.config.port)
- server.init()
-
- if self.config.ssl:
- cpath = os.path.join(self.config.home, "etc",
"cumin.crt")
- kpath = os.path.join(self.config.home, "etc",
"cumin.key")
-
- if os.path.isfile(cpath):
- server.set_ssl_cert_path(cpath)
- else:
- log.error("SSL certificate file '%s' not found" %
cpath)
- sys.exit(1)
-
- if os.path.isfile(kpath):
- server.set_ssl_key_path(kpath)
- else:
- log.error("SSL key file '%s' not found" % kpath)
- sys.exit(1)
-
- app.start()
-
- try:
- server.start()
-
- try:
- while True:
- print "Sleeping!"
-
- sleep(1)
- finally:
- server.stop()
- finally:
- app.stop()
-
-class CuminTestTool(BaseCuminTool):
- def __init__(self, name):
- super(CuminTestTool, self).__init__(name)
-
- self.description = "Cumin test tool"
-
- def do_run(self, opts, args):
- app = Cumin(self.config)
-
- try:
- app.check()
- except Exception, e:
- print e
-
- sys.exit(1)
-
- app.init()
- app.start()
-
- try:
- test = CuminTest(app)
-
- harness = TestHarness(test)
-
- if len(args) < 2:
- harness.include.append("*")
- else:
- for pattern in args[1:]:
- harness.include.append(pattern)
-
- harness.init()
-
- session = harness.run()
-
- session.report()
- finally:
- app.stop()
-
-class CuminBenchTool(BaseCuminTool):
- def __init__(self, name):
- super(CuminBenchTool, self).__init__(name)
-
- self.description = "Cumin benchmarking tool"
-
- opt = CommandOption(self, "count")
- opt.argument = "COUNT"
- opt.description = "Stop after COUNT page hits; 0 means no limit"
-
- opt = CommandOption(self, "profile")
- opt.description = "Enable profiling"
-
- opt = CommandOption(self, "continue-on-error")
- opt.description = "Don't stop if a page load fails"
-
- opt = CommandOption(self, "check-output")
- opt.description = "Check that page output is well-formed xml"
-
- opt = CommandOption(self, "print-output")
- opt.description = "Print the rendered page to the console"
-
- opt = CommandOption(self, "broker")
- opt.argument = "ADDR"
- opt.description = "Use existing broker at ADDR"
-
- def do_run(self, opts, args):
- app = Cumin(self.config)
- app.debug = True
-
- try:
- app.check()
- except Exception, e:
- print e
-
- sys.exit(1)
-
- app.init()
- app.start()
-
- harness = BenchmarkHarness(app)
- harness.continue_on_error = "continue-on-error" in opts
- harness.check_output = "check-output" in opts
- harness.print_output = "print-output" in opts
-
- login = LoginSession(app, Subject.getByName("guest"))
-
- harness.client_session.attributes["login_session"] = login
-
- sleep(0.5) # XXXX! arrgh
-
- try:
- harness.run(int(opts.get("count", "1000")))
- finally:
- app.stop()
Deleted: trunk/cumin/python/cumin/usergrid/submission.py
===================================================================