summaryrefslogtreecommitdiff
path: root/nova/notifications/objects/aggregate.py
Commit message (Collapse)AuthorAgeFilesLines
* Add Aggregate image caching progress notificationsDan Smith2019-10-291-0/+49
| | | | | | | | | | | | This adds AggregateCacheNotification, related payload, and code in conductor to emit this per-compute with progress information. This also adds a "progress" phase to NotificationPhase, which allows for start..progress..progress..end information for a single operation (cache_images in this case). Related to blueprint image-precache-support Change-Id: I69ae26d4caf4b56ab2c4864455bfe9b5b736dbf3
* Add notification sample test for aggregate.cache_images.start|endMatt Riedemann2019-10-251-0/+2
| | | | | | | | | | | | | | | | This adds the functional notification sample test for the aggregate.cache_images.start and aggregate.cache_images.end versioned notifications. I also added a comment to the docs builder code since it took me a bit to figure out how to get the notification sample linked into the docs, and for whatever reason figured that out by looking through code rather than our nicely detailed docs that already explain it. Part of blueprint image-precache-support Change-Id: I0869979a1b8a0966f0e7b49e5a5984f76d7d67cd
* Transform aggregate.update_prop notificationGábor Antal2018-07-151-0/+2
| | | | | | | | | | The aggregate.update_prop.start and aggregate.update_prop.end notifications has been transformed to the versioned notification framework. Co-Authored-By: Takashi Natsume <natsume.takashi@lab.ntt.co.jp> Change-Id: I37b19573b6d0e1131c446fcec361f01fa2560f82 Implements: bp versioned-notification-transformation-rocky
* Transform aggregate.update_metadata notificationBéla Vancsics2018-04-041-0/+2
| | | | | | | | | The aggregate.update_metadata.start and aggregate.update_metadata.end notifications has been transformed to the versioned notification framework. Co-Authored-By: Takashi Natsume <natsume.takashi@lab.ntt.co.jp> Change-Id: Iab73b1351a50869620334f692aaefb566ba4ddf8 Implements: bp versioned-notification-transformation-rocky
* Transform aggregate.remove_host notificationBalazs Gibizer2017-09-081-0/+2
| | | | | | | | | | | | The aggregate.remove_host.start and aggregate.remove_host.end notifications has been transformed to the versioned notification framework. Note that the legacy event_type was aggregate.removehost but the versioned notification is named to aggregate.remove_host to keep the naming consistent with the other event_types. Implements: bp versioned-notification-transformation-queens Change-Id: I5cb84eb797ca98964a04b5b495fba263db98a54f
* Transform aggregate.add_host notificationBalazs Gibizer2017-09-081-0/+2
| | | | | | | | | | | | The aggregate.add_host.start and aggregate.add_host.end notifications has been transformed to the versioned notification framework. Note that the legacy event_type was aggregate.addhost but the versioned notification is named to aggregate.add_host to keep the naming consistent with the other event_types. Implements: bp versioned-notification-transformation-queens Change-Id: I980d89f47b944116e5fc9cedd74c43bbd88fbeae
* Remove **kwargs passing in payload __init__Balazs Gibizer2017-06-081-2/+2
| | | | | | | | | | | | | The **kwargs was used in the payload class ctor to pass the payload fields initialization up to the ovo base class. This is unnecessary and confusing. This patch replaces the **kwargs passing with direct field initialization to make the payload construction more explicit. Change-Id: I7770f6550fa40c1d9b0417efa57f58fa9c998d45 Implements: bp versioned-notification-transformation-pike Co-Authored-By: Stephen Finucane <sfinucan@redhat.com>
* handle uninited fields in notification payloadBalazs Gibizer2017-03-031-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Due to the not strict handling of uninitialized fields during notification payload population it is possible that the emitted notification missing some of the fields defined in the schema. There are two problematic cases: 1) no load tirggered for lazy loaded fields. If the field was not loaded it is not added to the payload. 2) uninitialized, not lazy loadable fields are not added to the payload. This patch makes sure that lazy load is triggered. If the field is not lazy loadable and also not initialized then related payload field will be set to None. If the payload field is not nullable the code will fail to make sure that the inconsistency is detected. The following changes cannot be split to different commits because as soon as the generic schema population code is fixed every listed notification starts behaving differently. In some cases the availability_zone field of the Service object is left unitialized by both the constructor and the obj_load_attr function this caused that the availability_zone field of the service.update notification was missing from the emitted notification payload. The extra_specs field of the Flavor object is not lazy loadable and not initialized in the Flavor destroy case. So the extra_specs field of the FlavorPayload needed to be made nullable. The projects field of the Flavor object is lazy loaded but when the Flavor object is loaded as part of an Instance object Flavor is orphaned and no lazy load is allowed on that Flavor object. In this case the projects field of the FlavorPayload will be set to None to signal that the information is not available. This also means that the projects field of the FlavorPayload needed to be changed to nullable. The hosts and id fields of the Aggregate object is not initialized during the create of the Aggregate before the aggregate.create.start needs to be sent. Therefore these fields needs to be nullable. Closes-Bug: #1653221 Change-Id: Ib122cd98ee0cc31938d5ff1d5c753053267a3bd4
* Transform aggregate.delete notificationBalazs Gibizer2017-01-041-0/+2
| | | | | | | | The aggregate.delete.start and aggregate.delete.end notifications has been transformed to the versioned notification framework. Implements: bp versioned-notification-transformation-ocata Change-Id: I911e7aef813380291e6cf166eac91b53215a3726
* Transform aggregate.create notificationBalazs Gibizer2017-01-041-0/+51
The aggregate.create.start and aggregate.create.end notifications has been transformed to the versioned notification framework. The notification payload contains the 'id' of the aggregate which is the db primary key. It is added because the REST API also uses the db id instead of the uuid in the os-aggregates' requests and responses. Implements: bp versioned-notification-transformation-ocata Change-Id: I92fe504a8f7dc19b0e1df5884045d4bc0d9e4f98