Code Review
/
nonrtric.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Bugfix, GET policy types for OSC A1 Policy REST API
[nonrtric.git]
/
policy-agent
/
src
/
main
/
java
/
org
/
oransc
/
policyagent
/
tasks
/
RicSynchronizationTask.java
diff --git
a/policy-agent/src/main/java/org/oransc/policyagent/tasks/RicSynchronizationTask.java
b/policy-agent/src/main/java/org/oransc/policyagent/tasks/RicSynchronizationTask.java
index
42d9ab6
..
5d78207
100644
(file)
--- a/
policy-agent/src/main/java/org/oransc/policyagent/tasks/RicSynchronizationTask.java
+++ b/
policy-agent/src/main/java/org/oransc/policyagent/tasks/RicSynchronizationTask.java
@@
-198,8
+198,16
@@
public class RicSynchronizationTask {
.flatMapMany(notUsed -> Flux.just(policy));
}
.flatMapMany(notUsed -> Flux.just(policy));
}
+ private boolean checkTransient(Policy policy) {
+ if (policy.isTransient()) {
+ this.policies.remove(policy);
+ }
+ return policy.isTransient();
+ }
+
private Flux<Policy> recreateAllPoliciesInRic(Ric ric, A1Client a1Client) {
return Flux.fromIterable(policies.getForRic(ric.name())) //
private Flux<Policy> recreateAllPoliciesInRic(Ric ric, A1Client a1Client) {
return Flux.fromIterable(policies.getForRic(ric.name())) //
+ .filter(policy -> !checkTransient(policy)) //
.flatMap(policy -> putPolicy(policy, ric, a1Client), CONCURRENCY_RIC);
}
.flatMap(policy -> putPolicy(policy, ric, a1Client), CONCURRENCY_RIC);
}