cm-subscription-dmi-out: ${CM_SUBSCRIPTION_DMI_OUT_TOPIC:dmi-ncmp-cm-avc-subscription}
cm-subscription-ncmp-out: ${CM_SUBSCRIPTION_NCMP_OUT_TOPIC:subscription-response}
cm-events-topic: ${NCMP_CM_EVENTS_TOPIC:cm-events}
+ inventory-events-topic: ncmp-inventory-events
lcm:
events:
topic: ${LCM_EVENTS_TOPIC:ncmp-events}
final TrustLevel newEffectiveTrustLevel) {
if (oldEffectiveTrustLevel.equals(newEffectiveTrustLevel)) {
log.debug("The Cm Handle: {} has already the same trust level: {}", notificationCandidateCmHandleId,
- newEffectiveTrustLevel);
+ newEffectiveTrustLevel);
} else {
log.info("The trust level for Cm Handle: {} is now: {} ", notificationCandidateCmHandleId,
- newEffectiveTrustLevel);
+ newEffectiveTrustLevel);
cmAvcEventPublisher.publishAvcEvent(notificationCandidateCmHandleId,
- AVC_CHANGED_ATTRIBUTE_NAME,
- oldEffectiveTrustLevel.name(),
- newEffectiveTrustLevel.name());
+ AVC_CHANGED_ATTRIBUTE_NAME,
+ oldEffectiveTrustLevel.name(),
+ newEffectiveTrustLevel.name());
}
}
/*
* ============LICENSE_START=======================================================
- * Copyright (C) 2023-2024 Nordix Foundation
+ * Copyright (C) 2023-2025 Nordix Foundation
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
private final EventsPublisher<CloudEvent> eventsPublisher;
- @Value("${app.ncmp.avc.cm-events-topic}")
- private String avcTopic;
+ @Value("${app.ncmp.avc.inventory-events-topic}")
+ private String ncmpInventoryEventsTopicName;
/**
* Publish attribute value change event.
final Map<String, String> extensions = createAvcEventExtensions(eventKey);
final CloudEvent avcCloudEvent =
- NcmpEvent.builder().type(AvcEvent.class.getTypeName())
- .data(avcEvent).extensions(extensions).build().asCloudEvent();
+ NcmpEvent.builder().type(AvcEvent.class.getTypeName())
+ .data(avcEvent).extensions(extensions).build().asCloudEvent();
- eventsPublisher.publishCloudEvent(avcTopic, eventKey, avcCloudEvent);
+ eventsPublisher.publishCloudEvent(ncmpInventoryEventsTopicName, eventKey, avcCloudEvent);
}
private AvcEvent buildAvcEvent(final String attributeName,
extensions.put("correlationid", eventKey);
return extensions;
}
-}
+}
\ No newline at end of file
/*
* ============LICENSE_START=======================================================
- * Copyright (C) 2023-2024 Nordix Foundation
+ * Copyright (C) 2023-2025 Nordix Foundation
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Should Be Equal As Strings ${response.status_code} 200
Verify notification
- ${group_id}= Create Consumer auto_offset_reset=earliest
- Subscribe Topic topics=cm-events group_id=${group_id}
- ${result}= Poll group_id=${group_id} only_value=False poll_attempts=5
- ${headers} Set Variable ${result[0].headers()}
- ${payload} Set Variable ${result[0].value()}
+ ${group_id}= Create Consumer auto_offset_reset=earliest
+ Subscribe Topic topics=ncmp-inventory-events group_id=${group_id}
+ ${result}= Poll group_id=${group_id} only_value=False poll_attempts=5
+ ${headers} Set Variable ${result[0].headers()}
+ ${payload} Set Variable ${result[0].value()}
FOR ${header_key_value_pair} IN @{headers}
Compare Header Values ${header_key_value_pair[0]} ${header_key_value_pair[1]} "ce_specversion" "1.0"
Compare Header Values ${header_key_value_pair[0]} ${header_key_value_pair[1]} "ce_source" "NCMP"
cm-subscription-dmi-out: ${CM_SUBSCRIPTION_DMI_OUT_TOPIC:dmi-ncmp-cm-avc-subscription}
cm-subscription-ncmp-out: ${CM_SUBSCRIPTION_NCMP_OUT_TOPIC:subscription-response}
cm-events-topic: ${NCMP_CM_EVENTS_TOPIC:cm-events}
+ inventory-events-topic: ncmp-inventory-events
lcm:
events:
topic: ${LCM_EVENTS_TOPIC:ncmp-events}