Esempio n. 1
0
    def __init__(self, connection, config, handler=None):
        # Grab a copy of our config section
        self.config = config.section('DHCPAgent')

        # grab relevant settings
        queue_expire = int(self.config.get('queue_expire', 60))

        # Initialize logger
        self.logger = Logger(name='dhcpagent',
                             level=self.config['loglevel'],
                             handler=handler)

        # Parse agent conf
        self.qconfig = Config(self.config['conffile'], 'AGENT')

        # Initialize super
        NeutronAgent.__init__(self, self.qconfig, self.config, 'DHCP agent')

        # Initialize RPC bits
        RPC.__init__(self,
                     connection,
                     exopts={
                         'name': self.event_queue(),
                         'durable': False,
                         'type': 'topic'
                     },
                     qopts={
                         'name': 'rpcdaemon-dhcp_%s' % uuid4(),
                         'auto_delete': True,
                         'durable': False,
                         'routing_key': 'q-plugin',
                         'queue_arguments': {
                             'x-expires': queue_expire * 1000,
                         }
                     })
Esempio n. 2
0
    def __init__(self, connection, config, handler=None):
        # Grab a copy of our config section
        self.config = config.section("DHCPAgent")

        # grab relevant settings
        queue_expire = int(self.config.get("queue_expire", 60))

        # Initialize logger
        self.logger = Logger(name="dhcpagent", level=self.config["loglevel"], handler=handler)

        # Parse agent conf
        self.qconfig = Config(self.config["conffile"], "AGENT")

        # Initialize super
        NeutronAgent.__init__(self, self.qconfig, self.config, "DHCP agent")

        # Initialize RPC bits
        RPC.__init__(
            self,
            connection,
            exopts={"name": self.event_queue(), "durable": False, "type": "topic"},
            qopts={
                "name": "rpcdaemon-dhcp_%s" % uuid4(),
                "auto_delete": True,
                "durable": False,
                "routing_key": "q-plugin",
                "queue_arguments": {"x-expires": queue_expire * 1000},
            },
        )
Esempio n. 3
0
    def __init__(self, connection, config, handler=None):
        # Grab a copy of our config section
        self.config = config.section('Dump')

        # Initialize logger
        self.logger = Logger(
            name='dump',
            level=self.config['loglevel'],
            handler=handler
        )

        # Initialize RPC bits
        RPC.__init__(
            self,
            connection,
            exopts={
                'name': self.config.get('queue', 'neutron'),
                'durable': False,
                'type': 'topic'
            },
            qopts={
                'name': 'rpcdaemon-dump_%s' % uuid4(),
                'auto_delete': True,
                'durable': False,
                'routing_key': 'q-plugin'
            }
        )
    def __init__(self, connection, config, handler=None):
        # Grab a copy of our config section
        self.config = config.section('L3Agent')

        # grab relevant settings
        queue_expire = int(self.config.get('queue_expire', 60))

        # Initialize logger
        self.logger = Logger(
            name='l3agent',
            level=self.config['loglevel'],
            handler=handler
        )

        # Parse agent config
        self.qconfig = Config(self.config['conffile'], 'AGENT')

        # Initialize super
        NeutronAgent.__init__(self, self.qconfig, self.config, 'L3 agent')

        # Initialize RPC bits
        RPC.__init__(
            self,
            connection,
            exopts={
                'name': self.event_queue(),
                'durable': False,
                'type': 'topic'
            },
            qopts={
                'name': 'rpcdaemon-l3_%s' % uuid4(),
                'auto_delete': True,
                'durable': False,
                'routing_key': 'q-plugin',
                'queue_arguments': {
                    'x-expires': queue_expire * 1000,
                }
            }
        )
Esempio n. 5
0
    def __init__(self, connection, config, handler=None):
        # Grab a copy of our config section
        self.config = config.section('Dump')

        # Initialize logger
        self.logger = Logger(name='dump',
                             level=self.config['loglevel'],
                             handler=handler)

        # Initialize RPC bits
        RPC.__init__(self,
                     connection,
                     exopts={
                         'name': self.config.get('queue', 'neutron'),
                         'durable': False,
                         'type': 'topic'
                     },
                     qopts={
                         'name': 'rpcdaemon-dump_%s' % uuid4(),
                         'auto_delete': True,
                         'durable': False,
                         'routing_key': 'q-plugin'
                     })