Browse Source

Fix WampAgent rpc side and requirements

Change-Id: Ib79ae987fb6a0381913d6edb85c5fbc0d03d22f9
Fabio Verboso 7 months ago
parent
commit
094eae7851
2 changed files with 15 additions and 0 deletions
  1. 14
    0
      iotronic/wamp/agent.py
  2. 1
    0
      requirements.txt

+ 14
- 0
iotronic/wamp/agent.py View File

@@ -18,6 +18,7 @@ import time
18 18
 import txaio
19 19
 
20 20
 from iotronic.common import exception
21
+from iotronic.common.i18n import _
21 22
 from iotronic.common.i18n import _LI
22 23
 from iotronic.common.i18n import _LW
23 24
 from iotronic.db import api as dbapi
@@ -37,6 +38,18 @@ from autobahn.asyncio.component import Component
37 38
 
38 39
 LOG = logging.getLogger(__name__)
39 40
 
41
+service_opts = [
42
+    cfg.StrOpt('notification_level',
43
+               choices=[('debug', _('"debug" level')),
44
+                        ('info', _('"info" level')),
45
+                        ('warning', _('"warning" level')),
46
+                        ('error', _('"error" level')),
47
+                        ('critical', _('"critical" level'))],
48
+               help=_('Specifies the minimum level for which to send '
49
+                      'notifications. If not set, no notifications will '
50
+                      'be sent. The default is for this option to be unset.')),
51
+]
52
+
40 53
 wamp_opts = [
41 54
     cfg.StrOpt('wamp_transport_url',
42 55
                default='ws://localhost:8181/',
@@ -62,6 +75,7 @@ wamp_opts = [
62 75
 ]
63 76
 
64 77
 CONF = cfg.CONF
78
+cfg.CONF.register_opts(service_opts)
65 79
 CONF.register_opts(wamp_opts, 'wamp')
66 80
 
67 81
 txaio.start_logging(level="info")

+ 1
- 0
requirements.txt View File

@@ -17,4 +17,5 @@ autobahn>=0.10.1  # MIT License
17 17
 python-neutronclient>=6.7.0 # Apache-2.0
18 18
 pecan!=1.0.2,!=1.0.3,!=1.0.4,!=1.2,>=1.0.0 # BSD
19 19
 PyMySQL>=0.7.6  # MIT License
20
+osprofiler>=1.5.0 # Apache-2.0
20 21
 WSME>=0.8  # MIT

Loading…
Cancel
Save