class NsLcmNotification(NotificationBase):
+ # maps kafka commands of completed operations to the original operation type
+ completed_operation_map = {
+ "INSTANTIATED": "INSTANTIATE",
+ "SCALED": "SCALE",
+ "TERMINATED": "TERMINATE",
+ "UPDATED": "UPDATE",
+ "HEALED": "HEAL",
+ }
# SOL005 response model for nslcm notifications
response_models = {
"NsLcmOperationOccurrenceNotification": {
if op_state:
filter_q["operationStates"].append(op_state)
if command:
- filter_q["operationTypes"].append(command)
+ op_type = self.completed_operation_map.get(command, command)
+ filter_q["operationTypes"].append(op_type)
# self.logger.debug("Db query is: {}".format(filter_q))
subscribers = []
try: