Browse Source

Preparing infrastructure for events-api

Following change aims at setting up the
tooling for events-api againts latest
requirements and guideliness from OpenStack.
Removing old code , add basic structure of the python
modules. Add basic documentation and release notes.
Prepare to use oslo-config-generator.
Add devstack basic setup to the project.

Story: 2001112
Task: 4798

Change-Id: I76d737bf9d1216b041bc1a518cc2098f28e7da7b
Tomasz Trębski 1 year ago
parent
commit
5321635049
100 changed files with 1839 additions and 12522 deletions
  1. 3
    3
      .coveragerc
  2. 1
    0
      .gitignore
  3. 1
    1
      .gitreview
  4. 1
    0
      .testr.conf
  5. 0
    470
      README.md
  6. 53
    0
      README.rst
  7. 259
    0
      api-guide/source/conf.py
  8. 35
    0
      api-guide/source/index.rst
  9. 258
    0
      api-ref/source/conf.py
  10. 22
    0
      api-ref/source/index.rst
  11. 7
    0
      config-generator/README.md
  12. 6
    0
      config-generator/monasca-events-api.conf
  13. 0
    141
      demo/demo.py
  14. 0
    2527
      demo/files/event_templates/compute.instance.create.start_23.json
  15. 0
    974
      demo/files/event_templates/compute.instance.delete.start_7.json
  16. 0
    370
      demo/files/event_templates/compute.instance.power_off.start_4.json
  17. 0
    598
      demo/files/event_templates/compute.instance.reboot.start_6.json
  18. 0
    2381
      demo/files/event_templates/compute.instance.rebuild.start_24.json
  19. 0
    125
      demo/files/server/data.txt
  20. 0
    11
      demo/files/server/events.php
  21. 0
    70
      demo/files/server/index.html
  22. 0
    18
      demo/files/transform_definition.yaml
  23. 0
    51
      demo/post_webhook.py
  24. 0
    2
      demo/webserver.sh
  25. 88
    0
      devstack/Vagrantfile
  26. 0
    0
      devstack/lib/.gitkeep
  27. 17
    0
      devstack/plugin.sh
  28. 28
    0
      devstack/post_test_hook.sh
  29. 0
    0
      devstack/pre_test_hook.sh
  30. 16
    0
      devstack/settings
  31. 1
    0
      doc/api-samples/empty.json
  32. 114
    0
      doc/source/_static/events-api.conf.sample
  33. 7
    0
      doc/source/code/modules.rst
  34. 8
    0
      doc/source/code/monasca_events_api.conf.rst
  35. 35
    0
      doc/source/code/monasca_events_api.rst
  36. 282
    0
      doc/source/conf.py
  37. 48
    0
      doc/source/index.rst
  38. 0
    92
      etc/events_api.conf
  39. 0
    22
      etc/events_api.ini
  40. 0
    0
      etc/monasca/events-api-logging.conf
  41. 0
    0
      etc/monasca/events-api-paste.ini
  42. 0
    197
      func_test/api_func_test.py
  43. 0
    63
      func_test/transform_definitions.yaml
  44. 0
    30
      monasca_events_api/api/events_api_v2.py
  45. 0
    76
      monasca_events_api/api/server.py
  46. 0
    37
      monasca_events_api/api/stream_definitions_api_v2.py
  47. 0
    33
      monasca_events_api/api/transforms_api_v2.py
  48. 0
    26
      monasca_events_api/api/versions_api.py
  49. 0
    17
      monasca_events_api/common/messaging/exceptions.py
  50. 0
    125
      monasca_events_api/common/messaging/kafka_publisher.py
  51. 0
    36
      monasca_events_api/common/messaging/message_formats/events.py
  52. 0
    22
      monasca_events_api/common/messaging/message_formats/transforms.py
  53. 0
    28
      monasca_events_api/common/messaging/publisher.py
  54. 0
    1
      monasca_events_api/common/repositories/constants.py
  55. 0
    28
      monasca_events_api/common/repositories/events_repository.py
  56. 0
    29
      monasca_events_api/common/repositories/exceptions.py
  57. 0
    0
      monasca_events_api/common/repositories/mysql/__init__.py
  58. 0
    94
      monasca_events_api/common/repositories/mysql/events_repository.py
  59. 0
    81
      monasca_events_api/common/repositories/mysql/mysql_repository.py
  60. 0
    345
      monasca_events_api/common/repositories/mysql/streams_repository.py
  61. 0
    94
      monasca_events_api/common/repositories/mysql/transforms_repository.py
  62. 0
    62
      monasca_events_api/common/repositories/streams_repository.py
  63. 0
    33
      monasca_events_api/common/repositories/transforms_repository.py
  64. 84
    0
      monasca_events_api/conf/__init__.py
  65. 53
    0
      monasca_events_api/config.py
  66. 0
    0
      monasca_events_api/middleware/__init__.py
  67. 0
    84
      monasca_events_api/middleware/context.py
  68. 0
    110
      monasca_events_api/middleware/keystone_context_filter.py
  69. 0
    0
      monasca_events_api/tests/__init__.py
  70. 0
    374
      monasca_events_api/tests/test_events.py
  71. 0
    454
      monasca_events_api/tests/test_stream_definitions.py
  72. 0
    418
      monasca_events_api/tests/test_transforms.py
  73. 0
    114
      monasca_events_api/v2/__init__.py
  74. 0
    0
      monasca_events_api/v2/common/__init__.py
  75. 0
    423
      monasca_events_api/v2/common/helpers.py
  76. 0
    50
      monasca_events_api/v2/common/resource.py
  77. 0
    0
      monasca_events_api/v2/common/schemas/__init__.py
  78. 0
    49
      monasca_events_api/v2/common/schemas/events_request_body_schema.py
  79. 0
    17
      monasca_events_api/v2/common/schemas/exceptions.py
  80. 0
    53
      monasca_events_api/v2/common/schemas/stream_definition_request_body_schema.py
  81. 0
    41
      monasca_events_api/v2/common/schemas/transforms_request_body_schema.py
  82. 0
    17
      monasca_events_api/v2/common/utils.py
  83. 0
    158
      monasca_events_api/v2/events.py
  84. 0
    507
      monasca_events_api/v2/stream_definitions.py
  85. 0
    197
      monasca_events_api/v2/transforms.py
  86. 0
    63
      monasca_events_api/v2/versions.py
  87. 4
    3
      monasca_events_api/version.py
  88. 0
    0
      monasca_events_api_tempest/__init__.py
  89. 6
    0
      releasenotes/notes/clean_repo-13f2c84c9054a7db.yaml
  90. 258
    0
      releasenotes/source/conf.py
  91. 10
    0
      releasenotes/source/index.rst
  92. 5
    0
      releasenotes/source/unreleased.rst
  93. 5
    0
      releasenotes/unreleased.rst
  94. 13
    40
      requirements.txt
  95. 39
    8
      setup.cfg
  96. 12
    6
      setup.py
  97. 24
    23
      test-requirements.txt
  98. 6
    0
      tools/bashate.sh
  99. 30
    0
      tools/tox_install.sh
  100. 0
    0
      tox.ini

+ 3
- 3
.coveragerc View File

@@ -1,8 +1,8 @@
1 1
 [run]
2 2
 branch = True
3
-source = monasca
4
-omit = monasca/tests/*
3
+source = monasca_events_api
4
+omit = monasca_events_api/tests/*
5 5
 
6 6
 [report]
7
-ignore-errors = True
7
+ignore_errors = True
8 8
 

+ 1
- 0
.gitignore View File

@@ -31,3 +31,4 @@ logs/
31 31
 log/
32 32
 *config*.yml
33 33
 db/config.yml
34
+.coverage.*

+ 1
- 1
.gitreview View File

@@ -1,4 +1,4 @@
1 1
 [gerrit]
2 2
 host=review.openstack.org
3 3
 port=29418
4
-project=stackforge/monasca-api
4
+project=openstack/monasca-events-api

+ 1
- 0
.testr.conf View File

@@ -6,3 +6,4 @@ test_command=OS_STDOUT_CAPTURE=${OS_STDOUT_CAPTURE:-1} \
6 6
 
7 7
 test_id_option=--load-list $IDFILE
8 8
 test_list_option=--list
9
+group_regex=monasca_events_api\.tests(?:\.|_)([^_]+)

+ 0
- 470
README.md View File

@@ -1,470 +0,0 @@
1
-# Overview
2
-
3
-`monasca-events-api` is a RESTful API server that is designed with a layered architecture [layered architecture](http://en.wikipedia.org/wiki/Multilayered_architecture).
4
-
5
-## Keystone Configuration
6
-
7
-For secure operation of the Monasca Events API, the API must be configured to use Keystone in the configuration file under the middleware section. Monasca only works with a Keystone v3 server. The important parts of the configuration are explained below:
8
-
9
-* serverVIP - This is the hostname or IP Address of the Keystone server
10
-* serverPort - The port for the Keystone server
11
-* useHttps - Whether to use https when making requests of the Keystone API
12
-* truststore - If useHttps is true and the Keystone server is not using a certificate signed by a public CA recognized by Java, the CA certificate can be placed in a truststore so the Monasca API will trust it, otherwise it will reject the https connection. This must be a JKS truststore
13
-* truststorePassword - The password for the above truststore
14
-* connSSLClientAuth - If the Keystone server requires the SSL client used by the Monasca server to have a specific client certificate, this should be true, false otherwise
15
-* keystore - The keystore holding the SSL Client certificate if connSSLClientAuth is true
16
-* keystorePassword - The password for the keystore
17
-* defaultAuthorizedRoles - An array of roles that authorize a user to access the complete Monasca API. User must have at least one of these roles. See below
18
-* agentAuthorizedRoles - An array of roles that authorize only the posting of metrics.  See Keystone Roles below
19
-* adminAuthMethod - "password" if the Monasca API should adminUser and adminPassword to login to the Keystone server to check the user's token, "token" if the Monasca API should use adminToken
20
-* adminUser - Admin user name
21
-* adminPassword - Admin user password
22
-* adminProjectId - Specify the project ID the api should use to request an admin token. Defaults to the admin user's default project. The adminProjectId option takes precedence over adminProjectName.
23
-* adminProjectName - Specify the project name the api should use to request an admin token. Defaults to the admin user's default project. The adminProjectId option takes precedence over adminProjectName.
24
-* adminToken - A valid admin user token if adminAuthMethod is token
25
-* timeToCacheToken - How long the Monasca API should cache the user's token before checking it again
26
-
27
-### Installation
28
-
29
-To install the events api, git clone the source and run the
30
-following commands:
31
-
32
-    sudo python setup.py install
33
-
34
-If it installs successfully, you will need to make changes to the following
35
-two files to reflect your system settings, especially where kafka server is
36
-located:
37
-
38
-    /etc/monasca/events_api.ini
39
-    /etc/monasca/events_api.conf
40
-
41
-Once the configurations are modified to match your environment, you can start
42
-up the server by following the following instructions.
43
-
44
-To start the server, run the following command:
45
-
46
-    Running the server in foreground mode
47
-    gunicorn -k eventlet --worker-connections=2000 --backlog=1000 --paste /etc/monasca/events_api.ini
48
-
49
-    Running the server as daemons
50
-    gunicorn -k eventlet --worker-connections=2000 --backlog=1000
51
-             --paste /etc/monasca/events_api.ini -D
52
-
53
-To check if the code follows python coding style, run the following command
54
-from the root directory of this project
55
-
56
-    tox -e pep8
57
-    
58
-To run all the unit test cases, run the following command from the root
59
-directory of this project
60
-
61
-    tox -e py27   (or -e py26, -e py33)
62
-
63
-# Monasca Events API 
64
-
65
-Stream Definition Methods
66
--------------------------
67
-
68
-## POST /v2.0/stream-definitions
69
-
70
-### Headers
71
-* X-Auth-Token (string, required) - Keystone auth token
72
-* Accept (string) - application/json
73
-
74
-### Request Body
75
-```
76
-{
77
-"fire_criteria": [
78
-                {"event_type": "compute.instance.create.start"},
79
-                {"event_type": "compute.instance.create.end"}
80
-                ],
81
-            "description": "provisioning duration",
82
-            "name": "example",
83
-            "group_by": ["instance_id"],
84
-            "expiration": 3000,
85
-            "select": [{
86
-                "traits": {"tenant_id": "406904"},
87
-                "event_type": "compute.instance.create.*"
88
-                }],
89
-            "fire_actions": [action_id],
90
-            "expire_actions": [action_id]
91
-            }
92
-```
93
-
94
-### Request Example
95
-```
96
-POST /v2.0/stream-definitions HTTP/1.1
97
-Host: 192.168.10.4:8072
98
-X-Auth-Token: 2b8882ba2ec44295bf300aecb2caa4f7
99
-Accept: application/json
100
-Cache-Control: no-cache
101
-```
102
-
103
-## GET /v2.0/stream-definition
104
-### Headers
105
-* X-Auth-Token (string, required) - Keystone auth token
106
-* Accept (string) - application/json
107
-
108
-### Request Body
109
-None.
110
-
111
-### Request Example
112
-```
113
-GET /v2.0/stream-definitions HTTP/1.1
114
-Host: 192.168.10.4:8072
115
-X-Auth-Token: 2b8882ba2ec44295bf300aecb2caa4f7
116
-Accept: application/json
117
-Cache-Control: no-cache
118
-```
119
-### Response Body
120
-Returns a JSON object with a 'links' array of links and an 'elements' array of stream definition objects with the following fields:
121
-
122
-* id (string)
123
-* name (string)
124
-* fire_actions (string)
125
-* description (string)
126
-* expire_actions (string)
127
-* created_at (datetime string)
128
-* select
129
-    * traits
130
-        * tenant_id (string)
131
-    * event_type (string)
132
-* group_by (string)
133
-* expiration (int)
134
-* links - links to stream-definition
135
-* updated_at (datetime string)
136
-* actions_enabled (bool)
137
-* fire_criteria - JSON list of event fire criteria
138
-
139
-### Response Body Example
140
-
141
-```
142
-{
143
-  "links": [
144
-    {
145
-      "rel": "self",
146
-      "href": "http://192.168.10.4:8072/v2.0/stream-definitions"
147
-    }
148
-  ],
149
-  "elements": [
150
-    {
151
-      "id": "242dd5f4-2ef6-11e5-8945-0800273a0b5b",
152
-      "fire_actions": [
153
-        "56330521-92da-4a84-8239-73d880b978fa"
154
-      ],
155
-      "description": "provisioning duration",
156
-      "expire_actions": [
157
-        "56330521-92da-4a84-8239-73d880b978fa"
158
-      ],
159
-      "created_at": "2015-07-20T15:44:01",
160
-      "select": [
161
-        {
162
-          "traits": {
163
-            "tenant_id": "406904"
164
-          },
165
-          "event_type": "compute.instance.create.*"
166
-        }
167
-      ],
168
-      "group_by": [
169
-        "instance_id"
170
-      ],
171
-      "expiration": 3000,
172
-      "links": [
173
-        {
174
-          "rel": "self",
175
-          "href": "http://192.168.10.4:8072/v2.0/stream-definitions/242dd5f4-2ef6-11e5-8945-0800273a0b5b"
176
-        }
177
-      ],
178
-      "updated_at": "2015-07-20T15:44:01",
179
-      "actions_enabled": true,
180
-      "name": "1437407040.8",
181
-      "fire_criteria": [
182
-        {
183
-          "event_type": "compute.instance.create.start"
184
-        },
185
-        {
186
-          "event_type": "compute.instance.create.end"
187
-        }
188
-      ]
189
-    }
190
-  ]
191
-}
192
-```
193
-
194
-## GET /v2.0/stream-definition/{definition_id}
195
-### Headers
196
-* X-Auth-Token (string, required) - Keystone auth token
197
-* Accept (string) - application/json
198
-
199
-### Request Body
200
-None.
201
-
202
-### Request Example
203
-```
204
-GET /v2.0/stream-definitions/242dd5f4-2ef6-11e5-8945-0800273a0b5b HTTP/1.1
205
-Host: 192.168.10.4:8072
206
-X-Auth-Token: 2b8882ba2ec44295bf300aecb2caa4f7
207
-Accept: application/json
208
-Cache-Control: no-cache
209
-```
210
-### Response Body
211
-Returns a JSON object with a 'links' array of links and an 'elements' array of stream definition objects with the following fields:
212
-
213
-* id (string)
214
-* name (string)
215
-* fire_actions (string)
216
-* description (string)
217
-* expire_actions (string)
218
-* created_at (datetime string)
219
-* select
220
-    * traits
221
-        * tenant_id (string)
222
-    * event_type (string)
223
-* group_by (string)
224
-* expiration (int)
225
-* links - links to stream-definition
226
-* updated_at (datetime string)
227
-* actions_enabled (bool)
228
-* fire_criteria - JSON list of event fire criteria
229
-
230
-### Response Body Example
231
-```
232
-{
233
-  "id": "242dd5f4-2ef6-11e5-8945-0800273a0b5b",
234
-  "fire_actions": [
235
-    "56330521-92da-4a84-8239-73d880b978fa"
236
-  ],
237
-  "description": "provisioning duration",
238
-  "expire_actions": [
239
-    "56330521-92da-4a84-8239-73d880b978fa"
240
-  ],
241
-  "created_at": "2015-07-20T15:44:01",
242
-  "select": [
243
-    {
244
-      "traits": {
245
-        "tenant_id": "406904"
246
-      },
247
-      "event_type": "compute.instance.create.*"
248
-    }
249
-  ],
250
-  "group_by": [
251
-    "instance_id"
252
-  ],
253
-  "expiration": 3000,
254
-  "links": [
255
-    {
256
-      "rel": "self",
257
-      "href": "http://192.168.10.4:8072/v2.0/stream-definitions/242dd5f4-2ef6-11e5-8945-0800273a0b5b"
258
-    }
259
-  ],
260
-  "updated_at": "2015-07-20T15:44:01",
261
-  "actions_enabled": true,
262
-  "name": "1437407040.8",
263
-  "fire_criteria": [
264
-    {
265
-      "event_type": "compute.instance.create.start"
266
-    },
267
-    {
268
-      "event_type": "compute.instance.create.end"
269
-    }
270
-  ]
271
-}
272
-```
273
-## DELETE /v2.0/stream-definition/{definition_id}
274
-### Headers
275
-* X-Auth-Token (string, required) - Keystone auth token
276
-* Accept (string) - application/json
277
-
278
-### Request Body
279
-None.
280
-
281
-### Request Example
282
-```
283
-DELETE /v2.0/stream-definitions/242dd5f4-2ef6-11e5-8945-0800273a0b5b HTTP/1.1
284
-Host: 192.168.10.4:8072
285
-X-Auth-Token: 2b8882ba2ec44295bf300aecb2caa4f7
286
-Accept: application/json
287
-Cache-Control: no-cache
288
-```
289
-### Response Body
290
-None.
291
-
292
-### Response Body Example
293
-None.
294
-
295
-## POST /v2.0/transforms/
296
-### Headers
297
-* X-Auth-Token (string, required) - Keystone auth token
298
-* Accept (string) - application/json
299
-
300
-### Request Body
301
-```
302
-{
303
-    "name": 'example',
304
-    "description": 'an example definition',
305
-    "specification": YAML_data
306
-}
307
-```
308
-
309
-### Request Example
310
-```
311
-POST /v2.0/transforms/ HTTP/1.1
312
-Host: 192.168.10.4:8072
313
-X-Auth-Token: 2b8882ba2ec44295bf300aecb2caa4f7
314
-Accept: application/json
315
-Cache-Control: no-cache
316
-```
317
-### Response Body
318
-None.
319
-
320
-### Response Body Example
321
-None.
322
-
323
-## GET /v2.0/transforms/
324
-### Headers
325
-* X-Auth-Token (string, required) - Keystone auth token
326
-* Accept (string) - application/json
327
-
328
-### Request Body
329
-None.
330
-
331
-### Request Example
332
-```
333
-GET /v2.0/transforms/ HTTP/1.1
334
-Host: 192.168.10.4:8072
335
-X-Auth-Token: 2b8882ba2ec44295bf300aecb2caa4f7
336
-Accept: application/json
337
-Cache-Control: no-cache
338
-```
339
-### Response Body
340
-Returns a JSON object with a 'links' array of links and an 'elements' array of stream definition objects with the following fields:
341
-
342
-* id (string)
343
-* name (string)
344
-* description (string)
345
-* enabled (bool)
346
-* tenant_id (string)
347
-* deleted_at (datetime)
348
-* specification (string YAML data)
349
-* created_at (datetime)
350
-* updated_at (datetime)
351
-
352
-### Response Body Example
353
-```
354
-{
355
-  "links": [
356
-    {
357
-      "rel": "self",
358
-      "href": "http://192.168.10.4:8072/v2.0/transforms"
359
-    }
360
-  ],
361
-  "elements": [
362
-    {
363
-      "enabled": 0,
364
-      "id": "a794f22f-a231-47a0-8618-37f12b7a6f77",
365
-      "tenant_id": "d502aac2388b43f392c302b37a401ae5",
366
-      "deleted_at": null,
367
-      "specification": YAML_data,
368
-      "created_at": 1437407042,
369
-      "updated_at": 1437407042,
370
-      "description": "an example definition",
371
-      "name": "func test2"
372
-    }
373
-  ]
374
-}
375
-```
376
-
377
-## GET /v2.0/transforms/{transform_id}
378
-### Headers
379
-* X-Auth-Token (string, required) - Keystone auth token
380
-* Accept (string) - application/json
381
-
382
-### Request Body
383
-None.
384
-
385
-### Request Example
386
-```
387
-GET /v2.0/transforms/a794f22f-a231-47a0-8618-37f12b7a6f77 HTTP/1.1
388
-Host: 192.168.10.4:8072
389
-X-Auth-Token: 2b8882ba2ec44295bf300aecb2caa4f7
390
-Accept: application/json
391
-Cache-Control: no-cache
392
-```
393
-### Response Body
394
-Returns a JSON object with a 'links' array of links and an 'elements' array of stream definition objects with the following fields:
395
-
396
-* id (string)
397
-* name (string)
398
-* description (string)
399
-* enabled (bool)
400
-* tenant_id (string)
401
-* deleted_at (datetime)
402
-* specification (string YAML data)
403
-* links - links to transform definition
404
-* created_at (datetime)
405
-* updated_at (datetime)
406
-
407
-### Response Body Example
408
-```
409
-{
410
-  "enabled": 0,
411
-  "id": "a794f22f-a231-47a0-8618-37f12b7a6f77",
412
-  "tenant_id": "d502aac2388b43f392c302b37a401ae5",
413
-  "created_at": 1437407042,
414
-  "specification": "YAML_data",
415
-  "links": [
416
-    {
417
-      "rel": "self",
418
-      "href": "http://192.168.10.4:8072/v2.0/transforms/a794f22f-a231-47a0-8618-37f12b7a6f77"
419
-    }
420
-  ],
421
-  "deleted_at": null,
422
-  "updated_at": 1437407042,
423
-  "description": "an example definition",
424
-  "name": "func test2"
425
-}
426
-```
427
-
428
-## DELETE /v2.0/transforms/{transform_id}
429
-### Headers
430
-* X-Auth-Token (string, required) - Keystone auth token
431
-* Accept (string) - application/json
432
-
433
-### Request Body
434
-None.
435
-
436
-### Request Example
437
-```
438
-DELETE /v2.0/transforms/a794f22f-a231-47a0-8618-37f12b7a6f77 HTTP/1.1
439
-Host: 192.168.10.4:8072
440
-X-Auth-Token: 2b8882ba2ec44295bf300aecb2caa4f7
441
-Accept: application/json
442
-Cache-Control: no-cache
443
-```
444
-### Response Body
445
-None.
446
-
447
-### Response Body Example
448
-None.
449
-
450
-
451
-
452
-
453
-
454
-
455
-# License
456
-
457
-Copyright (c) 2015 Hewlett-Packard Development Company, L.P.
458
-
459
-Licensed under the Apache License, Version 2.0 (the "License");
460
-you may not use this file except in compliance with the License.
461
-You may obtain a copy of the License at
462
-
463
-    http://www.apache.org/licenses/LICENSE-2.0
464
-    
465
-Unless required by applicable law or agreed to in writing, software
466
-distributed under the License is distributed on an "AS IS" BASIS,
467
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
468
-implied.
469
-See the License for the specific language governing permissions and
470
-limitations under the License.

+ 53
- 0
README.rst View File

@@ -0,0 +1,53 @@
1
+========================
2
+Team and repository tags
3
+========================
4
+
5
+OpenStack Monasca-Events-Api
6
+============================
7
+OpenStack Monasca-Events-Api provides RESTful Api to collect events from OpenStack cloud.
8
+
9
+
10
+OpenStack Monasca-Events-Api is distributed under the terms of the Apache License, Version 2.0.
11
+The full terms and conditions of this license are detailed in the LICENSE file.
12
+
13
+API
14
+---
15
+
16
+For the more information of OpenStack APIs, SDKs and CLIs, please see:
17
+
18
+* `OpenStack Application Development <https://www.openstack.org/appdev/>`_
19
+* `OpenStack Developer Documentation <https://developer.openstack.org/>`_
20
+
21
+Developers
22
+----------
23
+
24
+For information on how to contribute to Monasca-events-api, please see the
25
+contents of the CONTRIBUTING.rst.
26
+
27
+Any new code must follow the development guidelines detailed
28
+in the HACKING.rst file, and pass all unit tests as well as linters.
29
+
30
+Further developer focused documentation is available at:
31
+
32
+* `Openstack Monasca-events-api <https://docs.openstack.org/developer/monasca-events-api/>`_
33
+
34
+Operators
35
+---------
36
+
37
+To learn how to deploy and configure OpenStack Monasca-events-api, consult the
38
+documentation available online at:
39
+
40
+* `Installation <https://docs.openstack.org/monasca-events-api/latest/install/>`_
41
+* `Configuration <https://docs.openstack.org/monasca-events-api/latest/configuration/>`_
42
+
43
+Bug tracking
44
+------------
45
+
46
+In the unfortunate event that bugs are discovered, they should
47
+be reported to the appropriate bug tracker. If you obtained
48
+the software from a 3rd party operating system vendor, it is
49
+often wise to use their own bug tracker for reporting problems.
50
+In all other cases use the master OpenStack bug tracker,
51
+available at:
52
+
53
+* `Storyboard <https://storyboard.openstack.org/#!/project/866>`_

+ 259
- 0
api-guide/source/conf.py View File

@@ -0,0 +1,259 @@
1
+# Licensed under the Apache License, Version 2.0 (the "License");
2
+# you may not use this file except in compliance with the License.
3
+# You may obtain a copy of the License at
4
+#
5
+#    http://www.apache.org/licenses/LICENSE-2.0
6
+#
7
+# Unless required by applicable law or agreed to in writing, software
8
+# distributed under the License is distributed on an "AS IS" BASIS,
9
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
10
+# implied.
11
+# See the License for the specific language governing permissions and
12
+# limitations under the License.
13
+#
14
+# Key Manager API documentation build configuration file
15
+#
16
+# All configuration values have a default; values that are commented out
17
+# serve to show the default.
18
+
19
+# -- General configuration ------------------------------------------------
20
+
21
+# If your documentation needs a minimal Sphinx version, state it here.
22
+needs_sphinx = '1.6'
23
+
24
+# Add any Sphinx extension module names here, as strings. They can be
25
+# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
26
+# ones.
27
+extensions = [
28
+    'openstackdocstheme'
29
+]
30
+
31
+# Add any paths that contain templates here, relative to this directory.
32
+templates_path = ['_templates']
33
+
34
+# The suffix of source filenames.
35
+source_suffix = '.rst'
36
+
37
+# The encoding of source files.
38
+source_encoding = 'utf-8'
39
+
40
+# The master toctree document.
41
+master_doc = 'index'
42
+
43
+# General details about project
44
+repository_name = u'openstack/monasca-events-api'
45
+project = u'Monasca Events API Guide'
46
+bug_project = u'monasca-events-api'
47
+bug_tag = u'api-guide'
48
+copyright = u'2014, OpenStack Foundation'
49
+
50
+from monasca_events_api.version import version_info
51
+version = version_info.version_string()
52
+release = version_info.release_string()
53
+
54
+# The language for content autogenerated by Sphinx. Refer to documentation
55
+# for a list of supported languages.
56
+# language = None
57
+
58
+# There are two options for replacing |today|: either, you set today to some
59
+# non-false value, then it is used:
60
+# today = ''
61
+# Else, today_fmt is used as the format for a strftime call.
62
+# today_fmt = '%B %d, %Y'
63
+
64
+# List of patterns, relative to source directory, that match files and
65
+# directories to ignore when looking for source files.
66
+exclude_patterns = []
67
+
68
+# The reST default role (used for this markup: `text`) to use for all
69
+# documents.
70
+# default_role = None
71
+
72
+# If true, '()' will be appended to :func: etc. cross-reference text.
73
+# add_function_parentheses = True
74
+
75
+# If true, the current module name will be prepended to all description
76
+# unit titles (such as .. function::).
77
+# add_module_names = True
78
+
79
+# If true, sectionauthor and moduleauthor directives will be shown in the
80
+# output. They are ignored by default.
81
+# show_authors = False
82
+
83
+# The name of the Pygments (syntax highlighting) style to use.
84
+pygments_style = 'sphinx'
85
+
86
+# A list of ignored prefixes for module index sorting.
87
+# modindex_common_prefix = []
88
+
89
+# If true, keep warnings as "system message" paragraphs in the built documents.
90
+# keep_warnings = False
91
+
92
+
93
+# -- Options for HTML output ----------------------------------------------
94
+
95
+# The theme to use for HTML and HTML Help pages.  See the documentation for
96
+# a list of builtin themes.
97
+html_theme = 'openstackdocs'
98
+
99
+# Theme options are theme-specific and customize the look and feel of a theme
100
+# further.  For a list of options available for each theme, see the
101
+# documentation.
102
+# html_theme_options = {}
103
+
104
+# A shorter title for the navigation bar.  Default is the same as html_title.
105
+html_short_title = 'API Guide'
106
+
107
+# The name of an image file (relative to this directory) to place at the top
108
+# of the sidebar.
109
+# html_logo = None
110
+
111
+# The name of an image file (within the static path) to use as favicon of the
112
+# docs.  This file should be a Windows icon file (.ico) being 16x16 or 32x32
113
+# pixels large.
114
+# html_favicon = None
115
+
116
+# Add any paths that contain custom static files (such as style sheets) here,
117
+# relative to this directory. They are copied after the builtin static files,
118
+# so a file named "default.css" will overwrite the builtin "default.css".
119
+# html_static_path = []
120
+
121
+# Add any extra paths that contain custom files (such as robots.txt or
122
+# .htaccess) here, relative to this directory. These files are copied
123
+# directly to the root of the documentation.
124
+# html_extra_path = []
125
+
126
+# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
127
+# using the given strftime format.
128
+html_last_updated_fmt = '%Y-%m-%d %H:%M'
129
+
130
+# If true, SmartyPants will be used to convert quotes and dashes to
131
+# typographically correct entities.
132
+# html_use_smartypants = True
133
+
134
+# Custom sidebar templates, maps document names to template names.
135
+# html_sidebars = {}
136
+
137
+# Additional templates that should be rendered to pages, maps page names to
138
+# template names.
139
+# html_additional_pages = {}
140
+
141
+# If false, no module index is generated.
142
+# html_domain_indices = True
143
+
144
+# If false, no index is generated.
145
+html_use_index = True
146
+
147
+# If true, the index is split into individual pages for each letter.
148
+# html_split_index = False
149
+
150
+# If true, links to the reST sources are added to the pages.
151
+# html_show_sourcelink = True
152
+
153
+# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
154
+# html_show_sphinx = True
155
+
156
+# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
157
+# html_show_copyright = True
158
+
159
+# If true, an OpenSearch description file will be output, and all pages will
160
+# contain a <link> tag referring to it.  The value of this option must be the
161
+# base URL from which the finished HTML is served.
162
+# html_use_opensearch = ''
163
+
164
+# This is the file name suffix for HTML files (e.g. ".xhtml").
165
+# html_file_suffix = None
166
+
167
+# Output file base name for HTML help builder.
168
+htmlhelp_basename = 'monascaeventsapi-api-guide'
169
+
170
+
171
+# -- Options for LaTeX output ---------------------------------------------
172
+
173
+latex_elements = {
174
+    # The paper size ('letterpaper' or 'a4paper').
175
+    # 'papersize': 'letterpaper',
176
+
177
+    # The font size ('10pt', '11pt' or '12pt').
178
+    # 'pointsize': '10pt',
179
+
180
+    # Additional stuff for the LaTeX preamble.
181
+    # 'preamble': '',
182
+}
183
+
184
+# Grouping the document tree into LaTeX files. List of tuples
185
+# (source start file, target name, title,
186
+#  author, documentclass [howto, manual, or own class]).
187
+latex_documents = [
188
+    ('index', 'MonascaEventsApiAPI.tex', u'Key Manager API Documentation',
189
+     u'OpenStack Foundation', 'manual'),
190
+]
191
+
192
+# The name of an image file (relative to this directory) to place at the top of
193
+# the title page.
194
+# latex_logo = None
195
+
196
+# For "manual" documents, if this is true, then toplevel headings are parts,
197
+# not chapters.
198
+# latex_use_parts = False
199
+
200
+# If true, show page references after internal links.
201
+# latex_show_pagerefs = False
202
+
203
+# If true, show URL addresses after external links.
204
+# latex_show_urls = False
205
+
206
+# Documents to append as an appendix to all manuals.
207
+# latex_appendices = []
208
+
209
+# If false, no module index is generated.
210
+# latex_domain_indices = True
211
+
212
+
213
+# -- Options for manual page output ---------------------------------------
214
+
215
+# One entry per manual page. List of tuples
216
+# (source start file, name, description, authors, manual section).
217
+man_pages = [
218
+    ('index', 'monascaeventsapiapi', u'Monasca Events API Documentation',
219
+     [u'OpenStack Foundation'], 1)
220
+]
221
+
222
+# If true, show URL addresses after external links.
223
+# man_show_urls = False
224
+
225
+
226
+# -- Options for Texinfo output -------------------------------------------
227
+
228
+# Grouping the document tree into Texinfo files. List of tuples
229
+# (source start file, target name, title, author,
230
+#  dir menu entry, description, category)
231
+texinfo_documents = [
232
+    ('index', 'MonascaEventsApiAPIGuide', u'Monasca Events API Guide',
233
+     u'OpenStack Foundation', 'APIGuide',
234
+     'This guide teaches OpenStack Monasca Events service users concepts about '
235
+     'managing keys in an OpenStack cloud with the Monasca Events API.',
236
+     'Miscellaneous'),
237
+]
238
+
239
+# Documents to append as an appendix to all manuals.
240
+# texinfo_appendices = []
241
+
242
+# If false, no module index is generated.
243
+# texinfo_domain_indices = True
244
+
245
+# How to display URL addresses: 'footnote', 'no', or 'inline'.
246
+# texinfo_show_urls = 'footnote'
247
+
248
+# If true, do not generate a @detailmenu in the "Top" node's menu.
249
+# texinfo_no_detailmenu = False
250
+
251
+# -- Options for Internationalization output ------------------------------
252
+locale_dirs = ['locale/']
253
+
254
+# -- Options for PDF output --------------------------------------------------
255
+
256
+pdf_documents = [
257
+    ('index', u'MonascaEventsApiAPIGuide', u'Key Manager API Guide', u'OpenStack '
258
+     'contributors')
259
+]

+ 35
- 0
api-guide/source/index.rst View File

@@ -0,0 +1,35 @@
1
+..
2
+      Copyright 2017 Fujitsu LIMITED
3
+
4
+      Licensed under the Apache License, Version 2.0 (the "License"); you may
5
+      not use this file except in compliance with the License. You may obtain
6
+      a copy of the License at
7
+
8
+          http://www.apache.org/licenses/LICENSE-2.0
9
+
10
+      Unless required by applicable law or agreed to in writing, software
11
+      distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12
+      WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13
+      License for the specific language governing permissions and limitations
14
+      under the License.
15
+
16
+==================
17
+Monasca Events API
18
+==================
19
+
20
+The monasca-events-api project has a RESTful HTTP service called the
21
+Monasca Events API. To this API , services (agents) can send events collected
22
+from OpenStack message bus.
23
+
24
+This guide covers the concepts in the Monasca Events API.
25
+For a full reference listing, please see:
26
+`Monasca Events API Reference <http://developer.openstack.org/api-ref/monasca/#monasca-events-api>`__.
27
+
28
+We welcome feedback, comments and bug reports at
29
+`storyboard/monasca <https://storyboard.openstack.org/#!/project_group/866>`__.
30
+
31
+
32
+Contents
33
+========
34
+.. toctree::
35
+    :maxdepth: 2

+ 258
- 0
api-ref/source/conf.py View File

@@ -0,0 +1,258 @@
1
+# Licensed under the Apache License, Version 2.0 (the "License");
2
+# you may not use this file except in compliance with the License.
3
+# You may obtain a copy of the License at
4
+#
5
+#    http://www.apache.org/licenses/LICENSE-2.0
6
+#
7
+# Unless required by applicable law or agreed to in writing, software
8
+# distributed under the License is distributed on an "AS IS" BASIS,
9
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
10
+# implied.
11
+# See the License for the specific language governing permissions and
12
+# limitations under the License.
13
+#
14
+# Key Manager API documentation build configuration file
15
+#
16
+# All configuration values have a default; values that are commented out
17
+# serve to show the default.
18
+
19
+# -- General configuration ------------------------------------------------
20
+
21
+# If your documentation needs a minimal Sphinx version, state it here.
22
+needs_sphinx = '1.6'
23
+
24
+# Add any Sphinx extension module names here, as strings. They can be
25
+# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
26
+# ones.
27
+extensions = [
28
+    'os_api_ref',
29
+    'openstackdocstheme'
30
+]
31
+
32
+# Add any paths that contain templates here, relative to this directory.
33
+templates_path = ['_templates']
34
+
35
+# The suffix of source filenames.
36
+source_suffix = '.rst'
37
+
38
+# The encoding of source files.
39
+source_encoding = 'utf-8'
40
+
41
+# The master toctree document.
42
+master_doc = 'index'
43
+
44
+# General details about project
45
+repository_name = u'openstack/monasca-events-api'
46
+project = u'Monasca Events Ref Guide'
47
+bug_project = u'monasca-events-api'
48
+bug_tag = u'api-ref'
49
+copyright = u'2014, OpenStack Foundation'
50
+
51
+# The version info for the project you're documenting, acts as replacement for
52
+# |version| and |release|, also used in various other places throughout the
53
+# built documents.
54
+#
55
+from monasca_events_api.version import version_info
56
+version = version_info.version_string()
57
+release = version_info.release_string()
58
+
59
+# The language for content autogenerated by Sphinx. Refer to documentation
60
+# for a list of supported languages.
61
+# language = None
62
+
63
+# There are two options for replacing |today|: either, you set today to some
64
+# non-false value, then it is used:
65
+# today = ''
66
+# Else, today_fmt is used as the format for a strftime call.
67
+# today_fmt = '%B %d, %Y'
68
+
69
+# List of patterns, relative to source directory, that match files and
70
+# directories to ignore when looking for source files.
71
+exclude_patterns = []
72
+
73
+# The reST default role (used for this markup: `text`) to use for all
74
+# documents.
75
+# default_role = None
76
+
77
+# If true, '()' will be appended to :func: etc. cross-reference text.
78
+# add_function_parentheses = True
79
+
80
+# If true, the current module name will be prepended to all description
81
+# unit titles (such as .. function::).
82
+# add_module_names = True
83
+
84
+# If true, sectionauthor and moduleauthor directives will be shown in the
85
+# output. They are ignored by default.
86
+# show_authors = False
87
+
88
+# The name of the Pygments (syntax highlighting) style to use.
89
+pygments_style = 'sphinx'
90
+
91
+# A list of ignored prefixes for module index sorting.
92
+# modindex_common_prefix = []
93
+
94
+# If true, keep warnings as "system message" paragraphs in the built documents.
95
+# keep_warnings = False
96
+
97
+
98
+# -- Options for HTML output ----------------------------------------------
99
+
100
+# The theme to use for HTML and HTML Help pages.  See the documentation for
101
+# a list of builtin themes.
102
+html_theme = 'openstackdocs'
103
+
104
+# To use the API Reference sidebar dropdown menu,
105
+# uncomment the html_theme_options parameter.  The theme
106
+# variable, sidebar_dropdown, should be set to `api_ref`.
107
+# Otherwise, the list of links for the User and Ops docs
108
+# appear in the sidebar dropdown menu.
109
+html_theme_options = {"sidebar_dropdown": "api_ref",
110
+                      "sidebar_mode": "toc"}
111
+
112
+# A shorter title for the navigation bar.  Default is the same as html_title.
113
+html_short_title = 'API Ref'
114
+
115
+# The name of an image file (relative to this directory) to place at the top
116
+# of the sidebar.
117
+# html_logo = None
118
+
119
+# The name of an image file (within the static path) to use as favicon of the
120
+# docs.  This file should be a Windows icon file (.ico) being 16x16 or 32x32
121
+# pixels large.
122
+# html_favicon = None
123
+
124
+# Add any paths that contain custom static files (such as style sheets) here,
125
+# relative to this directory. They are copied after the builtin static files,
126
+# so a file named "default.css" will overwrite the builtin "default.css".
127
+# html_static_path = []
128
+
129
+# Add any extra paths that contain custom files (such as robots.txt or
130
+# .htaccess) here, relative to this directory. These files are copied
131
+# directly to the root of the documentation.
132
+# html_extra_path = []
133
+
134
+# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
135
+# using the given strftime format.
136
+html_last_updated_fmt = '%Y-%m-%d %H:%M'
137
+
138
+# If true, SmartyPants will be used to convert quotes and dashes to
139
+# typographically correct entities.
140
+# html_use_smartypants = True
141
+
142
+# Custom sidebar templates, maps document names to template names.
143
+# html_sidebars = {}
144
+
145
+# Additional templates that should be rendered to pages, maps page names to
146
+# template names.
147
+# html_additional_pages = {}
148
+
149
+# If false, no module index is generated.
150
+# html_domain_indices = True
151
+
152
+# If false, no index is generated.
153
+html_use_index = True
154
+
155
+# If true, the index is split into individual pages for each letter.
156
+# html_split_index = False
157
+
158
+# If true, links to the reST sources are added to the pages.
159
+# html_show_sourcelink = True
160
+
161
+# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
162
+# html_show_sphinx = True
163
+
164
+# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
165
+# html_show_copyright = True
166
+
167
+# If true, an OpenSearch description file will be output, and all pages will
168
+# contain a <link> tag referring to it.  The value of this option must be the
169
+# base URL from which the finished HTML is served.
170
+# html_use_opensearch = ''
171
+
172
+# This is the file name suffix for HTML files (e.g. ".xhtml").
173
+# html_file_suffix = None
174
+
175
+# Output file base name for HTML help builder.
176
+htmlhelp_basename = 'monascaeventsapi-api-ref'
177
+
178
+
179
+# -- Options for LaTeX output ---------------------------------------------
180
+
181
+latex_elements = {
182
+    # The paper size ('letterpaper' or 'a4paper').
183
+    # 'papersize': 'letterpaper',
184
+
185
+    # The font size ('10pt', '11pt' or '12pt').
186
+    # 'pointsize': '10pt',
187
+
188
+    # Additional stuff for the LaTeX preamble.
189
+    # 'preamble': '',
190
+}
191
+
192
+# Grouping the document tree into LaTeX files. List of tuples
193
+# (source start file, target name, title,
194
+#  author, documentclass [howto, manual, or own class]).
195
+latex_documents = [
196
+    (master_doc, 'MonascaEventsApi.tex', u'Monasca Events API Documentation',
197
+     u'OpenStack Foundation', 'manual'),
198
+]
199
+
200
+# The name of an image file (relative to this directory) to place at the top of
201
+# the title page.
202
+# latex_logo = None
203
+
204
+# For "manual" documents, if this is true, then toplevel headings are parts,
205
+# not chapters.
206
+# latex_use_parts = False
207
+
208
+# If true, show page references after internal links.
209
+# latex_show_pagerefs = False
210
+
211
+# If true, show URL addresses after external links.
212
+# latex_show_urls = False
213
+
214
+# Documents to append as an appendix to all manuals.
215
+# latex_appendices = []
216
+
217
+# If false, no module index is generated.
218
+# latex_domain_indices = True
219
+
220
+
221
+# -- Options for manual page output ---------------------------------------
222
+
223
+# One entry per manual page. List of tuples
224
+# (source start file, name, description, authors, manual section).
225
+man_pages = [
226
+    (master_doc, 'monascaeventsapi', u'Monasca Events API Documentation',
227
+     [u'OpenStack Foundation'], 1)
228
+]
229
+
230
+# If true, show URL addresses after external links.
231
+# man_show_urls = False
232
+
233
+
234
+# -- Options for Texinfo output -------------------------------------------
235
+
236
+# Grouping the document tree into Texinfo files. List of tuples
237
+# (source start file, target name, title, author,
238
+#  dir menu entry, description, category)
239
+texinfo_documents = [
240
+    (master_doc, 'MonascaEventsAPI', u'Monasca Events API Documentation',
241
+     u'OpenStack Foundation', 'MonascaEventsAPI', 'Monasca Events API',
242
+     'Miscellaneous'),
243
+]
244
+
245
+# Documents to append as an appendix to all manuals.
246
+# texinfo_appendices = []
247
+
248
+# If false, no module index is generated.
249
+# texinfo_domain_indices = True
250
+
251
+# How to display URL addresses: 'footnote', 'no', or 'inline'.
252
+# texinfo_show_urls = 'footnote'
253
+
254
+# If true, do not generate a @detailmenu in the "Top" node's menu.
255
+# texinfo_no_detailmenu = False
256
+
257
+# -- Options for Internationalization output ------------------------------
258
+locale_dirs = ['locale/']

+ 22
- 0
api-ref/source/index.rst View File

@@ -0,0 +1,22 @@
1
+:tocdepth: 2
2
+
3
+..
4
+      Copyright 2014-2017 Fujitsu LIMITED
5
+
6
+      Licensed under the Apache License, Version 2.0 (the "License"); you may
7
+      not use this file except in compliance with the License. You may obtain
8
+      a copy of the License at
9
+
10
+          http://www.apache.org/licenses/LICENSE-2.0
11
+
12
+      Unless required by applicable law or agreed to in writing, software
13
+      distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
14
+      WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
15
+      License for the specific language governing permissions and limitations
16
+      under the License.
17
+
18
+===========================
19
+Monasca Events Service APIs
20
+===========================
21
+
22
+.. rest_expand_all:

+ 7
- 0
config-generator/README.md View File

@@ -0,0 +1,7 @@
1
+# config-generator
2
+
3
+To generate sample configuration execute
4
+
5
+```bash
6
+tox -e genconfig
7
+```

+ 6
- 0
config-generator/monasca-events-api.conf View File

@@ -0,0 +1,6 @@
1
+[DEFAULT]
2
+output = etc/monasca/events-api.conf.sample
3
+width = 80
4
+format = ini
5
+namespace = events.api
6
+namespace = oslo.log

+ 0
- 141
demo/demo.py View File

@@ -1,141 +0,0 @@
1
-#!/opt/monasca/bin/python
2
-# Copyright (c) 2015 Hewlett-Packard Development Company, L.P.
3
-#
4
-# Licensed under the Apache License, Version 2.0 (the "License");
5
-# you may not use this file except in compliance with the License.
6
-# You may obtain a copy of the License at
7
-#
8
-#    http://www.apache.org/licenses/LICENSE-2.0
9
-#
10
-# Unless required by applicable law or agreed to in writing, software
11
-# distributed under the License is distributed on an "AS IS" BASIS,
12
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
13
-# implied.
14
-# See the License for the specific language governing permissions and
15
-# limitations under the License.
16
-
17
-# This script is designed to demo the entire Monasca Events package.
18
-# It will post a stream defintion and transform defintion,
19
-# and then it'll generate events at 5 per minute
20
-
21
-
22
-import datetime
23
-import json
24
-import kafka
25
-import sys
26
-import time
27
-
28
-import notigen
29
-import requests
30
-import yaml
31
-
32
-from monascaclient import ksclient
33
-
34
-events_url = "http://192.168.10.4:8082/v2.0"
35
-
36
-def token():
37
-    keystone = {
38
-        'username': 'mini-mon',
39
-        'password': 'password',
40
-        'project': 'test',
41
-        'auth_url': 'http://192.168.10.5:35357/v3'
42
-    }
43
-    ks_client = ksclient.KSClient(**keystone)
44
-    return ks_client.token
45
-
46
-headers = {
47
-    'X-Auth-User': 'mini-mon',
48
-    'X-Auth-Key': 'password',
49
-    'X-Auth-Token': token(),
50
-    'Accept': 'application/json',
51
-    'User-Agent': 'python-monascaclient',
52
-    'Content-Type': 'application/json'}
53
-
54
-def stream_definition_post():
55
-    body = {}
56
-
57
-    notif_resp = requests.get(
58
-        url="http://192.168.10.4:8080/v2.0/notification-methods",
59
-        data=json.dumps(body), headers=headers)
60
-    notif_dict = json.loads(notif_resp.text)
61
-    action_id = str(notif_dict['elements'][0]['id'])
62
-
63
-    body = {"fire_criteria": [{"event_type": "compute.instance.create.start"},
64
-                              {"event_type": "compute.instance.create.end"}],
65
-            "description": "provisioning duration",
66
-            "name": "Example Stream Definition",
67
-            "group_by": ["instance_id"],
68
-            "expiration": 3000,
69
-            "select": [{"traits": {"tenant_id": "406904"},
70
-                        "event_type": "compute.instance.create.*"}],
71
-            "fire_actions": [action_id],
72
-            "expire_actions": [action_id]}
73
-
74
-    response = requests.post(
75
-	    url=events_url + "/stream-definitions",
76
-	    data=json.dumps(body),
77
-	    headers=headers)
78
-
79
-
80
-def transform_definition_post():
81
-
82
-    # Open example yaml file and post to DB
83
-    fh = open('files/transform_definition.yaml', 'r')
84
-    specification_data = yaml.load(fh)
85
-
86
-    body = {
87
-        "name": 'Example Transform Definition',
88
-        "description": 'an example description',
89
-        "specification": str(specification_data)
90
-    }
91
-
92
-    response = requests.post(
93
-	    url=events_url + "/transforms",
94
-	    data=json.dumps(body),
95
-	    headers=headers)
96
-
97
-def event_generator():
98
-    
99
-    # generate 5 events per minute
100
-    g = notigen.EventGenerator("files/event_templates", operations_per_hour=300)
101
-    now = datetime.datetime.utcnow()
102
-    start = now
103
-    nevents = 0
104
-
105
-    length = 0
106
-
107
-    while nevents < 300:
108
-        e = g.generate(now)
109
-        if e:
110
-            nevents += len(e)
111
-            key = time.time() * 1000
112
-
113
-            msg = e
114
-
115
-            if len(msg) > length:
116
-                length = len(msg)
117
-                print("Max notification size: {}".format(length))
118
-
119
-            response = requests.post(
120
-                url=events_url + "/events",
121
-                data=json.dumps(msg),
122
-                headers=headers)
123
-
124
-        now = datetime.datetime.utcnow()
125
-        time.sleep(0.01)
126
-
127
-
128
-
129
-def main():
130
-
131
-    stream_definition_post()
132
-    transform_definition_post()
133
-    event_generator()
134
-
135
-
136
-if __name__ == "__main__":
137
-    sys.exit(main())
138
-
139
-
140
-
141
-

+ 0
- 2527
demo/files/event_templates/compute.instance.create.start_23.json
File diff suppressed because it is too large
View File


+ 0
- 974
demo/files/event_templates/compute.instance.delete.start_7.json View File

@@ -1,974 +0,0 @@
1
-[
2
-    {
3
-        "xuuid": 9, 
4
-        "v4": 14, 
5
-        "time_map": {
6
-            "[[[[DT_9]]]]": [
7
-                0, 
8
-                3, 
9
-                962765
10
-            ], 
11
-            "[[[[DT_5]]]]": [
12
-                -1, 
13
-                86398, 
14
-                713424
15
-            ], 
16
-            "[[[[DT_17]]]]": [
17
-                -199, 
18
-                84770, 
19
-                268272
20
-            ], 
21
-            "[[[[DT_23]]]]": [
22
-                0, 
23
-                4, 
24
-                536102
25
-            ], 
26
-            "[[[[DT_16]]]]": [
27
-                -163, 
28
-                42547, 
29
-                268272
30
-            ], 
31
-            "[[[[DT_20]]]]": [
32
-                -199, 
33
-                85752, 
34
-                268272
35
-            ], 
36
-            "[[[[DT_2]]]]": [
37
-                -199, 
38
-                84770, 
39
-                268272
40
-            ], 
41
-            "[[[[DT_15]]]]": [
42
-                -199, 
43
-                84639, 
44
-                268272
45
-            ], 
46
-            "[[[[DT_7]]]]": [
47
-                0, 
48
-                0, 
49
-                268272
50
-            ], 
51
-            "[[[[DT_21]]]]": [
52
-                -199, 
53
-                85943, 
54
-                268272
55
-            ], 
56
-            "[[[[DT_11]]]]": [
57
-                0, 
58
-                4, 
59
-                268272
60
-            ], 
61
-            "[[[[DT_3]]]]": [
62
-                -1, 
63
-                86399, 
64
-                268272
65
-            ], 
66
-            "[[[[DT_8]]]]": [
67
-                0, 
68
-                1, 
69
-                163638
70
-            ], 
71
-            "[[[[DT_14]]]]": [
72
-                -199, 
73
-                84421, 
74
-                268272
75
-            ], 
76
-            "[[[[DT_10]]]]": [
77
-                0, 
78
-                3, 
79
-                989039
80
-            ], 
81
-            "[[[[DT_4]]]]": [
82
-                0, 
83
-                0, 
84
-                0
85
-            ], 
86
-            "[[[[DT_22]]]]": [
87
-                -199, 
88
-                85967, 
89
-                268272
90
-            ], 
91
-            "[[[[DT_1]]]]": [
92
-                -199, 
93
-                84421, 
94
-                268272
95
-            ], 
96
-            "[[[[DT_13]]]]": [
97
-                -201, 
98
-                56142, 
99
-                268272
100
-            ], 
101
-            "[[[[DT_6]]]]": [
102
-                0, 
103
-                0, 
104
-                47717
105
-            ], 
106
-            "[[[[DT_12]]]]": [
107
-                0, 
108
-                4, 
109
-                463062
110
-            ], 
111
-            "[[[[DT_19]]]]": [
112
-                -199, 
113
-                85725, 
114
-                268272
115
-            ], 
116
-            "[[[[DT_18]]]]": [
117
-                0, 
118
-                0, 
119
-                268272
120
-            ], 
121
-            "[[[[DT_0]]]]": [
122
-                -1, 
123
-                46116, 
124
-                268272
125
-            ]
126
-        }, 
127
-        "uuid": 18, 
128
-        "v6": 2
129
-    }, 
130
-    {
131
-        "_context_request_id": "req-[[[[UUID_0]]]]", 
132
-        "_context_quota_class": null, 
133
-        "event_type": "compute.instance.update", 
134
-        "_context_auth_token": "[[[[XUUID_0]]]]", 
135
-        "_context_user_id": "[[[[user_id]]]]", 
136
-        "payload": {
137
-            "state_description": "", 
138
-            "availability_zone": null, 
139
-            "terminated_at": "", 
140
-            "ephemeral_gb": 600, 
141
-            "instance_type_id": 15, 
142
-            "bandwidth": {}, 
143
-            "deleted_at": "", 
144
-            "reservation_id": "[[[[reservation_id]]]]", 
145
-            "instance_id": "[[[[UUID_1]]]]", 
146
-            "user_id": "[[[[XUUID_1]]]]", 
147
-            "hostname": "[[[[hostname]]]]", 
148
-            "state": "error", 
149
-            "old_state": null, 
150
-            "old_task_state": null, 
151
-            "metadata": {}, 
152
-            "node": "[[[[node]]]]", 
153
-            "ramdisk_id": "", 
154
-            "access_ip_v6": "[[[[V6_0]]]]", 
155
-            "disk_gb": 640, 
156
-            "access_ip_v4": "[[[[V4_0]]]]", 
157
-            "kernel_id": "", 
158
-            "host": "[[[[host]]]]", 
159
-            "display_name": "[[[[display_name]]]]", 
160
-            "image_ref_url": "http://[[[[V4_1]]]]:9292/images/[[[[UUID_2]]]]", 
161
-            "audit_period_beginning": "[[[[DT_0]]]]", 
162
-            "root_gb": 40, 
163
-            "tenant_id": "[[[[tenant_id]]]]", 
164
-            "created_at": "[[[[DT_1]]]]", 
165
-            "launched_at": "[[[[DT_2]]]]", 
166
-            "memory_mb": 61440, 
167
-            "instance_type": "60 GB Performance", 
168
-            "vcpus": 16, 
169
-            "image_meta": {
170
-                "container_format": "ovf", 
171
-                "min_ram": "1024", 
172
-                "base_image_ref": "[[[[UUID_2]]]]", 
173
-                "org.openstack__1__os_distro": "com.microsoft.server", 
174
-                "image_type": "base", 
175
-                "disk_format": "vhd", 
176
-                "org.openstack__1__architecture": "x64", 
177
-                "auto_disk_config": "False", 
178
-                "min_disk": "40", 
179
-                "cache_in_nova": "True", 
180
-                "os_type": "windows", 
181
-                "org.openstack__1__os_version": "2008.2"
182
-            }, 
183
-            "architecture": "x64", 
184
-            "new_task_state": null, 
185
-            "audit_period_ending": "[[[[DT_3]]]]", 
186
-            "os_type": "windows", 
187
-            "instance_flavor_id": "performance2-60"
188
-        }, 
189
-        "priority": "INFO", 
190
-        "_context_is_admin": true, 
191
-        "_context_user": "[[[[user_id]]]]", 
192
-        "publisher_id": "[[[[publisher_id]]]]", 
193
-        "message_id": "[[[[UUID_3]]]]", 
194
-        "_context_remote_address": "[[[[V4_2]]]]", 
195
-        "_context_roles": [
196
-            "user-admin", 
197
-            "bofh", 
198
-            "glance", 
199
-            "glance:admin"
200
-        ], 
201
-        "timestamp": "[[[[DT_4]]]]", 
202
-        "_context_timestamp": "[[[[DT_5]]]]", 
203
-        "_unique_id": "[[[[XUUID_2]]]]", 
204
-        "_context_glance_api_servers": null, 
205
-        "_context_project_name": "[[[[tenant_id]]]]", 
206
-        "_context_read_deleted": "no", 
207
-        "_context_tenant": "[[[[tenant_id]]]]", 
208
-        "_context_instance_lock_checked": false, 
209
-        "_context_project_id": "[[[[tenant_id]]]]", 
210
-        "_context_user_name": "[[[[user_id]]]]"
211
-    }, 
212
-    {
213
-        "_context_request_id": "req-[[[[UUID_0]]]]", 
214
-        "_context_quota_class": null, 
215
-        "event_type": "compute.instance.update", 
216
-        "_context_auth_token": "[[[[XUUID_0]]]]", 
217
-        "_context_user_id": "[[[[user_id]]]]", 
218
-        "payload": {
219
-            "state_description": "deleting", 
220
-            "availability_zone": null, 
221
-            "terminated_at": "", 
222
-            "ephemeral_gb": 600, 
223
-            "instance_type_id": 15, 
224
-            "bandwidth": {}, 
225
-            "deleted_at": "", 
226
-            "reservation_id": "[[[[reservation_id]]]]", 
227
-            "instance_id": "[[[[UUID_1]]]]", 
228
-            "user_id": "[[[[XUUID_1]]]]", 
229
-            "hostname": "[[[[hostname]]]]", 
230
-            "state": "error", 
231
-            "old_state": "error", 
232
-            "old_task_state": null, 
233
-            "metadata": {}, 
234
-            "node": "[[[[node]]]]", 
235
-            "ramdisk_id": "", 
236
-            "access_ip_v6": "[[[[V6_0]]]]", 
237
-            "disk_gb": 640, 
238
-            "access_ip_v4": "[[[[V4_0]]]]", 
239
-            "kernel_id": "", 
240
-            "host": "[[[[host]]]]", 
241
-            "display_name": "[[[[display_name]]]]", 
242
-            "image_ref_url": "http://[[[[V4_3]]]]:9292/images/[[[[UUID_2]]]]", 
243
-            "audit_period_beginning": "[[[[DT_0]]]]", 
244
-            "root_gb": 40, 
245
-            "tenant_id": "[[[[tenant_id]]]]", 
246
-            "created_at": "[[[[DT_1]]]]", 
247
-            "launched_at": "[[[[DT_2]]]]", 
248
-            "memory_mb": 61440, 
249
-            "instance_type": "60 GB Performance", 
250
-            "vcpus": 16, 
251
-            "image_meta": {
252
-                "container_format": "ovf", 
253
-                "min_ram": "1024", 
254
-                "base_image_ref": "[[[[UUID_2]]]]", 
255
-                "org.openstack__1__os_distro": "com.microsoft.server", 
256
-                "image_type": "base", 
257
-                "disk_format": "vhd", 
258
-                "org.openstack__1__architecture": "x64", 
259
-                "auto_disk_config": "False", 
260
-                "min_disk": "40", 
261
-                "cache_in_nova": "True", 
262
-                "os_type": "windows", 
263
-                "org.openstack__1__os_version": "2008.2"
264
-            }, 
265
-            "architecture": "x64", 
266
-            "new_task_state": "deleting", 
267
-            "audit_period_ending": "[[[[DT_3]]]]", 
268
-            "os_type": "windows", 
269
-            "instance_flavor_id": "performance2-60"
270
-        }, 
271
-        "priority": "INFO", 
272
-        "_context_is_admin": true, 
273
-        "_context_user": "[[[[user_id]]]]", 
274
-        "publisher_id": "[[[[publisher_id]]]]", 
275
-        "message_id": "[[[[UUID_4]]]]", 
276
-        "_context_remote_address": "[[[[V4_2]]]]", 
277
-        "_context_roles": [
278
-            "user-admin", 
279
-            "bofh", 
280
-            "glance", 
281
-            "glance:admin"
282
-        ], 
283
-        "timestamp": "[[[[DT_6]]]]", 
284
-        "_context_timestamp": "[[[[DT_5]]]]", 
285
-        "_unique_id": "[[[[XUUID_3]]]]", 
286
-        "_context_glance_api_servers": null, 
287
-        "_context_project_name": "[[[[tenant_id]]]]", 
288
-        "_context_read_deleted": "no", 
289
-        "_context_tenant": "[[[[tenant_id]]]]", 
290
-        "_context_instance_lock_checked": false, 
291
-        "_context_project_id": "[[[[tenant_id]]]]", 
292
-        "_context_user_name": "[[[[user_id]]]]"
293
-    }, 
294
-    {
295
-        "_context_request_id": "req-[[[[UUID_0]]]]", 
296
-        "_context_quota_class": null, 
297
-        "event_type": "compute.instance.update", 
298
-        "_context_auth_token": "[[[[XUUID_0]]]]", 
299
-        "_context_user_id": "[[[[user_id]]]]", 
300
-        "payload": {
301
-            "state_description": "deleting", 
302
-            "availability_zone": null, 
303
-            "terminated_at": "", 
304
-            "ephemeral_gb": 600, 
305
-            "instance_type_id": 15, 
306
-            "bandwidth": {}, 
307
-            "deleted_at": "", 
308
-            "reservation_id": "[[[[reservation_id]]]]", 
309
-            "instance_id": "[[[[UUID_1]]]]", 
310
-            "user_id": "[[[[XUUID_1]]]]", 
311
-            "hostname": "[[[[hostname]]]]", 
312
-            "state": "error", 
313
-            "old_state": "error", 
314
-            "old_task_state": null, 
315
-            "metadata": {}, 
316
-            "node": "[[[[node]]]]", 
317
-            "ramdisk_id": "", 
318
-            "access_ip_v6": "[[[[V6_0]]]]", 
319
-            "disk_gb": 640, 
320
-            "access_ip_v4": "[[[[V4_0]]]]", 
321
-            "kernel_id": "", 
322
-            "host": "[[[[host]]]]", 
323
-            "display_name": "[[[[display_name]]]]", 
324
-            "image_ref_url": "http://[[[[V4_1]]]]:9292/images/[[[[UUID_2]]]]", 
325
-            "audit_period_beginning": "[[[[DT_0]]]]", 
326
-            "root_gb": 40, 
327
-            "tenant_id": "[[[[tenant_id]]]]", 
328
-            "created_at": "[[[[DT_1]]]]", 
329
-            "launched_at": "[[[[DT_2]]]]", 
330
-            "memory_mb": 61440, 
331
-            "instance_type": "60 GB Performance", 
332
-            "vcpus": 16, 
333
-            "image_meta": {
334
-                "container_format": "ovf", 
335
-                "min_ram": "1024", 
336
-                "base_image_ref": "[[[[UUID_2]]]]", 
337
-                "org.openstack__1__os_distro": "com.microsoft.server", 
338
-                "image_type": "base", 
339
-                "disk_format": "vhd", 
340
-                "org.openstack__1__architecture": "x64", 
341
-                "auto_disk_config": "False", 
342
-                "min_disk": "40", 
343
-                "cache_in_nova": "True", 
344
-                "os_type": "windows", 
345
-                "org.openstack__1__os_version": "2008.2"
346
-            }, 
347
-            "architecture": "x64", 
348
-            "new_task_state": "deleting", 
349
-            "audit_period_ending": "[[[[DT_7]]]]", 
350
-            "os_type": "windows", 
351
-            "instance_flavor_id": "performance2-60"
352
-        }, 
353
-        "priority": "INFO", 
354
-        "_context_is_admin": true, 
355
-        "_context_user": "[[[[user_id]]]]", 
356
-        "publisher_id": "[[[[publisher_id]]]]", 
357
-        "message_id": "[[[[UUID_5]]]]", 
358
-        "_context_remote_address": "[[[[V4_2]]]]", 
359
-        "_context_roles": [
360
-            "user-admin", 
361
-            "bofh", 
362
-            "glance", 
363
-            "glance:admin", 
364
-            "admin"
365
-        ], 
366
-        "timestamp": "[[[[DT_8]]]]", 
367
-        "_context_timestamp": "[[[[DT_5]]]]", 
368
-        "_unique_id": "[[[[XUUID_4]]]]", 
369
-        "_context_glance_api_servers": null, 
370
-        "_context_project_name": "[[[[tenant_id]]]]", 
371
-        "_context_read_deleted": "no", 
372
-        "_context_tenant": "[[[[tenant_id]]]]", 
373
-        "_context_instance_lock_checked": false, 
374
-        "_context_project_id": "[[[[tenant_id]]]]", 
375
-        "_context_user_name": "[[[[user_id]]]]"
376
-    }, 
377
-    {
378
-        "_context_request_id": "req-[[[[UUID_0]]]]", 
379
-        "_context_quota_class": null, 
380
-        "event_type": "compute.instance.delete.start", 
381
-        "_context_auth_token": "[[[[XUUID_0]]]]", 
382
-        "_context_user_id": "[[[[user_id]]]]", 
383
-        "payload": {
384
-            "state_description": "deleting", 
385
-            "availability_zone": null, 
386
-            "terminated_at": "", 
387
-            "ephemeral_gb": 600, 
388
-            "instance_type_id": 15, 
389
-            "deleted_at": "", 
390
-            "reservation_id": "[[[[reservation_id]]]]", 
391
-            "instance_id": "[[[[UUID_1]]]]", 
392
-            "user_id": "[[[[XUUID_1]]]]", 
393
-            "hostname": "[[[[hostname]]]]", 
394
-            "state": "error", 
395
-            "launched_at": "[[[[DT_2]]]]", 
396
-            "metadata": {}, 
397
-            "node": "[[[[node]]]]", 
398
-            "ramdisk_id": "", 
399
-            "access_ip_v6": "[[[[V6_0]]]]", 
400
-            "disk_gb": 640, 
401
-            "access_ip_v4": "[[[[V4_0]]]]", 
402
-            "kernel_id": "", 
403
-            "host": "[[[[host]]]]", 
404
-            "display_name": "[[[[display_name]]]]", 
405
-            "image_ref_url": "http://[[[[V4_4]]]]:9292/images/[[[[UUID_2]]]]", 
406
-            "root_gb": 40, 
407
-            "tenant_id": "[[[[tenant_id]]]]", 
408
-            "created_at": "[[[[DT_1]]]]", 
409
-            "memory_mb": 61440, 
410
-            "instance_type": "60 GB Performance", 
411
-            "vcpus": 16, 
412
-            "image_meta": {
413
-                "container_format": "ovf", 
414
-                "min_ram": "1024", 
415
-                "base_image_ref": "[[[[UUID_2]]]]", 
416
-                "org.openstack__1__os_distro": "com.microsoft.server", 
417
-                "image_type": "base", 
418
-                "disk_format": "vhd", 
419
-                "org.openstack__1__architecture": "x64", 
420
-                "auto_disk_config": "False", 
421
-                "min_disk": "40", 
422
-                "cache_in_nova": "True", 
423
-                "os_type": "windows", 
424
-                "org.openstack__1__os_version": "2008.2"
425
-            }, 
426
-            "architecture": "x64", 
427
-            "os_type": "windows", 
428
-            "instance_flavor_id": "performance2-60"
429
-        }, 
430
-        "priority": "INFO", 
431
-        "_context_is_admin": true, 
432
-        "_context_user": "[[[[user_id]]]]", 
433
-        "publisher_id": "[[[[publisher_id]]]]", 
434
-        "message_id": "[[[[UUID_6]]]]", 
435
-        "_context_remote_address": "[[[[V4_2]]]]", 
436
-        "_context_roles": [
437
-            "user-admin", 
438
-            "bofh", 
439
-            "glance", 
440
-            "glance:admin", 
441
-            "admin"
442
-        ], 
443
-        "timestamp": "[[[[DT_9]]]]", 
444
-        "_context_timestamp": "[[[[DT_5]]]]", 
445
-        "_unique_id": "[[[[XUUID_5]]]]", 
446
-        "_context_glance_api_servers": null, 
447
-        "_context_project_name": "[[[[tenant_id]]]]", 
448
-        "_context_read_deleted": "no", 
449
-        "_context_tenant": "[[[[tenant_id]]]]", 
450
-        "_context_instance_lock_checked": false, 
451
-        "_context_project_id": "[[[[tenant_id]]]]", 
452
-        "_context_user_name": "[[[[user_id]]]]"
453
-    }, 
454
-    {
455
-        "_context_request_id": "req-[[[[UUID_0]]]]", 
456
-        "_context_quota_class": null, 
457
-        "event_type": "compute.instance.shutdown.start", 
458
-        "_context_auth_token": "[[[[XUUID_0]]]]", 
459
-        "_context_user_id": "[[[[user_id]]]]", 
460
-        "payload": {
461
-            "state_description": "deleting", 
462
-            "availability_zone": null, 
463
-            "terminated_at": "", 
464
-            "ephemeral_gb": 600, 
465
-            "instance_type_id": 15, 
466
-            "deleted_at": "", 
467
-            "reservation_id": "[[[[reservation_id]]]]", 
468
-            "instance_id": "[[[[UUID_1]]]]", 
469
-            "user_id": "[[[[XUUID_1]]]]", 
470
-            "hostname": "[[[[hostname]]]]", 
471
-            "state": "error", 
472
-            "launched_at": "[[[[DT_2]]]]", 
473
-            "metadata": {}, 
474
-            "node": "[[[[node]]]]", 
475
-            "ramdisk_id": "", 
476
-            "access_ip_v6": "[[[[V6_0]]]]", 
477
-            "disk_gb": 640, 
478
-            "access_ip_v4": "[[[[V4_0]]]]", 
479
-            "kernel_id": "", 
480
-            "host": "[[[[host]]]]", 
481
-            "display_name": "[[[[display_name]]]]", 
482
-            "image_ref_url": "http://[[[[V4_4]]]]:9292/images/[[[[UUID_2]]]]", 
483
-            "root_gb": 40, 
484
-            "tenant_id": "[[[[tenant_id]]]]", 
485
-            "created_at": "[[[[DT_1]]]]", 
486
-            "memory_mb": 61440, 
487
-            "instance_type": "60 GB Performance", 
488
-            "vcpus": 16, 
489
-            "image_meta": {
490
-                "container_format": "ovf", 
491
-                "min_ram": "1024", 
492
-                "base_image_ref": "[[[[UUID_2]]]]", 
493
-                "org.openstack__1__os_distro": "com.microsoft.server", 
494
-                "image_type": "base", 
495
-                "disk_format": "vhd", 
496
-                "org.openstack__1__architecture": "x64", 
497
-                "auto_disk_config": "False", 
498
-                "min_disk": "40", 
499
-                "cache_in_nova": "True", 
500
-                "os_type": "windows", 
501
-                "org.openstack__1__os_version": "2008.2"
502
-            }, 
503
-            "architecture": "x64", 
504
-            "os_type": "windows", 
505
-            "instance_flavor_id": "performance2-60"
506
-        }, 
507
-        "priority": "INFO", 
508
-        "_context_is_admin": true, 
509
-        "_context_user": "[[[[user_id]]]]", 
510
-        "publisher_id": "[[[[publisher_id]]]]", 
511
-        "message_id": "[[[[UUID_7]]]]", 
512
-        "_context_remote_address": "[[[[V4_2]]]]", 
513
-        "_context_roles": [
514
-            "user-admin", 
515
-            "bofh", 
516
-            "glance", 
517
-            "glance:admin", 
518
-            "admin"
519
-        ], 
520
-        "timestamp": "[[[[DT_10]]]]", 
521
-        "_context_timestamp": "[[[[DT_5]]]]", 
522
-        "_unique_id": "[[[[XUUID_6]]]]", 
523
-        "_context_glance_api_servers": null, 
524
-        "_context_project_name": "[[[[tenant_id]]]]", 
525
-        "_context_read_deleted": "no", 
526
-        "_context_tenant": "[[[[tenant_id]]]]", 
527
-        "_context_instance_lock_checked": false, 
528
-        "_context_project_id": "[[[[tenant_id]]]]", 
529
-        "_context_user_name": "[[[[user_id]]]]"
530
-    }, 
531
-    {
532
-        "_context_request_id": "req-[[[[UUID_0]]]]", 
533
-        "_context_quota_class": null, 
534
-        "event_type": "compute.instance.update", 
535
-        "_context_auth_token": "[[[[XUUID_0]]]]", 
536
-        "_context_user_id": "[[[[user_id]]]]", 
537
-        "payload": {
538
-            "state_description": "deleting", 
539
-            "availability_zone": null, 
540
-            "terminated_at": "", 
541
-            "ephemeral_gb": 600, 
542
-            "instance_type_id": 15, 
543
-            "bandwidth": {}, 
544
-            "deleted_at": "", 
545
-            "reservation_id": "[[[[reservation_id]]]]", 
546
-            "instance_id": "[[[[UUID_1]]]]", 
547
-            "user_id": "[[[[XUUID_1]]]]", 
548
-            "hostname": "[[[[hostname]]]]", 
549
-            "state": "error", 
550
-            "old_state": null, 
551
-            "old_task_state": null, 
552
-            "metadata": {}, 
553
-            "node": "[[[[node]]]]", 
554
-            "ramdisk_id": "", 
555
-            "access_ip_v6": "[[[[V6_0]]]]", 
556
-            "disk_gb": 640, 
557
-            "access_ip_v4": "[[[[V4_0]]]]", 
558
-            "kernel_id": "", 
559
-            "host": "[[[[host]]]]", 
560
-            "display_name": "[[[[display_name]]]]", 
561
-            "image_ref_url": "http://[[[[V4_4]]]]:9292/images/[[[[UUID_2]]]]", 
562
-            "audit_period_beginning": "[[[[DT_0]]]]", 
563
-            "root_gb": 40, 
564
-            "tenant_id": "[[[[tenant_id]]]]", 
565
-            "created_at": "[[[[DT_1]]]]", 
566
-            "launched_at": "[[[[DT_2]]]]", 
567
-            "memory_mb": 61440, 
568
-            "instance_type": "60 GB Performance", 
569
-            "vcpus": 16, 
570
-            "image_meta": {
571
-                "container_format": "ovf", 
572
-                "min_ram": "1024", 
573
-                "base_image_ref": "[[[[UUID_2]]]]", 
574
-                "org.openstack__1__os_distro": "com.microsoft.server", 
575
-                "image_type": "base", 
576
-                "disk_format": "vhd", 
577
-                "org.openstack__1__architecture": "x64", 
578
-                "auto_disk_config": "False", 
579
-                "min_disk": "40", 
580
-                "cache_in_nova": "True", 
581
-                "os_type": "windows", 
582
-                "org.openstack__1__os_version": "2008.2"
583
-            }, 
584
-            "architecture": "x64", 
585
-            "new_task_state": "deleting", 
586
-            "audit_period_ending": "[[[[DT_11]]]]", 
587
-            "os_type": "windows", 
588
-            "instance_flavor_id": "performance2-60"
589
-        }, 
590
-        "priority": "INFO", 
591
-        "_context_is_admin": true, 
592
-        "_context_user": "[[[[user_id]]]]", 
593
-        "publisher_id": "[[[[publisher_id]]]]", 
594
-        "message_id": "[[[[UUID_8]]]]", 
595
-        "_context_remote_address": "[[[[V4_2]]]]", 
596
-        "_context_roles": [
597
-            "user-admin", 
598
-            "bofh", 
599
-            "glance", 
600
-            "glance:admin", 
601
-            "admin"
602
-        ], 
603
-        "timestamp": "[[[[DT_12]]]]", 
604
-        "_context_timestamp": "[[[[DT_5]]]]", 
605
-        "_unique_id": "[[[[XUUID_7]]]]", 
606
-        "_context_glance_api_servers": null, 
607
-        "_context_project_name": "[[[[tenant_id]]]]", 
608
-        "_context_read_deleted": "no", 
609
-        "_context_tenant": "[[[[tenant_id]]]]", 
610
-        "_context_instance_lock_checked": false, 
611
-        "_context_project_id": "[[[[tenant_id]]]]", 
612
-        "_context_user_name": "[[[[user_id]]]]"
613
-    }, 
614
-    {
615
-        "_context_request_id": "req-[[[[UUID_0]]]]", 
616
-        "_context_quota_class": null, 
617
-        "event_type": "terminate_instance", 
618
-        "_context_auth_token": "[[[[XUUID_0]]]]", 
619
-        "_context_user_id": "[[[[user_id]]]]", 
620
-        "payload": {
621
-            "exception": {}, 
622
-            "args": {
623
-                "instance": {
624
-                    "vm_state": "error", 
625
-                    "availability_zone": null, 
626
-                    "terminated_at": null, 
627
-                    "ephemeral_gb": 600, 
628
-                    "instance_type_id": 15, 
629
-                    "user_data": null, 
630
-                    "cleaned": false, 
631
-                    "vm_mode": "hvm", 
632
-                    "deleted_at": null, 
633
-                    "reservation_id": "[[[[reservation_id]]]]", 
634
-                    "id": 346688, 
635
-                    "security_groups": {
636
-                        "objects": [
637
-                            {
638
-                                "deleted_at": null, 
639
-                                "user_id": "[[[[XUUID_1]]]]", 
640
-                                "description": "default", 
641
-                                "deleted": false, 
642
-                                "created_at": "[[[[DT_13]]]]", 
643
-                                "updated_at": null, 
644
-                                "project_id": "[[[[tenant_id]]]]", 
645
-                                "id": 187, 
646
-                                "name": "[[[[display_name]]]]"
647
-                            }
648
-                        ]
649
-                    }, 
650
-                    "disable_terminate": false, 
651
-                    "root_device_name": "/dev/xvda", 
652
-                    "display_name": "[[[[display_name]]]]", 
653
-                    "uuid": "[[[[UUID_1]]]]", 
654
-                    "default_swap_device": null, 
655
-                    "info_cache": {
656
-                        "instance_uuid": "[[[[UUID_1]]]]", 
657
-                        "deleted": true, 
658
-                        "created_at": "[[[[DT_14]]]]", 
659
-                        "updated_at": "[[[[DT_15]]]]", 
660
-                        "network_info": [
661
-                            {
662
-                                "ovs_interfaceid": null, 
663
-                                "network": {
664
-                                    "bridge": "publicnet", 
665
-                                    "label": "public", 
666
-                                    "meta": {
667
-                                        "original_id": "[[[[UUID_9]]]]", 
668
-                                        "nvp_managed": false
669
-                                    }, 
670
-                                    "id": "[[[[UUID_10]]]]", 
671
-                                    "subnets": [
672
-                                        {
673
-                                            "ips": [
674
-                                                {
675
-                                                    "meta": {}, 
676
-                                                    "type": "fixed", 
677
-                                                    "floating_ips": [], 
678
-                                                    "version": 6, 
679
-                                                    "address": "[[[[V6_1]]]]"
680
-                                                }
681
-                                            ], 
682
-                                            "version": 6, 
683
-                                            "meta": {}, 
684
-                                            "dns": [
685
-                                                {
686
-                                                    "meta": {}, 
687
-                                                    "type": "dns", 
688
-                                                    "version": 4, 
689
-                                                    "address": "[[[[V4_5]]]]"
690
-                                                }, 
691
-                                                {
692
-                                                    "meta": {}, 
693
-                                                    "type": "dns", 
694
-                                                    "version": 4, 
695
-                                                    "address": "[[[[V4_6]]]]"
696
-                                                }
697
-                                            ], 
698
-                                            "routes": [], 
699
-                                            "cidr": "2a00:1a48:7807:101::/64", 
700
-                                            "gateway": {
701
-                                                "meta": {}, 
702
-                                                "type": "gateway", 
703
-                                                "version": 6, 
704
-                                                "address": "fe80::def"
705
-                                            }
706
-                                        }, 
707
-                                        {
708
-                                            "ips": [
709
-                                                {
710
-                                                    "meta": {}, 
711
-                                                    "type": "fixed", 
712
-                                                    "floating_ips": [], 
713
-                                                    "version": 4, 
714
-                                                    "address": "[[[[V4_0]]]]"
715
-                                                }
716
-                                            ], 
717
-                                            "version": 4, 
718
-                                            "meta": {}, 
719
-                                            "dns": [
720
-                                                {
721
-                                                    "meta": {}, 
722
-                                                    "type": "dns", 
723
-                                                    "version": 4, 
724
-                                                    "address": "[[[[V4_5]]]]"
725
-                                                }, 
726
-                                                {
727
-                                                    "meta": {}, 
728
-                                                    "type": "dns", 
729
-                                                    "version": 4, 
730
-                                                    "address": "[[[[V4_6]]]]"
731
-                                                }
732
-                                            ], 
733
-                                            "routes": [], 
734
-                                            "cidr": "[[[[V4_7]]]]/24", 
735
-                                            "gateway": {
736
-                                                "meta": {}, 
737
-                                                "type": "gateway", 
738
-                                                "version": 4, 
739
-                                                "address": "[[[[V4_8]]]]"
740
-                                            }
741
-                                        }
742
-                                    ]
743
-                                }, 
744
-                                "devname": "[[[[device_name]]]]", 
745
-                                "qbh_params": null, 
746
-                                "meta": {}, 
747
-                                "address": "BC:76:4E:08:43:27", 
748
-                                "type": null, 
749
-                                "id": "[[[[UUID_11]]]]", 
750
-                                "qbg_params": null
751
-                            }, 
752
-                            {
753
-                                "ovs_interfaceid": null, 
754
-                                "network": {
755
-                                    "bridge": "servicenet", 
756
-                                    "label": "private", 
757
-                                    "meta": {
758
-                                        "original_id": "[[[[UUID_12]]]]", 
759
-                                        "nvp_managed": false
760
-                                    }, 
761
-                                    "id": "[[[[UUID_13]]]]", 
762
-                                    "subnets": [
763
-                                        {
764
-                                            "ips": [
765
-                                                {
766
-                                                    "meta": {}, 
767
-                                                    "type": "fixed", 
768
-                                                    "floating_ips": [], 
769
-                                                    "version": 4, 
770
-                                                    "address": "[[[[V4_9]]]]"
771
-                                                }
772
-                                            ], 
773
-                                            "version": 4, 
774
-                                            "meta": {}, 
775
-                                            "dns": [
776
-                                                {
777
-                                                    "meta": {}, 
778
-                                                    "type": "dns", 
779
-                                                    "version": 4, 
780
-                                                    "address": "[[[[V4_5]]]]"
781
-                                                }, 
782
-                                                {
783
-                                                    "meta": {}, 
784
-                                                    "type": "dns", 
785
-                                                    "version": 4, 
786
-                                                    "address": "[[[[V4_6]]]]"
787
-                                                }
788
-                                            ], 
789
-                                            "routes": [
790
-                                                {
791
-                                                    "interface": null, 
792
-                                                    "cidr": "[[[[V4_10]]]]/12", 
793
-                                                    "meta": {}, 
794
-                                                    "gateway": {
795
-                                                        "meta": {}, 
796
-                                                        "type": "gateway", 
797
-                                                        "version": 4, 
798
-                                                        "address": "[[[[V4_11]]]]"
799
-                                                    }
800
-                                                }, 
801
-                                                {
802
-                                                    "interface": null, 
803
-                                                    "cidr": "[[[[V4_12]]]]/12", 
804
-                                                    "meta": {}, 
805
-                                                    "gateway": {
806
-                                                        "meta": {}, 
807
-                                                        "type": "gateway", 
808
-                                                        "version": 4, 
809
-                                                        "address": "[[[[V4_11]]]]"
810
-                                                    }
811
-                                                }
812
-                                            ], 
813
-                                            "cidr": "[[[[V4_13]]]]/20", 
814
-                                            "gateway": null
815
-                                        }
816
-                                    ]
817
-                                }, 
818
-                                "devname": "[[[[device_name]]]]", 
819
-                                "qbh_params": null, 
820
-                                "meta": {}, 
821
-                                "address": "BC:76:4E:08:92:48", 
822
-                                "type": null, 
823
-                                "id": "[[[[UUID_14]]]]", 
824
-                                "qbg_params": null
825
-                            }
826
-                        ], 
827
-                        "deleted_at": "[[[[DT_16]]]]"
828
-                    }, 
829
-                    "hostname": "[[[[hostname]]]]", 
830
-                    "launched_on": "c-10-21-128-29", 
831
-                    "display_description": "[[[[display_name]]]]", 
832
-                    "key_data": null, 
833
-                    "deleted": false, 
834
-                    "config_drive": "", 
835
-                    "power_state": 0, 
836
-                    "default_ephemeral_device": null, 
837
-                    "progress": 0, 
838
-                    "project_id": "[[[[tenant_id]]]]", 
839
-                    "launched_at": "[[[[DT_17]]]]", 
840
-                    "scheduled_at": "[[[[DT_14]]]]", 
841
-                    "node": "[[[[node]]]]", 
842
-                    "ramdisk_id": "", 
843
-                    "access_ip_v6": "[[[[V6_0]]]]", 
844
-                    "access_ip_v4": "[[[[V4_0]]]]", 
845
-                    "kernel_id": "", 
846
-                    "key_name": null, 
847
-                    "updated_at": "[[[[DT_18]]]]", 
848
-                    "host": "[[[[host]]]]", 
849
-                    "root_gb": 40, 
850
-                    "user_id": "[[[[XUUID_1]]]]", 
851
-                    "system_metadata": {
852
-                        "instance_type_id": "15", 
853
-                        "image_min_ram": "1024", 
854
-                        "instance_type_vcpu_weight": "10", 
855
-                        "image_cache_in_nova": "True", 
856
-                        "instance_type_ephemeral_gb": "600", 
857
-                        "image_org.openstack__1__os_version": "2008.2", 
858
-                        "image_org.openstack__1__os_distro": "com.microsoft.server", 
859
-                        "image_org.openstack__1__architecture": "x64", 
860
-                        "image_base_image_ref": "[[[[UUID_2]]]]", 
861
-                        "image_os_type": "windows", 
862
-                        "instance_type_root_gb": "40", 
863
-                        "instance_type_name": "60 GB Performance", 
864
-                        "image_image_type": "base", 
865
-                        "instance_type_rxtx_factor": "5000.0", 
866
-                        "image_auto_disk_config": "False", 
867
-                        "instance_type_vcpus": "16", 
868
-                        "image_disk_format": "vhd", 
869
-                        "instance_type_memory_mb": "61440", 
870
-                        "instance_type_swap": "0", 
871
-                        "image_min_disk": "40", 
872
-                        "instance_type_flavorid": "performance2-60", 
873
-                        "image_container_format": "ovf"
874
-                    }, 
875
-                    "task_state": "deleting", 
876
-                    "shutdown_terminate": false, 
877
-                    "cell_name": null, 
878
-                    "ephemeral_key_uuid": null, 
879
-                    "locked": false, 
880
-                    "name": "instance-[[[[UUID_1]]]]", 
881
-                    "created_at": "[[[[DT_14]]]]", 
882
-                    "locked_by": null, 
883
-                    "launch_index": 0, 
884
-                    "memory_mb": 61440, 
885
-                    "vcpus": 16, 
886
-                    "image_ref": "[[[[UUID_2]]]]", 
887
-                    "architecture": "x64", 
888
-                    "auto_disk_config": false, 
889
-                    "os_type": "windows", 
890
-                    "metadata": {}
891
-                }, 
892
-                "self": null, 
893
-                "context": {
894
-                    "project_name": "[[[[tenant_id]]]]", 
895
-                    "user_id": "[[[[user_id]]]]", 
896
-                    "roles": [
897
-                        "user-admin", 
898
-                        "bofh", 
899
-                        "glance", 
900
-                        "glance:admin", 
901
-                        "admin"
902
-                    ], 
903
-                    "_read_deleted": "no", 
904
-                    "timestamp": "[[[[DT_5]]]]", 
905
-                    "auth_token": "[[[[XUUID_0]]]]", 
906
-                    "remote_address": "[[[[V4_2]]]]", 
907
-                    "quota_class": null, 
908
-                    "is_admin": true, 
909
-                    "glance_api_servers": null, 
910
-                    "request_id": "req-[[[[UUID_0]]]]", 
911
-                    "instance_lock_checked": false, 
912
-                    "project_id": "[[[[tenant_id]]]]", 
913
-                    "user_name": "[[[[user_id]]]]"
914
-                }, 
915
-                "bdms": [
916
-                    {
917
-                        "instance_uuid": "[[[[UUID_1]]]]", 
918
-                        "virtual_name": null, 
919
-                        "no_device": null, 
920
-                        "created_at": "[[[[DT_19]]]]", 
921
-                        "snapshot_id": null, 
922
-                        "updated_at": "[[[[DT_20]]]]", 
923
-                        "device_name": "/dev/xvdb", 
924
-                        "deleted": 0, 
925
-                        "volume_size": null, 
926
-                        "volume_id": "[[[[UUID_15]]]]", 
927
-                        "id": 13754, 
928
-                        "deleted_at": null, 
929
-                        "delete_on_termination": false
930
-                    }, 
931
-                    {
932
-                        "instance_uuid": "[[[[UUID_1]]]]", 
933
-                        "virtual_name": null, 
934
-                        "no_device": null, 
935
-                        "created_at": "[[[[DT_21]]]]", 
936
-                        "snapshot_id": null, 
937
-                        "updated_at": "[[[[DT_22]]]]", 
938
-                        "device_name": "/dev/xvdc", 
939
-                        "deleted": 0, 
940
-                        "volume_size": null, 
941
-                        "volume_id": "[[[[UUID_16]]]]", 
942
-                        "id": 13755, 
943
-                        "deleted_at": null, 
944
-                        "delete_on_termination": false
945
-                    }
946
-                ], 
947
-                "reservations": []
948
-            }
949
-        }, 
950
-        "priority": "ERROR", 
951
-        "_context_is_admin": true, 
952
-        "_context_user": "[[[[user_id]]]]", 
953
-        "publisher_id": "[[[[publisher_id]]]]", 
954
-        "message_id": "[[[[UUID_17]]]]", 
955
-        "_context_remote_address": "[[[[V4_2]]]]", 
956
-        "_context_roles": [
957
-            "user-admin", 
958
-            "bofh", 
959
-            "glance", 
960
-            "glance:admin", 
961
-            "admin"
962
-        ], 
963
-        "timestamp": "[[[[DT_23]]]]", 
964
-        "_context_timestamp": "[[[[DT_5]]]]", 
965
-        "_unique_id": "[[[[XUUID_8]]]]", 
966
-        "_context_glance_api_servers": null, 
967
-        "_context_project_name": "[[[[tenant_id]]]]", 
968
-        "_context_read_deleted": "no", 
969
-        "_context_tenant": "[[[[tenant_id]]]]", 
970
-        "_context_instance_lock_checked": false, 
971
-        "_context_project_id": "[[[[tenant_id]]]]", 
972
-        "_context_user_name": "[[[[user_id]]]]"
973
-    }
974
-]

+ 0
- 370
demo/files/event_templates/compute.instance.power_off.start_4.json View File

@@ -1,370 +0,0 @@
1
-[
2
-    {
3
-        "xuuid": 4, 
4
-        "v4": 2, 
5
-        "time_map": {
6
-            "[[[[DT_9]]]]": [
7
-                0, 
8
-                1, 
9
-                19109
10
-            ], 
11
-            "[[[[DT_5]]]]": [
12
-                -1, 
13
-                86392, 
14
-                365732
15
-            ], 
16
-            "[[[[DT_7]]]]": [
17
-                0, 
18
-                0, 
19
-                667761
20
-            ], 
21
-            "[[[[DT_1]]]]": [
22
-                -321, 
23
-                54605, 
24
-                667761
25
-            ], 
26
-            "[[[[DT_3]]]]": [
27
-                -1, 
28
-                86399, 
29
-                667761
30
-            ], 
31
-            "[[[[DT_8]]]]": [
32
-                0, 
33
-                0, 
34
-                990505
35
-            ], 
36
-            "[[[[DT_4]]]]": [
37
-                0, 
38
-                0, 
39
-                0
40
-            ], 
41
-            "[[[[DT_6]]]]": [
42
-                0, 
43
-                0, 
44
-                175295
45
-            ], 
46
-            "[[[[DT_0]]]]": [
47
-                -1, 
48
-                19714, 
49
-                667761
50
-            ], 
51
-            "[[[[DT_2]]]]": [
52
-                -321, 
53
-                54911, 
54
-                667761
55
-            ]
56
-        }, 
57
-        "uuid": 7, 
58
-        "v6": 1
59
-    }, 
60
-    {
61
-        "_context_request_id": "req-[[[[UUID_0]]]]", 
62
-        "_context_quota_class": null, 
63
-        "event_type": "compute.instance.update", 
64
-        "_context_auth_token": null, 
65
-        "_context_user_id": "[[[[user_id]]]]", 
66
-        "payload": {
67
-            "state_description": "powering-off", 
68
-            "availability_zone": null, 
69
-            "terminated_at": "", 
70
-            "ephemeral_gb": 0, 
71
-            "instance_type_id": 5, 
72
-            "bandwidth": {
73
-                "public": {
74
-                    "bw_in": 537783, 
75
-                    "bw_out": 19189871
76
-                }
77
-            }, 
78
-            "deleted_at": "", 
79
-            "reservation_id": "[[[[reservation_id]]]]", 
80
-            "instance_id": "[[[[UUID_1]]]]", 
81
-            "user_id": "[[[[user_id]]]]", 
82
-            "hostname": "[[[[hostname]]]]", 
83
-            "state": "active", 
84
-            "old_state": "active", 
85
-            "old_task_state": null, 
86
-            "metadata": {}, 
87
-            "node": "[[[[node]]]]", 
88
-            "ramdisk_id": "", 
89
-            "access_ip_v6": "[[[[V6_0]]]]", 
90
-            "disk_gb": 160, 
91
-            "access_ip_v4": "[[[[V4_0]]]]", 
92
-            "kernel_id": "", 
93
-            "host": "[[[[host]]]]", 
94
-            "display_name": "[[[[display_name]]]]", 
95
-            "image_ref_url": "http://[[[[V4_1]]]]:9292/images/[[[[UUID_2]]]]", 
96
-            "audit_period_beginning": "[[[[DT_0]]]]", 
97
-            "root_gb": 160, 
98
-            "tenant_id": "[[[[tenant_id]]]]", 
99
-            "created_at": "[[[[DT_1]]]]", 
100
-            "launched_at": "[[[[DT_2]]]]", 
101
-            "memory_mb": 4096, 
102
-            "instance_type": "4GB Standard Instance", 
103
-            "vcpus": 2, 
104
-            "image_meta": {
105
-                "container_format": "ovf", 
106
-                "min_ram": "512", 
107
-                "base_image_ref": "[[[[UUID_2]]]]", 
108
-                "os_distro": "rhel", 
109
-                "org.openstack__1__os_distro": "com.redhat", 
110
-                "image_type": "base", 
111
-                "disk_format": "vhd", 
112
-                "org.openstack__1__architecture": "x64", 
113
-                "auto_disk_config": "True", 
114
-                "min_disk": "160", 
115
-                "cache_in_nova": "True", 
116
-                "os_type": "linux", 
117
-                "org.openstack__1__os_version": "6.3"
118
-            }, 
119
-            "architecture": null, 
120
-            "new_task_state": "powering-off", 
121
-            "audit_period_ending": "[[[[DT_3]]]]", 
122
-            "os_type": "linux", 
123
-            "instance_flavor_id": "5"
124
-        }, 
125
-        "priority": "INFO", 
126
-        "_context_is_admin": true, 
127
-        "_context_user": "[[[[user_id]]]]", 
128
-        "publisher_id": "[[[[publisher_id]]]]", 
129
-        "message_id": "[[[[UUID_3]]]]", 
130
-        "_context_remote_address": null, 
131
-        "_context_roles": [], 
132
-        "timestamp": "[[[[DT_4]]]]", 
133
-        "_context_timestamp": "[[[[DT_5]]]]", 
134
-        "_unique_id": "[[[[XUUID_0]]]]", 
135
-        "_context_glance_api_servers": null,