示例#1
0
 def configure(self, config):
     # The request_path tells the http_server which url requests
     #   should be sent to this handler.  It can be a regular expression
     #   as defined in the documentation for the python re module.
     set_attribute(self, 'request_path', '/nodebrowser', config)
     set_attribute(self, 'secured', False, config, as_boolean)
     RequestHandler.configure(self, config)
示例#2
0
文件: nodes.py 项目: mcruse/monotone
 def configure(self, config):
     # The request_path tells the http_server which url requests
     #   should be sent to this handler.  It can be a regular expression
     #   as defined in the documentation for the python re module.
     set_attribute(self, 'request_path', '/nodebrowser', config)
     self.secured = as_internal_node("/services").secured
     RequestHandler.configure(self, config)
 def configure(self, config):
     set_attribute(self, 'request_path', REQUIRED, config)
     set_attribute(self, 'gm_time', 0, config, as_boolean)
     RequestHandler.configure(self, config)
     self.time = _TimeStore(self)
     self.time_function = time.localtime
     if self.gm_time:
         self.time_function = time.gmtime
示例#4
0
 def configure(self, config):
     # The request_path tells the http_server which url requests
     #   should be sent to this handler.  It can be a regular expression
     #   as defined in the documentation for the python re module.
     set_attribute(self, 'request_path', '/backup', config)
     self.secured = as_internal_node("/services").secured
     RequestHandler.configure(self, config)
     return
示例#5
0
 def configure(self, config):
     # The request_path tells the http_server which url requests
     #   should be sent to this handler.  It can be a regular expression
     #   as defined in the documentation for the python re module.
     set_attribute(self, 'request_path', '^/msglog/.*|^/msglog$', config)
     RequestHandler.configure(self, config)
     self.http_published_root = properties.HTTP_ROOT
     self.handlers = []
     self.install_handlers()
示例#6
0
 def configure(self, config):
     # The request_path tells the http_server which url requests
     #   should be sent to this handler.  It can be a regular expression
     #   as defined in the documentation for the python re module.
     set_attribute(self, 'request_path', '^/msglog/.*|^/msglog$', config)
     RequestHandler.configure(self, config)
     self.http_published_root = properties.HTTP_ROOT 
     self.handlers = []
     self.install_handlers()  
示例#7
0
 def configure(self, config):
     # The request_path tells the http_server which url requests
     #   should be sent to this handler.  It can be a regular expression
     #   as defined in the documentation for the python re module.
     set_attribute(self, 'request_path', '/enerwise', config)
     set_attribute(self, 'minimum_backup', 1, config, _days_to_seconds)
     set_attribute(self, 'type', 'exporter', config)
     set_attribute(self, 'log', REQUIRED, config, as_node)
     RequestHandler.configure(self, config)
     self.time = _TimeStore(self)
示例#8
0
文件: xmlrpc.py 项目: mcruse/monotone
 def configure(self, config):
     RequestHandler.configure(self, config)
     ##
     # @attribute log_n_exceptions:
     #   log_n_exceptions == 0 - don't log RNA exceptions
     #   log_n_exceptions <  0 - log all RNA exceptions
     #   log_n_exceptions >  0 - log LOG_N_EXCEPTIONS RNA exceptions and
     #                           then stop.
     set_attribute(self, 'log_n_exceptions', 0, config)
     return
示例#9
0
 def configure(self, config):
     # The request_path tells the http_server which url requests
     #   should be sent to this handler.  It can be a regular expression
     #   as defined in the documentation for the python re module.
     set_attribute(self, "request_path", "/configfile", config)
     set_attribute(self, "debug", 0, config, as_boolean)
     set_attribute(self, "safe_save", 1, config, as_boolean)
     set_attribute(self, "keep_backup", 0, config, as_boolean)
     set_attribute(self, "authentication", "BASIC", config)
     RequestHandler.configure(self, config)
示例#10
0
 def configure(self, config):
     # The request_path tells the http_server which url requests
     #   should be sent to this handler.  It can be a regular expression
     #   as defined in the documentation for the python re module.
     set_attribute(self, 'request_path', '/configfile', config)
     set_attribute(self, 'debug', 0, config, as_boolean)
     set_attribute(self, 'safe_save', 1, config, as_boolean)
     set_attribute(self, 'keep_backup', 0, config, as_boolean)
     set_attribute(self, 'authentication', "BASIC", config)
     RequestHandler.configure(self, config)
示例#11
0
 def configure(self, config):
     RequestHandler.configure(self, config)
     ##
     # @attribute log_n_exceptions:
     #   log_n_exceptions == 0 - don't log RNA exceptions
     #   log_n_exceptions <  0 - log all RNA exceptions
     #   log_n_exceptions >  0 - log LOG_N_EXCEPTIONS RNA exceptions and
     #                           then stop.
     set_attribute(self, 'log_n_exceptions', 0, config)
     return
示例#12
0
 def configure(self, config):
     # The request_path tells the http_server which url requests
     #   should be sent to this handler.  It can be a regular expression
     #   as defined in the documentation for the python re module.
     set_attribute(self, 'request_path', '/enerwise', config)
     set_attribute(self, 'minimum_backup', 1, config, _days_to_seconds)
     set_attribute(self, 'type', 'exporter', config)
     set_attribute(self, 'log', REQUIRED, config, as_node)
     RequestHandler.configure(self, config)
     self.time = _TimeStore(self)
示例#13
0
 def configure(self, config):
     # The request_path tells the http_server which url requests
     #   should be sent to this handler.  It can be a regular expression
     #   as defined in the documentation for the python re module.
     set_attribute(self, 'request_path', REQUIRED, config)
     set_attribute(self, 'log', REQUIRED, config, as_node)
     set_attribute(self, 'gm_time', 0, config, as_boolean)
     RequestHandler.configure(self, config)
     self.time = _TimeStore(self)
     self.time_function = time.localtime
     if self.gm_time:
         self.time_function = time.gmtime
示例#14
0
 def configure(self, config):
     # The request_path tells the http_server which url requests
     #   should be sent to this handler.  It can be a regular expression
     #   as defined in the documentation for the python re module.
     set_attribute(self, 'request_path', REQUIRED, config)
     set_attribute(self, 'log', REQUIRED, config, as_node)
     set_attribute(self, 'gm_time', 0, config, as_boolean)
     RequestHandler.configure(self, config)
     self.time = _TimeStore(self)
     self.time_function = time.localtime
     if self.gm_time:
         self.time_function = time.gmtime
示例#15
0
 def configure(self, config):
     # The request_path tells the http_server which url requests
     #   should be sent to this handler.  It can be a regular expression
     #   as defined in the documentation for the python re module.
     set_attribute(self, 'request_path', '/xmlrpc', config)
     set_attribute(self, 'deployed_objects', [], config)
     set_attribute(self, 'debug', 0, config)
     # requires_authentication is deprecated; provides_security more obvious.
     provides_security = config.get('requires_authentication', 1)
     set_attribute(self, 'provides_security', provides_security, config,
                   as_boolean)
     self.secured = as_internal_node("/services").secured
     RequestHandler.configure(self, config)
     if self.secured:
         rna_xmlrpc = 'mpx.lib.xmlrpc.rna_xmlrpc.SecuredXmlRpcHandler'
         rna_xmlrpc2 = 'mpx.lib.xmlrpc.rna_xmlrpc.SecuredXmlRpcHandler2'
     else:
         rna_xmlrpc = 'mpx.lib.xmlrpc.rna_xmlrpc.RNA_XMLRPC_Handler'
         rna_xmlrpc2 = 'mpx.lib.xmlrpc.rna_xmlrpc.RNA_XMLRPC_Handler2'
     ## Pre-Register important XMLRPC Objects such RNA
     ## rna_xmlrpc -- Default RNA over XMLRPC handler
     child = XMLRPC_Deploy()
     params = {
         'name': 'rna_xmlrpc',
         'alias': 'rna_xmlrpc',
         'class_name': rna_xmlrpc,
         'lifetime': 'Runtime',
         'parent': self
     }
     child.configure(params)
     ## rna_xmlrpc2 -- Next Generation RNA over XMLRPC handler
     child = XMLRPC_Deploy()
     params = {
         'name': 'rna_xmlrpc2',
         'alias': 'rna_xmlrpc2',
         'class_name': rna_xmlrpc2,
         'lifetime': 'Runtime',
         'parent': self
     }
     child.configure(params)
示例#16
0
文件: xmlrpc.py 项目: mcruse/monotone
 def configure(self, config):
     # The request_path tells the http_server which url requests
     #   should be sent to this handler.  It can be a regular expression
     #   as defined in the documentation for the python re module.
     set_attribute(self, 'request_path', '/XMLRPCv2', config)
     set_attribute(self, 'debug', 0, config)
     # requires_authentication is deprecated; provides_security more obvious.
     provides_security = config.get('requires_authentication', 1)
     set_attribute(
         self, 'provides_security', provides_security, config, as_boolean)
     self.secured = as_internal_node("/services").secured
     set_attribute(self, 'authentication', 'basic', config)
     if self.authentication not in ('digest','basic','form'):
         raise EInvalidValue('authentication',self.authentication,
                             'Authentication scheme not recognized.')
     RequestHandler.configure(self, config)
     # create the inherient child RNA
     if not self.has_child('RNA'):
         rna = RNA()
         config = {'parent':self,'name':'RNA', 'log_n_exceptions':0}
         rna.configure(config)
     return
示例#17
0
 def configure(self, config):
     # The request_path tells the http_server which url requests
     #   should be sent to this handler.  It can be a regular expression
     #   as defined in the documentation for the python re module.
     set_attribute(self, 'request_path', '/XMLRPCv2', config)
     set_attribute(self, 'debug', 0, config)
     # requires_authentication is deprecated; provides_security more obvious.
     provides_security = config.get('requires_authentication', 1)
     set_attribute(self, 'provides_security', provides_security, config,
                   as_boolean)
     self.secured = as_internal_node("/services").secured
     set_attribute(self, 'authentication', 'basic', config)
     if self.authentication not in ('digest', 'basic', 'form'):
         raise EInvalidValue('authentication', self.authentication,
                             'Authentication scheme not recognized.')
     RequestHandler.configure(self, config)
     # create the inherient child RNA
     if not self.has_child('RNA'):
         rna = RNA()
         config = {'parent': self, 'name': 'RNA', 'log_n_exceptions': 0}
         rna.configure(config)
     return
示例#18
0
 def configure(self, config):
     # The request_path tells the http_server which url requests
     #   should be sent to this handler.  It can be a regular expression
     #   as defined in the documentation for the python re module.
     set_attribute(self, 'request_path', '/xmlrpc', config)
     set_attribute(self, 'deployed_objects',[],config)
     set_attribute(self, 'debug', 0, config)
     # requires_authentication is deprecated; provides_security more obvious.
     provides_security = config.get('requires_authentication', 1)
     set_attribute(
         self, 'provides_security', provides_security, config, as_boolean)
     self.secured = as_internal_node("/services").secured
     RequestHandler.configure(self, config)
     if self.secured:
         rna_xmlrpc = 'mpx.lib.xmlrpc.rna_xmlrpc.SecuredXmlRpcHandler'
         rna_xmlrpc2 = 'mpx.lib.xmlrpc.rna_xmlrpc.SecuredXmlRpcHandler2'
     else:
         rna_xmlrpc = 'mpx.lib.xmlrpc.rna_xmlrpc.RNA_XMLRPC_Handler'
         rna_xmlrpc2 = 'mpx.lib.xmlrpc.rna_xmlrpc.RNA_XMLRPC_Handler2'
     ## Pre-Register important XMLRPC Objects such RNA
     ## rna_xmlrpc -- Default RNA over XMLRPC handler
     child = XMLRPC_Deploy()
     params = {'name':'rna_xmlrpc',
               'alias':'rna_xmlrpc',
               'class_name': rna_xmlrpc,
               'lifetime':'Runtime',
               'parent':self}
     child.configure(params)
     ## rna_xmlrpc2 -- Next Generation RNA over XMLRPC handler
     child = XMLRPC_Deploy()
     params = {'name':'rna_xmlrpc2',
               'alias':'rna_xmlrpc2',
               'class_name': rna_xmlrpc2,
               'lifetime':'Runtime',
               'parent':self}
     child.configure(params)
示例#19
0
 def configure(self, config):
     RequestHandler.configure(self, config)
     set_attribute(self,'request_path','alarms',config)
示例#20
0
 def configure(self, config):
     # The request_path tells the http_server which url requests
     #   should be sent to this handler.  It can be a regular expression
     #   as defined in the documentation for the python re module.
     set_attribute(self, 'request_path', '^/properties$', config)
     RequestHandler.configure(self, config)
示例#21
0
 def configure(self, config):
     RequestHandler.configure(self, config)
     set_attribute(self, 'request_path', 'alarms', config)
 def configure(self, config):
     # The request_path tells the http_server which url requests
     #   should be sent to this handler.  It can be a regular expression
     #   as defined in the documentation for the python re module.
     set_attribute(self, 'request_path', '^/properties$', config) 
     RequestHandler.configure(self, config)
示例#23
0
 def configure(self, config):
     RequestHandler.configure(self, config)
     set_attribute(self, 'request_path', '.*\.psp$', config)
     set_attribute(self, 'provides_security', 1, config, as_boolean)
     self.secured = as_boolean(as_internal_node("/services").secured)
     self.request_regex = re.compile(self.request_path)
示例#24
0
 def configure(self,config):
     RequestHandler.configure(self,config)
     set_attribute(self,'request_path','.*\.psp$',config)
     set_attribute(self, 'provides_security', 1, config, as_boolean)
     self.secured = as_boolean(as_internal_node("/services").secured)
     self.request_regex = re.compile(self.request_path)