- [DCAEGEN2-3240](https://jira.onap.org/browse/DCAEGEN2-3240) - Implement runtime service configuration
+ - [DCAEGEN2-3273](https://jira.onap.org/browse/DCAEGEN2-3273) - Fix bug that config thread hang up when cbs policy is empty
+
## [1.1.4] - 2022/07/28
- [DCAEGEN2-3120](https://jira.onap.org/browse/DCAEGEN2-3120) - Enhance sliceanalysis MS to use DCAE SDK dmaap-client lib
JsonNode node = obj.readTree(msg);
JsonNode notificationNode = node.get(EVENT).get(NOTIFICATIONFIELDS);
output = obj.treeToValue(notificationNode, NotificationFields.class);
-
//Filter out target notification changeIdentifier and changeType
notifChangeIdentifier = output.getChangeIdentifier();
notifChangeType = output.getChangeType();
*/
public void updateCllInstance(){
Set<String> instances = aaiService.fetchAllCllInstances();
- log.error("instances {}", instances);
+ log.debug("All valid instances are {}", instances);
ccvpnPmDatastore.updateCllInstances(instances);
}
try {\r
Thread.sleep(1000);\r
ConfigPolicy configPolicy = ConfigPolicy.getInstance();\r
- if(configPolicy != null) {\r
- // config content\r
+ if(configPolicy.getConfig() != null) {\r
String cllId = null;\r
Boolean clBwAssuranceStatus = null;\r
int originalBw = 0;\r
ccvpnPmDatastore.updateConfigFromPolicy(cllId, clBwAssuranceStatus, originalBw);\r
}\r
} else {\r
- log.debug("Config policy is empty, nothing to update.");\r
+ log.error("Config policy is empty, nothing to update.");\r
}\r
\r
} catch (Exception e) {\r
String serviceId = (String) event.subject();
Map<String, Integer> maxBandwidthData = aaiService.fetchMaxBandwidthOfService(serviceId);
if (maxBandwidthData.get("maxBandwidth") != null){
- log.info("Successfully retrieved bandwidth info from AAI; service: {}, bandwidth: {}",
+ log.debug("Successfully retrieved bandwidth info from AAI; service: {}, bandwidth: {}",
serviceId, maxBandwidthData.get("maxBandwidth"));
int bwValue = maxBandwidthData.get("maxBandwidth").intValue();
if (ccvpnPmDatastore.getProvBwOfSvc(serviceId) == 0){
ccvpnPmDatastore.updateProvBw(serviceId, bwValue, true);
+ log.debug("Provision bw of cll {} updated from 0 to {}, max bw is {}", serviceId, ccvpnPmDatastore.getProvBwOfSvc(serviceId), bwValue);
} else if (ccvpnPmDatastore.getProvBwOfSvc(serviceId) != bwValue) {
- log.info("Service modification complete; serviceId: {} with new bandwidth: {}", serviceId, bwValue);
+ log.debug("Service modification complete; serviceId: {} update prov bw from {} to {}", serviceId, ccvpnPmDatastore.getProvBwOfSvc(serviceId), bwValue);
ccvpnPmDatastore.updateProvBw(serviceId, bwValue, true);
ccvpnPmDatastore.updateSvcState(serviceId, ServiceState.RUNNING);
- log.debug("Service state of {} is changed to running", serviceId);
+ log.debug("Service state of {} is changed to running, {}", serviceId, ccvpnPmDatastore.getStatusOfSvc(serviceId));
}
}
log.debug("=== Processing AAI network policy query complete ===");
import java.util.Iterator;
import java.util.Set;
import lombok.Getter;
-import lombok.Setter;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;
public void updateCllInstances(Set<String> allValidCllInstances){
Set<String> invalidCllIds;
invalidCllIds= filterInvalidCllIds(allValidCllInstances, svcStatus.keySet());
- svcStatus.keySet().removeAll(invalidCllIds);
- invalidCllIds = filterInvalidCllIds(allValidCllInstances, endpointToProvBw.keySet());
- endpointToProvBw.keySet().removeAll(invalidCllIds);
- invalidCllIds = filterInvalidCllIds(allValidCllInstances, upperBoundBw.keySet());
- upperBoundBw.keySet().removeAll(invalidCllIds);
- invalidCllIds = filterInvalidCllIds(allValidCllInstances, endpointToOriginalBw.keySet());
- endpointToOriginalBw.keySet().removeAll(invalidCllIds);
- invalidCllIds = filterInvalidCllIds(allValidCllInstances, closedLoopBwAssuranceStatus.keySet());
- closedLoopBwAssuranceStatus.keySet().removeAll(invalidCllIds);
for(String invalidCllId : invalidCllIds) {
log.debug("drop {} from endpointToUsedBw", invalidCllId);
endpointToUsedBw.entrySet().stream().dropWhile(map -> map.getKey().getCllId().equalsIgnoreCase(invalidCllId));
}
}
}
+ svcStatus.keySet().removeAll(invalidCllIds);
+ invalidCllIds = filterInvalidCllIds(allValidCllInstances, endpointToProvBw.keySet());
+ endpointToProvBw.keySet().removeAll(invalidCllIds);
+ invalidCllIds = filterInvalidCllIds(allValidCllInstances, upperBoundBw.keySet());
+ upperBoundBw.keySet().removeAll(invalidCllIds);
+ invalidCllIds = filterInvalidCllIds(allValidCllInstances, endpointToOriginalBw.keySet());
+ endpointToOriginalBw.keySet().removeAll(invalidCllIds);
+ invalidCllIds = filterInvalidCllIds(allValidCllInstances, closedLoopBwAssuranceStatus.keySet());
+ closedLoopBwAssuranceStatus.keySet().removeAll(invalidCllIds);
}
/**