ID of multiple notifications based on a single event differs from each other

Bug #2046219 reported by Masaki UENO
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tacker
New
Medium
Unassigned

Bug Description

According to SOL003 v3.3.1, ID of VnfLcmOperationOccurrenceNotification is defined as below:

"Identifier of this notification. If a notification is sent multiple times due to multiple subscriptions, the "id" attribute of all these notifications shall have the same value."

However, Tacker Antelope implementation generates multiple notification on a single event with differrent IDs[1].

[1] https://github.com/openstack/tacker/blob/40a15b59455fdc6b34eecd641af514d32888a5a2/tacker/sol_refactored/nfvo/nfvo_client.py#L207-L212

```
    def send_lcmocc_notification(self, context, lcmocc, inst, endpoint):
        subscs = subsc_utils.get_lcmocc_subscs(context, lcmocc, inst)
        for subsc in subscs:
            notif_data = lcmocc_utils.make_lcmocc_notif_data(
                subsc, lcmocc, endpoint)
            common_script_utils.send_notification(subsc, notif_data)

        if self.is_local:
            self.nfvo.recv_lcmocc_notification(context, lcmocc, inst)
```

`send_lcmocc_notification` method is called when a LCM event (including state transition) occurs, thus ID of notification should be generated at the top of this method. However, ID of notification is generated by `make_lcmocc_notif_data` method, which is called at each step of for-loop.

I think we can resolve this issue by:

1. Generate UUID outside of for-loop
2. Use UUID generated at step 1 as argument of `make_lcmocc_notif_data` method

Yasufumi Ogawa (yasufum)
Changed in tacker:
importance: Undecided → Medium
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.