Merge "Spring Aspect logging"
[nonrtric.git] / policy-agent / src / main / java / org / oransc / policyagent / clients / A1ClientFactory.java
index 8f9169d..0be4b31 100644 (file)
@@ -66,10 +66,8 @@ public class A1ClientFactory {
     }
 
     A1Client createClient(Ric ric, A1ProtocolType version) {
-        if (version == A1ProtocolType.STD_V1) {
+        if (version == A1ProtocolType.STD_V1_1) {
             return new StdA1ClientVersion1(ric.getConfig());
-        } else if (version == A1ProtocolType.STD_V1_1) {
-            return new StdA1ClientVersion2(ric.getConfig());
         } else if (version == A1ProtocolType.OSC_V1) {
             return new OscA1Client(ric.getConfig());
         } else if (version == A1ProtocolType.SDNC_OSC) {
@@ -91,13 +89,12 @@ public class A1ClientFactory {
 
     private Mono<A1Client.A1ProtocolType> getProtocolVersion(Ric ric) {
         if (ric.getProtocolVersion() == A1ProtocolType.UNKNOWN) {
-            return fetchVersion(createClient(ric, A1ProtocolType.STD_V1)) //
-                .onErrorResume(notUsed -> fetchVersion(createClient(ric, A1ProtocolType.STD_V1_1))) //
+            return fetchVersion(createClient(ric, A1ProtocolType.STD_V1_1)) //
                 .onErrorResume(notUsed -> fetchVersion(createClient(ric, A1ProtocolType.OSC_V1))) //
                 .onErrorResume(notUsed -> fetchVersion(createClient(ric, A1ProtocolType.SDNC_OSC))) //
                 .onErrorResume(notUsed -> fetchVersion(createClient(ric, A1ProtocolType.SDNC_ONAP))) //
                 .doOnNext(ric::setProtocolVersion)
-                .doOnNext(version -> logger.debug("Recover ric: {}, protocol version:{}", ric.name(), version)) //
+                .doOnNext(version -> logger.debug("Established protocol version:{} for Ric: {}", version, ric.name())) //
                 .doOnError(notUsed -> logger.warn("Could not get protocol version from RIC: {}", ric.name())); //
         } else {
             return Mono.just(ric.getProtocolVersion());