Browse Source

Add 'updated_at' field to InstancePayload in notifications

Change-Id: Iddc5ec3b5053ddf5dce73c86edca26c4552d451b
Implements: bp versioned-notification-transformation-pike
Closes-Bug: #1684860
tags/16.0.0.0b3
Takashi NATSUME 3 years ago
committed by Balazs Gibizer
parent
commit
bf17be9e8f
56 changed files with 166 additions and 102 deletions
  1. +2
    -1
      doc/notification_samples/instance-create-end.json
  2. +2
    -1
      doc/notification_samples/instance-create-error.json
  3. +2
    -1
      doc/notification_samples/instance-create-start.json
  4. +2
    -1
      doc/notification_samples/instance-delete-end.json
  5. +2
    -1
      doc/notification_samples/instance-delete-start.json
  6. +3
    -2
      doc/notification_samples/instance-live_migration_rollback-end.json
  7. +3
    -2
      doc/notification_samples/instance-live_migration_rollback-start.json
  8. +2
    -1
      doc/notification_samples/instance-pause-end.json
  9. +2
    -1
      doc/notification_samples/instance-pause-start.json
  10. +2
    -1
      doc/notification_samples/instance-power_off-end.json
  11. +2
    -1
      doc/notification_samples/instance-power_off-start.json
  12. +2
    -1
      doc/notification_samples/instance-power_on-end.json
  13. +2
    -1
      doc/notification_samples/instance-power_on-start.json
  14. +2
    -1
      doc/notification_samples/instance-reboot-end.json
  15. +2
    -1
      doc/notification_samples/instance-reboot-error.json
  16. +2
    -1
      doc/notification_samples/instance-reboot-start.json
  17. +3
    -2
      doc/notification_samples/instance-rebuild-end.json
  18. +3
    -2
      doc/notification_samples/instance-rebuild-error.json
  19. +3
    -2
      doc/notification_samples/instance-rebuild-start.json
  20. +3
    -2
      doc/notification_samples/instance-resize-end.json
  21. +3
    -2
      doc/notification_samples/instance-resize-start.json
  22. +3
    -2
      doc/notification_samples/instance-resize_finish-end.json
  23. +3
    -2
      doc/notification_samples/instance-resize_finish-start.json
  24. +3
    -2
      doc/notification_samples/instance-restore-end.json
  25. +3
    -2
      doc/notification_samples/instance-restore-start.json
  26. +3
    -2
      doc/notification_samples/instance-resume-end.json
  27. +3
    -2
      doc/notification_samples/instance-resume-start.json
  28. +3
    -2
      doc/notification_samples/instance-shelve-end.json
  29. +3
    -2
      doc/notification_samples/instance-shelve-start.json
  30. +3
    -2
      doc/notification_samples/instance-shelve_offload-end.json
  31. +3
    -2
      doc/notification_samples/instance-shelve_offload-start.json
  32. +3
    -2
      doc/notification_samples/instance-shutdown-end.json
  33. +3
    -2
      doc/notification_samples/instance-shutdown-start.json
  34. +3
    -2
      doc/notification_samples/instance-snapshot-end.json
  35. +3
    -2
      doc/notification_samples/instance-snapshot-start.json
  36. +2
    -1
      doc/notification_samples/instance-soft_delete-end.json
  37. +2
    -1
      doc/notification_samples/instance-soft_delete-start.json
  38. +3
    -2
      doc/notification_samples/instance-suspend-end.json
  39. +3
    -2
      doc/notification_samples/instance-suspend-start.json
  40. +3
    -2
      doc/notification_samples/instance-unpause-end.json
  41. +3
    -2
      doc/notification_samples/instance-unpause-start.json
  42. +3
    -2
      doc/notification_samples/instance-unshelve-end.json
  43. +3
    -2
      doc/notification_samples/instance-unshelve-start.json
  44. +4
    -2
      doc/notification_samples/instance-update-tags-action.json
  45. +4
    -2
      doc/notification_samples/instance-update.json
  46. +3
    -2
      doc/notification_samples/instance-volume_attach-end.json
  47. +3
    -2
      doc/notification_samples/instance-volume_attach-error.json
  48. +3
    -2
      doc/notification_samples/instance-volume_attach-start.json
  49. +3
    -2
      doc/notification_samples/instance-volume_detach-end.json
  50. +3
    -2
      doc/notification_samples/instance-volume_detach-start.json
  51. +2
    -1
      doc/notification_samples/instance-volume_swap-end.json
  52. +2
    -1
      doc/notification_samples/instance-volume_swap-error.json
  53. +2
    -1
      doc/notification_samples/instance-volume_swap-start.json
  54. +16
    -8
      nova/notifications/objects/instance.py
  55. +2
    -1
      nova/tests/functional/notification_sample_tests/test_instance.py
  56. +6
    -6
      nova/tests/unit/notifications/objects/test_notification.py

+ 2
- 1
doc/notification_samples/instance-create-end.json View File

@@ -78,12 +78,13 @@
"nova_object.version": "1.3",
"nova_object.namespace": "nova"
},
"updated_at": "2012-10-29T13:42:11Z",
"user_id":"fake",
"uuid":"178b0921-8f85-4257-88b6-2e743b5a975c"
},
"nova_object.name":"InstanceCreatePayload",
"nova_object.namespace":"nova",
"nova_object.version":"1.6"
"nova_object.version":"1.7"
},
"priority":"INFO",
"publisher_id":"nova-compute:compute"


+ 2
- 1
doc/notification_samples/instance-create-error.json View File

@@ -75,12 +75,13 @@
"nova_object.version": "1.3",
"nova_object.namespace": "nova"
},
"updated_at": "2012-10-29T13:42:11Z",
"user_id":"fake",
"uuid":"178b0921-8f85-4257-88b6-2e743b5a975c"
},
"nova_object.name":"InstanceCreatePayload",
"nova_object.namespace":"nova",
"nova_object.version":"1.6"
"nova_object.version":"1.7"
},
"priority":"ERROR",
"publisher_id":"nova-compute:compute"


+ 2
- 1
doc/notification_samples/instance-create-start.json View File

@@ -65,12 +65,13 @@
"nova_object.version": "1.3",
"nova_object.namespace": "nova"
},
"updated_at": null,
"user_id":"fake",
"uuid":"178b0921-8f85-4257-88b6-2e743b5a975c"
},
"nova_object.name":"InstanceCreatePayload",
"nova_object.namespace":"nova",
"nova_object.version":"1.6"
"nova_object.version":"1.7"
},
"priority":"INFO",
"publisher_id":"nova-compute:compute"


+ 2
- 1
doc/notification_samples/instance-delete-end.json View File

@@ -52,12 +52,13 @@
"nova_object.version": "1.3",
"nova_object.namespace": "nova"
},
"updated_at": "2012-10-29T13:42:11Z",
"user_id":"fake",
"uuid":"178b0921-8f85-4257-88b6-2e743b5a975c"
},
"nova_object.name":"InstanceActionPayload",
"nova_object.namespace":"nova",
"nova_object.version":"1.4"
"nova_object.version":"1.5"
},
"priority":"INFO",
"publisher_id":"nova-compute:compute"


+ 2
- 1
doc/notification_samples/instance-delete-start.json View File

@@ -76,12 +76,13 @@
"nova_object.version": "1.3",
"nova_object.namespace": "nova"
},
"updated_at": "2012-10-29T13:42:11Z",
"user_id":"fake",
"uuid":"178b0921-8f85-4257-88b6-2e743b5a975c"
},
"nova_object.name":"InstanceActionPayload",
"nova_object.namespace":"nova",
"nova_object.version":"1.4"
"nova_object.version":"1.5"
},
"priority":"INFO",
"publisher_id":"nova-compute:compute"


+ 3
- 2
doc/notification_samples/instance-live_migration_rollback-end.json View File

@@ -77,11 +77,12 @@
"nova_object.namespace": "nova"
},
"user_id":"fake",
"uuid":"178b0921-8f85-4257-88b6-2e743b5a975c"
"uuid":"178b0921-8f85-4257-88b6-2e743b5a975c",
"updated_at": "2012-10-29T13:42:11Z"
},
"nova_object.name":"InstanceActionPayload",
"nova_object.namespace":"nova",
"nova_object.version":"1.4"
"nova_object.version":"1.5"
},
"priority":"INFO",
"publisher_id":"nova-compute:compute"


+ 3
- 2
doc/notification_samples/instance-live_migration_rollback-start.json View File

@@ -77,11 +77,12 @@
"nova_object.namespace": "nova"
},
"user_id":"fake",
"uuid":"178b0921-8f85-4257-88b6-2e743b5a975c"
"uuid":"178b0921-8f85-4257-88b6-2e743b5a975c",
"updated_at": "2012-10-29T13:42:11Z"
},
"nova_object.name":"InstanceActionPayload",
"nova_object.namespace":"nova",
"nova_object.version":"1.4"
"nova_object.version":"1.5"
},
"priority":"INFO",
"publisher_id":"nova-compute:compute"


+ 2
- 1
doc/notification_samples/instance-pause-end.json View File

@@ -76,12 +76,13 @@
"nova_object.version": "1.3",
"nova_object.namespace": "nova"
},
"updated_at": "2012-10-29T13:42:11Z",
"user_id":"fake",
"uuid":"178b0921-8f85-4257-88b6-2e743b5a975c"
},
"nova_object.name":"InstanceActionPayload",
"nova_object.namespace":"nova",
"nova_object.version":"1.4"
"nova_object.version":"1.5"
},
"priority":"INFO",
"publisher_id":"nova-compute:compute"


+ 2
- 1
doc/notification_samples/instance-pause-start.json View File

@@ -76,12 +76,13 @@
"nova_object.version": "1.3",
"nova_object.namespace": "nova"
},
"updated_at": "2012-10-29T13:42:11Z",
"user_id":"fake",
"uuid":"178b0921-8f85-4257-88b6-2e743b5a975c"
},
"nova_object.name":"InstanceActionPayload",
"nova_object.namespace":"nova",
"nova_object.version":"1.4"
"nova_object.version":"1.5"
},
"priority":"INFO",
"publisher_id":"nova-compute:compute"


+ 2
- 1
doc/notification_samples/instance-power_off-end.json View File

@@ -76,12 +76,13 @@
"nova_object.version": "1.3",
"nova_object.namespace": "nova"
},
"updated_at": "2012-10-29T13:42:11Z",
"user_id":"fake",
"uuid":"178b0921-8f85-4257-88b6-2e743b5a975c"
},
"nova_object.name":"InstanceActionPayload",
"nova_object.namespace":"nova",
"nova_object.version":"1.4"
"nova_object.version":"1.5"
},
"priority":"INFO",
"publisher_id":"nova-compute:compute"


+ 2
- 1
doc/notification_samples/instance-power_off-start.json View File

@@ -76,12 +76,13 @@
"nova_object.version": "1.3",
"nova_object.namespace": "nova"
},
"updated_at": "2012-10-29T13:42:11Z",
"user_id":"fake",
"uuid":"178b0921-8f85-4257-88b6-2e743b5a975c"
},
"nova_object.name":"InstanceActionPayload",
"nova_object.namespace":"nova",
"nova_object.version":"1.4"
"nova_object.version":"1.5"
},
"priority":"INFO",
"publisher_id":"nova-compute:compute"


+ 2
- 1
doc/notification_samples/instance-power_on-end.json View File

@@ -76,12 +76,13 @@
"nova_object.version": "1.3",
"nova_object.namespace": "nova"
},
"updated_at": "2012-10-29T13:42:11Z",
"user_id":"fake",
"uuid":"178b0921-8f85-4257-88b6-2e743b5a975c"
},
"nova_object.name":"InstanceActionPayload",
"nova_object.namespace":"nova",
"nova_object.version":"1.4"
"nova_object.version":"1.5"
},
"priority":"INFO",
"publisher_id":"nova-compute:compute"


+ 2
- 1
doc/notification_samples/instance-power_on-start.json View File

@@ -76,12 +76,13 @@
"nova_object.version": "1.3",
"nova_object.namespace": "nova"
},
"updated_at": "2012-10-29T13:42:11Z",
"user_id":"fake",
"uuid":"178b0921-8f85-4257-88b6-2e743b5a975c"
},
"nova_object.name":"InstanceActionPayload",
"nova_object.namespace":"nova",
"nova_object.version":"1.4"
"nova_object.version":"1.5"
},
"priority":"INFO",
"publisher_id":"nova-compute:compute"


+ 2
- 1
doc/notification_samples/instance-reboot-end.json View File

@@ -76,12 +76,13 @@
"nova_object.version": "1.3",
"nova_object.namespace": "nova"
},
"updated_at": "2012-10-29T13:42:11Z",
"user_id":"fake",
"uuid":"178b0921-8f85-4257-88b6-2e743b5a975c"
},
"nova_object.name":"InstanceActionPayload",
"nova_object.namespace":"nova",
"nova_object.version":"1.4"
"nova_object.version":"1.5"
},
"priority":"INFO",
"publisher_id":"nova-compute:compute"


+ 2
- 1
doc/notification_samples/instance-reboot-error.json View File

@@ -86,12 +86,13 @@
"nova_object.version": "1.3",
"nova_object.namespace": "nova"
},
"updated_at": "2012-10-29T13:42:11Z",
"user_id":"fake",
"uuid":"178b0921-8f85-4257-88b6-2e743b5a975c"
},
"nova_object.name":"InstanceActionPayload",
"nova_object.namespace":"nova",
"nova_object.version":"1.4"
"nova_object.version":"1.5"
},
"priority":"ERROR",
"publisher_id":"nova-compute:compute"


+ 2
- 1
doc/notification_samples/instance-reboot-start.json View File

@@ -76,12 +76,13 @@
"nova_object.version": "1.3",
"nova_object.namespace": "nova"
},
"updated_at": "2012-10-29T13:42:11Z",
"user_id":"fake",
"uuid":"178b0921-8f85-4257-88b6-2e743b5a975c"
},
"nova_object.name":"InstanceActionPayload",
"nova_object.namespace":"nova",
"nova_object.version":"1.4"
"nova_object.version":"1.5"
},
"priority":"INFO",
"publisher_id":"nova-compute:compute"


+ 3
- 2
doc/notification_samples/instance-rebuild-end.json View File

@@ -3,7 +3,7 @@
"publisher_id": "nova-compute:compute",
"payload": {
"nova_object.namespace": "nova",
"nova_object.version": "1.4",
"nova_object.version": "1.5",
"nova_object.data": {
"node": "fake-mini",
"fault": null,
@@ -80,7 +80,8 @@
"ramdisk_id": "",
"architecture": null,
"progress": 0,
"task_state": null
"task_state": null,
"updated_at": "2012-10-29T13:42:11Z"
},
"nova_object.name": "InstanceActionPayload"
},


+ 3
- 2
doc/notification_samples/instance-rebuild-error.json View File

@@ -88,9 +88,10 @@
},
"nova_object.version": "1.0",
"nova_object.namespace": "nova"
}
},
"updated_at": "2012-10-29T13:42:11Z"
},
"nova_object.version": "1.4",
"nova_object.version": "1.5",
"nova_object.namespace": "nova"
},
"publisher_id": "nova-compute:compute",


+ 3
- 2
doc/notification_samples/instance-rebuild-start.json View File

@@ -5,7 +5,7 @@
"payload": {
"nova_object.name": "InstanceActionPayload",
"nova_object.namespace": "nova",
"nova_object.version": "1.4",
"nova_object.version": "1.5",
"nova_object.data": {
"display_description": "some-server",
"reservation_id": "r-rqe0mlje",
@@ -82,7 +82,8 @@
"host": "compute",
"image_uuid": "a2459075-d96c-40d5-893e-577ff92e721c",
"state": "active",
"fault": null
"fault": null,
"updated_at": "2012-10-29T13:42:11Z"
}
}
}

+ 3
- 2
doc/notification_samples/instance-resize-end.json View File

@@ -77,11 +77,12 @@
"nova_object.namespace": "nova"
},
"user_id":"fake",
"uuid":"178b0921-8f85-4257-88b6-2e743b5a975c"
"uuid":"178b0921-8f85-4257-88b6-2e743b5a975c",
"updated_at": "2012-10-29T13:42:11Z"
},
"nova_object.name":"InstanceActionPayload",
"nova_object.namespace":"nova",
"nova_object.version":"1.4"
"nova_object.version":"1.5"
},
"priority":"INFO",
"publisher_id":"nova-compute:compute"


+ 3
- 2
doc/notification_samples/instance-resize-start.json View File

@@ -77,11 +77,12 @@
"nova_object.namespace": "nova"
},
"user_id":"fake",
"uuid":"178b0921-8f85-4257-88b6-2e743b5a975c"
"uuid":"178b0921-8f85-4257-88b6-2e743b5a975c",
"updated_at": "2012-10-29T13:42:11Z"
},
"nova_object.name":"InstanceActionPayload",
"nova_object.namespace":"nova",
"nova_object.version":"1.4"
"nova_object.version":"1.5"
},
"priority":"INFO",
"publisher_id":"nova-compute:compute"


+ 3
- 2
doc/notification_samples/instance-resize_finish-end.json View File

@@ -77,11 +77,12 @@
"nova_object.namespace": "nova"
},
"user_id":"fake",
"uuid":"178b0921-8f85-4257-88b6-2e743b5a975c"
"uuid":"178b0921-8f85-4257-88b6-2e743b5a975c",
"updated_at": "2012-10-29T13:42:11Z"
},
"nova_object.name":"InstanceActionPayload",
"nova_object.namespace":"nova",
"nova_object.version":"1.4"
"nova_object.version":"1.5"
},
"priority":"INFO",
"publisher_id":"nova-compute:compute"


+ 3
- 2
doc/notification_samples/instance-resize_finish-start.json View File

@@ -77,11 +77,12 @@
"nova_object.namespace": "nova"
},
"user_id":"fake",
"uuid":"178b0921-8f85-4257-88b6-2e743b5a975c"
"uuid":"178b0921-8f85-4257-88b6-2e743b5a975c",
"updated_at": "2012-10-29T13:42:11Z"
},
"nova_object.name":"InstanceActionPayload",
"nova_object.namespace":"nova",
"nova_object.version":"1.4"
"nova_object.version":"1.5"
},
"priority":"INFO",
"publisher_id":"nova-compute:compute"


+ 3
- 2
doc/notification_samples/instance-restore-end.json View File

@@ -77,11 +77,12 @@
"nova_object.namespace": "nova"
},
"user_id":"fake",
"uuid":"178b0921-8f85-4257-88b6-2e743b5a975c"
"uuid":"178b0921-8f85-4257-88b6-2e743b5a975c",
"updated_at": "2012-10-29T13:42:11Z"
},
"nova_object.name":"InstanceActionPayload",
"nova_object.namespace":"nova",
"nova_object.version":"1.4"
"nova_object.version":"1.5"
},
"priority":"INFO",
"publisher_id":"nova-compute:compute"


+ 3
- 2
doc/notification_samples/instance-restore-start.json View File

@@ -77,11 +77,12 @@
"nova_object.namespace": "nova"
},
"user_id":"fake",
"uuid":"178b0921-8f85-4257-88b6-2e743b5a975c"
"uuid":"178b0921-8f85-4257-88b6-2e743b5a975c",
"updated_at": "2012-10-29T13:42:11Z"
},
"nova_object.name":"InstanceActionPayload",
"nova_object.namespace":"nova",
"nova_object.version":"1.4"
"nova_object.version":"1.5"
},
"priority":"INFO",
"publisher_id":"nova-compute:compute"


+ 3
- 2
doc/notification_samples/instance-resume-end.json View File

@@ -77,11 +77,12 @@
"nova_object.namespace": "nova"
},
"user_id":"fake",
"uuid":"178b0921-8f85-4257-88b6-2e743b5a975c"
"uuid":"178b0921-8f85-4257-88b6-2e743b5a975c",
"updated_at": "2012-10-29T13:42:11Z"
},
"nova_object.name":"InstanceActionPayload",
"nova_object.namespace":"nova",
"nova_object.version":"1.4"
"nova_object.version":"1.5"
},
"priority":"INFO",
"publisher_id":"nova-compute:compute"


+ 3
- 2
doc/notification_samples/instance-resume-start.json View File

@@ -77,11 +77,12 @@
"nova_object.namespace": "nova"
},
"user_id":"fake",
"uuid":"178b0921-8f85-4257-88b6-2e743b5a975c"
"uuid":"178b0921-8f85-4257-88b6-2e743b5a975c",
"updated_at": "2012-10-29T13:42:11Z"
},
"nova_object.name":"InstanceActionPayload",
"nova_object.namespace":"nova",
"nova_object.version":"1.4"
"nova_object.version":"1.5"
},
"priority":"INFO",
"publisher_id":"nova-compute:compute"


+ 3
- 2
doc/notification_samples/instance-shelve-end.json View File

@@ -77,11 +77,12 @@
"nova_object.namespace": "nova"
},
"user_id":"fake",
"uuid":"178b0921-8f85-4257-88b6-2e743b5a975c"
"uuid":"178b0921-8f85-4257-88b6-2e743b5a975c",
"updated_at": "2012-10-29T13:42:11Z"
},
"nova_object.name":"InstanceActionPayload",
"nova_object.namespace":"nova",
"nova_object.version":"1.4"
"nova_object.version":"1.5"
},
"priority":"INFO",
"publisher_id":"nova-compute:compute"


+ 3
- 2
doc/notification_samples/instance-shelve-start.json View File

@@ -77,11 +77,12 @@
"nova_object.namespace": "nova"
},
"user_id":"fake",
"uuid":"178b0921-8f85-4257-88b6-2e743b5a975c"
"uuid":"178b0921-8f85-4257-88b6-2e743b5a975c",
"updated_at": "2012-10-29T13:42:11Z"
},
"nova_object.name":"InstanceActionPayload",
"nova_object.namespace":"nova",
"nova_object.version":"1.4"
"nova_object.version":"1.5"
},
"priority":"INFO",
"publisher_id":"nova-compute:compute"


+ 3
- 2
doc/notification_samples/instance-shelve_offload-end.json View File

@@ -77,11 +77,12 @@
"nova_object.namespace": "nova"
},
"user_id":"fake",
"uuid":"178b0921-8f85-4257-88b6-2e743b5a975c"
"uuid":"178b0921-8f85-4257-88b6-2e743b5a975c",
"updated_at": "2012-10-29T13:42:11Z"
},
"nova_object.name":"InstanceActionPayload",
"nova_object.namespace":"nova",
"nova_object.version":"1.4"
"nova_object.version":"1.5"
},
"priority":"INFO",
"publisher_id":"nova-compute:compute"


+ 3
- 2
doc/notification_samples/instance-shelve_offload-start.json View File

@@ -77,11 +77,12 @@
"nova_object.namespace": "nova"
},
"user_id":"fake",
"uuid":"178b0921-8f85-4257-88b6-2e743b5a975c"
"uuid":"178b0921-8f85-4257-88b6-2e743b5a975c",
"updated_at": "2012-10-29T13:42:11Z"
},
"nova_object.name":"InstanceActionPayload",
"nova_object.namespace":"nova",
"nova_object.version":"1.4"
"nova_object.version":"1.5"
},
"priority":"INFO",
"publisher_id":"nova-compute:compute"


+ 3
- 2
doc/notification_samples/instance-shutdown-end.json View File

@@ -64,11 +64,12 @@
"nova_object.namespace": "nova"
},
"user_id":"fake",
"uuid":"178b0921-8f85-4257-88b6-2e743b5a975c"
"uuid":"178b0921-8f85-4257-88b6-2e743b5a975c",
"updated_at": "2012-10-29T13:42:11Z"
},
"nova_object.name":"InstanceActionPayload",
"nova_object.namespace":"nova",
"nova_object.version":"1.4"
"nova_object.version":"1.5"
},
"priority":"INFO",
"publisher_id":"nova-compute:compute"


+ 3
- 2
doc/notification_samples/instance-shutdown-start.json View File

@@ -77,11 +77,12 @@
"nova_object.namespace": "nova"
},
"user_id":"fake",
"uuid":"178b0921-8f85-4257-88b6-2e743b5a975c"
"uuid":"178b0921-8f85-4257-88b6-2e743b5a975c",
"updated_at": "2012-10-29T13:42:11Z"
},
"nova_object.name":"InstanceActionPayload",
"nova_object.namespace":"nova",
"nova_object.version":"1.4"
"nova_object.version":"1.5"
},
"priority":"INFO",
"publisher_id":"nova-compute:compute"


+ 3
- 2
doc/notification_samples/instance-snapshot-end.json View File

@@ -77,11 +77,12 @@
"nova_object.namespace": "nova"
},
"user_id":"fake",
"uuid":"178b0921-8f85-4257-88b6-2e743b5a975c"
"uuid":"178b0921-8f85-4257-88b6-2e743b5a975c",
"updated_at": "2012-10-29T13:42:11Z"
},
"nova_object.name":"InstanceActionPayload",
"nova_object.namespace":"nova",
"nova_object.version":"1.4"
"nova_object.version":"1.5"
},
"priority":"INFO",
"publisher_id":"nova-compute:compute"


+ 3
- 2
doc/notification_samples/instance-snapshot-start.json View File

@@ -77,11 +77,12 @@
"nova_object.namespace": "nova"
},
"user_id":"fake",
"uuid":"178b0921-8f85-4257-88b6-2e743b5a975c"
"uuid":"178b0921-8f85-4257-88b6-2e743b5a975c",
"updated_at": "2012-10-29T13:42:11Z"
},
"nova_object.name":"InstanceActionPayload",
"nova_object.namespace":"nova",
"nova_object.version":"1.4"
"nova_object.version":"1.5"
},
"priority":"INFO",
"publisher_id":"nova-compute:compute"


+ 2
- 1
doc/notification_samples/instance-soft_delete-end.json View File

@@ -76,12 +76,13 @@
"nova_object.version": "1.3",
"nova_object.namespace": "nova"
},
"updated_at": "2012-10-29T13:42:11Z",
"user_id":"fake",
"uuid":"178b0921-8f85-4257-88b6-2e743b5a975c"
},
"nova_object.name":"InstanceActionPayload",
"nova_object.namespace":"nova",
"nova_object.version":"1.4"
"nova_object.version":"1.5"
},
"priority":"INFO",
"publisher_id":"nova-compute:compute"


+ 2
- 1
doc/notification_samples/instance-soft_delete-start.json View File

@@ -76,12 +76,13 @@
"nova_object.version": "1.3",
"nova_object.namespace": "nova"
},
"updated_at": "2012-10-29T13:42:11Z",
"user_id":"fake",
"uuid":"178b0921-8f85-4257-88b6-2e743b5a975c"
},
"nova_object.name":"InstanceActionPayload",
"nova_object.namespace":"nova",
"nova_object.version":"1.4"
"nova_object.version":"1.5"
},
"priority":"INFO",
"publisher_id":"nova-compute:compute"


+ 3
- 2
doc/notification_samples/instance-suspend-end.json View File

@@ -77,11 +77,12 @@
"nova_object.namespace": "nova"
},
"user_id":"fake",
"uuid":"178b0921-8f85-4257-88b6-2e743b5a975c"
"uuid":"178b0921-8f85-4257-88b6-2e743b5a975c",
"updated_at": "2012-10-29T13:42:11Z"
},
"nova_object.name":"InstanceActionPayload",
"nova_object.namespace":"nova",
"nova_object.version":"1.4"
"nova_object.version":"1.5"
},
"priority":"INFO",
"publisher_id":"nova-compute:compute"


+ 3
- 2
doc/notification_samples/instance-suspend-start.json View File

@@ -77,11 +77,12 @@
"nova_object.namespace": "nova"
},
"user_id":"fake",
"uuid":"178b0921-8f85-4257-88b6-2e743b5a975c"
"uuid":"178b0921-8f85-4257-88b6-2e743b5a975c",
"updated_at": "2012-10-29T13:42:11Z"
},
"nova_object.name":"InstanceActionPayload",
"nova_object.namespace":"nova",
"nova_object.version":"1.4"
"nova_object.version":"1.5"
},
"priority":"INFO",
"publisher_id":"nova-compute:compute"


+ 3
- 2
doc/notification_samples/instance-unpause-end.json View File

@@ -77,11 +77,12 @@
"nova_object.namespace": "nova"
},
"user_id":"fake",
"uuid":"178b0921-8f85-4257-88b6-2e743b5a975c"
"uuid":"178b0921-8f85-4257-88b6-2e743b5a975c",
"updated_at": "2012-10-29T13:42:11Z"
},
"nova_object.name":"InstanceActionPayload",
"nova_object.namespace":"nova",
"nova_object.version":"1.4"
"nova_object.version":"1.5"
},
"priority":"INFO",
"publisher_id":"nova-compute:compute"


+ 3
- 2
doc/notification_samples/instance-unpause-start.json View File

@@ -77,11 +77,12 @@
"nova_object.namespace": "nova"
},
"user_id":"fake",
"uuid":"178b0921-8f85-4257-88b6-2e743b5a975c"
"uuid":"178b0921-8f85-4257-88b6-2e743b5a975c",
"updated_at": "2012-10-29T13:42:11Z"
},
"nova_object.name":"InstanceActionPayload",
"nova_object.namespace":"nova",
"nova_object.version":"1.4"
"nova_object.version":"1.5"
},
"priority":"INFO",
"publisher_id":"nova-compute:compute"


+ 3
- 2
doc/notification_samples/instance-unshelve-end.json View File

@@ -77,11 +77,12 @@
"nova_object.namespace": "nova"
},
"user_id":"fake",
"uuid":"178b0921-8f85-4257-88b6-2e743b5a975c"
"uuid":"178b0921-8f85-4257-88b6-2e743b5a975c",
"updated_at": "2012-10-29T13:42:11Z"
},
"nova_object.name":"InstanceActionPayload",
"nova_object.namespace":"nova",
"nova_object.version":"1.4"
"nova_object.version":"1.5"
},
"priority":"INFO",
"publisher_id":"nova-compute:compute"


+ 3
- 2
doc/notification_samples/instance-unshelve-start.json View File

@@ -77,11 +77,12 @@
"nova_object.namespace": "nova"
},
"user_id":"fake",
"uuid":"178b0921-8f85-4257-88b6-2e743b5a975c"
"uuid":"178b0921-8f85-4257-88b6-2e743b5a975c",
"updated_at": "2012-10-29T13:42:11Z"
},
"nova_object.name":"InstanceActionPayload",
"nova_object.namespace":"nova",
"nova_object.version":"1.4"
"nova_object.version":"1.5"
},
"priority":"INFO",
"publisher_id":"nova-compute:compute"


+ 4
- 2
doc/notification_samples/instance-update-tags-action.json View File

@@ -83,10 +83,12 @@
"tenant_id": "6f70656e737461636b20342065766572",
"terminated_at": null,
"user_id": "fake",
"uuid": "d5ca7280-1f12-4238-a86f-378bb5d93c38"},
"uuid": "d5ca7280-1f12-4238-a86f-378bb5d93c38",
"updated_at": "2012-10-29T13:42:11Z"
},
"nova_object.name": "InstanceUpdatePayload",
"nova_object.namespace": "nova",
"nova_object.version": "1.5"},
"nova_object.version": "1.6"},
"priority": "INFO",
"publisher_id": "nova-api:fake-mini"
}

+ 4
- 2
doc/notification_samples/instance-update.json View File

@@ -72,10 +72,12 @@
},
"tags": [],
"user_id": "fake",
"uuid": "c03c0bf9-f46e-4e4f-93f1-817568567ee2"},
"uuid": "c03c0bf9-f46e-4e4f-93f1-817568567ee2",
"updated_at": null
},
"nova_object.name": "InstanceUpdatePayload",
"nova_object.namespace": "nova",
"nova_object.version": "1.5"},
"nova_object.version": "1.6"},
"priority": "INFO",
"publisher_id": "nova-compute:fake-mini"
}

+ 3
- 2
doc/notification_samples/instance-volume_attach-end.json View File

@@ -78,11 +78,12 @@
"terminated_at": null,
"auto_disk_config": "MANUAL",
"user_id": "fake",
"uuid": "0ab886d0-7443-4107-9265-48371bfa662b"
"uuid": "0ab886d0-7443-4107-9265-48371bfa662b",
"updated_at": "2012-10-29T13:42:11Z"
},
"nova_object.name": "InstanceActionVolumePayload",
"nova_object.namespace": "nova",
"nova_object.version": "1.2"
"nova_object.version": "1.3"
},
"priority": "INFO",
"publisher_id": "nova-compute:compute"


+ 3
- 2
doc/notification_samples/instance-volume_attach-error.json View File

@@ -88,11 +88,12 @@
"terminated_at": null,
"auto_disk_config": "MANUAL",
"user_id": "fake",
"uuid": "0ab886d0-7443-4107-9265-48371bfa662b"
"uuid": "0ab886d0-7443-4107-9265-48371bfa662b",
"updated_at": "2012-10-29T13:42:11Z"
},
"nova_object.name": "InstanceActionVolumePayload",
"nova_object.namespace": "nova",
"nova_object.version": "1.2"
"nova_object.version": "1.3"
},
"priority": "ERROR",
"publisher_id": "nova-compute:compute"


+ 3
- 2
doc/notification_samples/instance-volume_attach-start.json View File

@@ -78,11 +78,12 @@
"terminated_at": null,
"auto_disk_config": "MANUAL",
"user_id": "fake",
"uuid": "0ab886d0-7443-4107-9265-48371bfa662b"
"uuid": "0ab886d0-7443-4107-9265-48371bfa662b",
"updated_at": "2012-10-29T13:42:11Z"
},
"nova_object.name": "InstanceActionVolumePayload",
"nova_object.namespace": "nova",
"nova_object.version": "1.2"
"nova_object.version": "1.3"
},
"priority": "INFO",
"publisher_id": "nova-compute:compute"


+ 3
- 2
doc/notification_samples/instance-volume_detach-end.json View File

@@ -78,11 +78,12 @@
"terminated_at": null,
"auto_disk_config": "MANUAL",
"user_id": "fake",
"uuid": "0ab886d0-7443-4107-9265-48371bfa662b"
"uuid": "0ab886d0-7443-4107-9265-48371bfa662b",
"updated_at": "2012-10-29T13:42:11Z"
},
"nova_object.name": "InstanceActionVolumePayload",
"nova_object.namespace": "nova",
"nova_object.version": "1.2"
"nova_object.version": "1.3"
},
"priority": "INFO",
"publisher_id": "nova-compute:compute"


+ 3
- 2
doc/notification_samples/instance-volume_detach-start.json View File

@@ -78,11 +78,12 @@
"terminated_at": null,
"auto_disk_config": "MANUAL",
"user_id": "fake",
"uuid": "0ab886d0-7443-4107-9265-48371bfa662b"
"uuid": "0ab886d0-7443-4107-9265-48371bfa662b",
"updated_at": "2012-10-29T13:42:11Z"
},
"nova_object.name": "InstanceActionVolumePayload",
"nova_object.namespace": "nova",
"nova_object.version": "1.2"
"nova_object.version": "1.3"
},
"priority": "INFO",
"publisher_id": "nova-compute:compute"


+ 2
- 1
doc/notification_samples/instance-volume_swap-end.json View File

@@ -78,12 +78,13 @@
"tenant_id": "6f70656e737461636b20342065766572",
"terminated_at": null,
"auto_disk_config":"MANUAL",
"updated_at": "2012-10-29T13:42:11Z",
"user_id": "fake",
"uuid": "0ab886d0-7443-4107-9265-48371bfa662b"
},
"nova_object.name": "InstanceActionVolumeSwapPayload",
"nova_object.namespace": "nova",
"nova_object.version": "1.4"
"nova_object.version": "1.5"
},
"priority": "INFO",
"publisher_id": "nova-compute:compute"


+ 2
- 1
doc/notification_samples/instance-volume_swap-error.json View File

@@ -88,12 +88,13 @@
"tenant_id": "6f70656e737461636b20342065766572",
"terminated_at": null,
"auto_disk_config":"MANUAL",
"updated_at": "2012-10-29T13:42:11Z",
"user_id": "fake",
"uuid": "0ab886d0-7443-4107-9265-48371bfa662b"
},
"nova_object.name": "InstanceActionVolumeSwapPayload",
"nova_object.namespace": "nova",
"nova_object.version": "1.4"
"nova_object.version": "1.5"
},
"priority": "ERROR",
"publisher_id": "nova-compute:compute"


+ 2
- 1
doc/notification_samples/instance-volume_swap-start.json View File

@@ -78,12 +78,13 @@
"tenant_id": "6f70656e737461636b20342065766572",
"terminated_at": null,
"auto_disk_config":"MANUAL",
"updated_at": "2012-10-29T13:42:11Z",
"user_id": "fake",
"uuid": "0ab886d0-7443-4107-9265-48371bfa662b"
},
"nova_object.name": "InstanceActionVolumeSwapPayload",
"nova_object.namespace": "nova",
"nova_object.version": "1.4"
"nova_object.version": "1.5"
},
"priority": "INFO",
"publisher_id": "nova-compute:compute"


+ 16
- 8
nova/notifications/objects/instance.py View File

@@ -48,6 +48,7 @@ class InstancePayload(base.NotificationPayloadBase):
'launched_at': ('instance', 'launched_at'),
'terminated_at': ('instance', 'terminated_at'),
'deleted_at': ('instance', 'deleted_at'),
'updated_at': ('instance', 'updated_at'),

'state': ('instance', 'vm_state'),
'power_state': ('instance', 'power_state'),
@@ -63,7 +64,8 @@ class InstancePayload(base.NotificationPayloadBase):
# Version 1.2: Add auto_disk_config field
# Version 1.3: Add key_name field
# Version 1.4: Add BDM related data
VERSION = '1.4'
# Version 1.5: Add updated_at field
VERSION = '1.5'
fields = {
'uuid': fields.UUIDField(),
'user_id': fields.StringField(nullable=True),
@@ -90,6 +92,7 @@ class InstancePayload(base.NotificationPayloadBase):
'launched_at': fields.DateTimeField(nullable=True),
'terminated_at': fields.DateTimeField(nullable=True),
'deleted_at': fields.DateTimeField(nullable=True),
'updated_at': fields.DateTimeField(nullable=True),

'state': fields.InstanceStateField(nullable=True),
'power_state': fields.InstancePowerStateField(nullable=True),
@@ -125,7 +128,8 @@ class InstanceActionPayload(InstancePayload):
# Version 1.2: Added auto_disk_config field to InstancePayload
# Version 1.3: Added key_name field to InstancePayload
# Version 1.4: Add BDM related data
VERSION = '1.4'
# Version 1.5: Added updated_at field to InstancePayload
VERSION = '1.5'
fields = {
'fault': fields.ObjectField('ExceptionPayload', nullable=True),
}
@@ -138,10 +142,11 @@ class InstanceActionPayload(InstancePayload):
@nova_base.NovaObjectRegistry.register_notification
class InstanceActionVolumePayload(InstanceActionPayload):
# Version 1.0: Initial version
# 1.1: Added key_name field to InstancePayload
# 1.2: Add BDM related data
# Version 1.1: Added key_name field to InstancePayload
# Version 1.2: Add BDM related data
# Version 1.3: Added updated_at field to InstancePayload

VERSION = '1.2'
VERSION = '1.3'
fields = {
'volume_id': fields.UUIDField()
}
@@ -161,7 +166,8 @@ class InstanceActionVolumeSwapPayload(InstanceActionPayload):
# Version 1.2: Added auto_disk_config field to InstancePayload
# Version 1.3: Added key_name field to InstancePayload
# Version 1.4: Add BDM related data
VERSION = '1.4'
# Version 1.5: Added updated_at field to InstancePayload
VERSION = '1.5'
fields = {
'old_volume_id': fields.UUIDField(),
'new_volume_id': fields.UUIDField(),
@@ -188,7 +194,8 @@ class InstanceCreatePayload(InstanceActionPayload):
# 1.4: Add key_name field to InstancePayload
# 1.5: Add BDM related data to InstancePayload
# 1.6: Add tags field to InstanceCreatePayload
VERSION = '1.6'
# 1.7: Added updated_at field to InstancePayload
VERSION = '1.7'

fields = {
'keypairs': fields.ListOfObjectsField('KeypairPayload'),
@@ -213,7 +220,8 @@ class InstanceUpdatePayload(InstancePayload):
# Version 1.3: Added auto_disk_config field to InstancePayload
# Version 1.4: Added key_name field to InstancePayload
# Version 1.5: Add BDM related data
VERSION = '1.5'
# Version 1.6: Added updated_at field to InstancePayload
VERSION = '1.6'
fields = {
'state_update': fields.ObjectField('InstanceStateUpdatePayload'),
'audit_period': fields.ObjectField('AuditPeriodPayload'),


+ 2
- 1
nova/tests/functional/notification_sample_tests/test_instance.py View File

@@ -271,7 +271,8 @@ class TestInstanceNotificationSample(
# scheduled
{'host': 'compute',
'node': 'fake-mini',
'state_update.old_task_state': None},
'state_update.old_task_state': None,
'updated_at': '2012-10-29T13:42:11Z'},

# building -> networking
{'state_update.new_task_state': 'networking',


+ 6
- 6
nova/tests/unit/notifications/objects/test_notification.py View File

@@ -378,18 +378,18 @@ notification_object_data = {
'FlavorNotification': '1.0-a73147b93b520ff0061865849d3dfa56',
'FlavorPayload': '1.3-6335e626893d7df5f96f87e6731fef56',
'InstanceActionNotification': '1.0-a73147b93b520ff0061865849d3dfa56',
'InstanceActionPayload': '1.4-2a206cf87e4060c2ec43ed71c4a2ed42',
'InstanceActionPayload': '1.5-fb2804ce9b681bfb217e729153c22611',
'InstanceActionVolumeNotification': '1.0-a73147b93b520ff0061865849d3dfa56',
'InstanceActionVolumePayload': '1.2-414024a2ea54cf842482c1c6a4bef013',
'InstanceActionVolumePayload': '1.3-f175b22ac6d6d0aea2bac21e12156e77',
'InstanceActionVolumeSwapNotification':
'1.0-a73147b93b520ff0061865849d3dfa56',
'InstanceActionVolumeSwapPayload': '1.4-8b82cef523c62020c24b3eb1c39ea2ef',
'InstanceActionVolumeSwapPayload': '1.5-bccb88cda36276d20a9b3e427b999929',
'InstanceCreateNotification': '1.0-a73147b93b520ff0061865849d3dfa56',
'InstanceCreatePayload': '1.6-b117dd709616d60cf5e126b983c72cd2',
'InstancePayload': '1.4-46d922bd0a5cce46398b0cf7e8735fc4',
'InstanceCreatePayload': '1.7-a35b2f3aa64dcc262ebb830e78939bdb',
'InstancePayload': '1.5-201d852973dbcb5caab89082a3140487',
'InstanceStateUpdatePayload': '1.0-07e111c0fa0f6db0f79b0726d593e3da',
'InstanceUpdateNotification': '1.0-a73147b93b520ff0061865849d3dfa56',
'InstanceUpdatePayload': '1.5-ec4d3d9c809842b1dcf4739b1d788f32',
'InstanceUpdatePayload': '1.6-9145c7cac4208eb841ceaaa9c10b2d9b',
'IpPayload': '1.0-8ecf567a99e516d4af094439a7632d34',
'KeypairNotification': '1.0-a73147b93b520ff0061865849d3dfa56',
'KeypairPayload': '1.0-6daebbbde0e1bf35c1556b1ecd9385c1',


Loading…
Cancel
Save