예제 #1
0
 def configure(self, config):
     CompositeNode.configure(self, config)
     outputs = config.get('outputs', self.outputs)
     self.outputs = filter(None, outputs)
     if not self.has_child('Fan Out'):
         multiplexor = self.nodespace.create_node(MultiPlexor)
         multiplexor.configure({'name': 'Fan Out', 'parent': self})
     multiplexor = self.get_child('Fan Out')
     multiplexor.configure({'nodes': self.outputs})
     config['output'] = multiplexor
     PeriodicDriver.configure(self, config)
예제 #2
0
파일: exporter.py 프로젝트: mcruse/monotone
 def configuration(self):
     config = secure.SFTPTransporter.configuration(self)
     config.update(CompositeNode.configuration(self))
     for attrname in ftp_attrs:
         config.setdefault(attrname, '')
     config['transport_type'] = self.getattr('transport_type')
     return config
예제 #3
0
 def configuration(self):
     config = secure.SFTPTransporter.configuration(self)
     config.update(CompositeNode.configuration(self))
     for attrname in ftp_attrs:
         config.setdefault(attrname, '')
     config['transport_type'] = self.getattr('transport_type')
     return config
예제 #4
0
파일: exporter.py 프로젝트: mcruse/monotone
 def configuration(self):
     config = http_post_transporter.HTTPPostTransporter.configuration(self)
     config.update(CompositeNode.configuration(self))
     for attrname in ['post_url', 'chunked_data', 'debug', 'content_type',
                      'timeout', 'user', 'password']:
         config.setdefault(attrname, '')
     config['transport_type'] = self.getattr('transport_type')
     return config
예제 #5
0
파일: exporter.py 프로젝트: mcruse/monotone
 def configuration(self):
     config = smtp_transporter.SMTPTransporter.configuration(self)
     config.update(CompositeNode.configuration(self))
     for attrname in ['debug','host','port','authenticate','username',
                      'password','sender','recipients','subject',
                      'timeout','custom_domain','subtype','as_attachment']:
         config.setdefault(attrname,'')
     config['transport_type'] = self.getattr('transport_type')
     return config
예제 #6
0
 def configuration(self):
     config = PeriodicDriver.configuration(self)
     config.update(CompositeNode.configuration(self))
     if config.has_key('output'):
         del(config['output'])
     outputs = self.outputs[:]
     while len(outputs) < 10:
         outputs.append('')
     config['outputs'] = outputs
     return config
예제 #7
0
 def configuration(self):
     config = http_post_transporter.HTTPPostTransporter.configuration(self)
     config.update(CompositeNode.configuration(self))
     for attrname in [
             'post_url', 'chunked_data', 'debug', 'content_type', 'timeout',
             'user', 'password'
     ]:
         config.setdefault(attrname, '')
     config['transport_type'] = self.getattr('transport_type')
     return config
예제 #8
0
 def configuration(self):
     config = smtp_transporter.SMTPTransporter.configuration(self)
     config.update(CompositeNode.configuration(self))
     for attrname in [
             'debug', 'host', 'port', 'authenticate', 'username',
             'password', 'sender', 'recipients', 'subject', 'timeout',
             'custom_domain', 'subtype', 'as_attachment'
     ]:
         config.setdefault(attrname, '')
     config['transport_type'] = self.getattr('transport_type')
     return config
예제 #9
0
파일: exporter.py 프로젝트: mcruse/monotone
 def configure(self, config):
     http_post_transporter.HTTPPostTransporter.configure(self, config)
     self.setattr('transport_type', 'http-post')
     CompositeNode.configure(self, config)
예제 #10
0
파일: exporter.py 프로젝트: mcruse/monotone
 def __init__(self, *args):
     CompositeNode.__init__(self, *args)
     http_post_transporter.HTTPPostTransporter.__init__(self)
예제 #11
0
 def __init__(self, *args):
     CompositeNode.__init__(self, *args)
     standard.FTPTransporter.__init__(self)
예제 #12
0
파일: exporter.py 프로젝트: mcruse/monotone
 def configure(self, config):
     secure.SFTPTransporter.configure(self, config)
     self.setattr('transport_type', 'sftp')
     CompositeNode.configure(self, config)
예제 #13
0
 def configure(self, config):
     config.setdefault('subtype', 'html')
     smtp_transporter.SMTPTransporter.configure(self, config)
     self.setattr('transport_type', 'smtp')
     CompositeNode.configure(self, config)
예제 #14
0
 def __init__(self, *args):
     CompositeNode.__init__(self, *args)
     secure.SFTPTransporter.__init__(self)
예제 #15
0
파일: exporter.py 프로젝트: mcruse/monotone
 def configure(self, config):
     config.setdefault('subtype', 'html')
     smtp_transporter.SMTPTransporter.configure(self, config)
     self.setattr('transport_type', 'smtp')
     CompositeNode.configure(self, config)
예제 #16
0
    security.protect('get_name', 'View')

    def get_name(self):
        return self.name

    security.protect('set_name', 'Override')

    def set_name(self, name):
        self.name = name


from mpx.lib.node import as_node
try:
    test = as_node('/services/Security Test')
except KeyError:
    test = CompositeNode()
    test.configure({'name': 'Security Test', 'parent': '/services'})

try:
    node = as_node('/services/Security Test/Node')
except KeyError:
    node = Node()
    node.configure({'name': 'Node', 'parent': test})

sm = as_node('/services/Security Manager')
securednodes = []
assecurednodes = []
users = sm.user_manager.get_users()
for user in users:
    securednodes.append(query_multi_adapter((node, user), ISecure))
    assecurednodes.append(
예제 #17
0
 def start(self):
     return CompositeNode.start(self)
예제 #18
0
    secured_by(security)
    security.make_public('show_name')
    def show_name(self):
        print self.name
    security.protect('get_name', 'View')
    def get_name(self):
        return self.name
    security.protect('set_name', 'Override')
    def set_name(self, name):
        self.name = name

from mpx.lib.node import as_node
try:
    test = as_node('/services/Security Test')
except KeyError:
    test = CompositeNode()
    test.configure({'name': 'Security Test', 'parent': '/services'})

try:
    node = as_node('/services/Security Test/Node')
except KeyError:
    node = Node()
    node.configure({'name': 'Node', 'parent': test})

sm = as_node('/services/Security Manager')
securednodes = []
assecurednodes = []
users = sm.user_manager.get_users()
for user in users:
    securednodes.append(query_multi_adapter((node, user), ISecure))
    assecurednodes.append(sm.as_secured_node('/services/Security Test/Node', user))
예제 #19
0
 def configure(self, config):
     http_post_transporter.HTTPPostTransporter.configure(self, config)
     self.setattr('transport_type', 'http-post')
     CompositeNode.configure(self, config)
예제 #20
0
 def __init__(self, *args):
     CompositeNode.__init__(self, *args)
     http_post_transporter.HTTPPostTransporter.__init__(self)
예제 #21
0
 def configure(self, config):
     standard.FTPTransporter.configure(self, config)
     self.setattr('transport_type', 'ftp')
     CompositeNode.configure(self, config)
예제 #22
0
파일: exporter.py 프로젝트: mcruse/monotone
 def __init__(self, *args):
     CompositeNode.__init__(self, *args)
     smtp_transporter.SMTPTransporter.__init__(self)
예제 #23
0
 def start(self):
     self._output_cnt = len(self.outputs)
     PeriodicDriver.start(self)
     CompositeNode.start(self)
예제 #24
0
 def __init__(self, *args):
     self.dispatcher = None
     self._queue = None
     self._stopflag = None
     self._thread = None
     CompositeNode.__init__(self, *args)
예제 #25
0
 def configure(self, config):
     secure.SFTPTransporter.configure(self, config)
     self.setattr('transport_type', 'sftp')
     CompositeNode.configure(self, config)
예제 #26
0
 def stop(self):
     return CompositeNode.stop(self)
예제 #27
0
 def __init__(self, *args):
     self.dispatcher = None
     self._queue = None
     self._stopflag = None
     self._thread = None
     CompositeNode.__init__(self, *args)
예제 #28
0
 def __init__(self, *args):
     CompositeNode.__init__(self, *args)
     PeriodicDriver.__init__(self)
     self.outputs = []
     self._resolved = []
     self._unresolved = []
예제 #29
0
파일: exporter.py 프로젝트: mcruse/monotone
 def __init__(self, *args):
     CompositeNode.__init__(self, *args)
     standard.FTPTransporter.__init__(self)
예제 #30
0
파일: exporter.py 프로젝트: mcruse/monotone
 def configure(self, config):
     standard.FTPTransporter.configure(self, config)
     self.setattr('transport_type', 'ftp')
     CompositeNode.configure(self, config)
예제 #31
0
파일: exporter.py 프로젝트: mcruse/monotone
 def __init__(self, *args):
     CompositeNode.__init__(self, *args)
     secure.SFTPTransporter.__init__(self)
예제 #32
0
 def stop(self):
     PeriodicDriver.stop(self)
     CompositeNode.stop(self)
예제 #33
0
 def __init__(self, *args):
     CompositeNode.__init__(self, *args)
     smtp_transporter.SMTPTransporter.__init__(self)