Fix bug in SDNC, read controller info from yaml
[nonrtric.git] / policy-agent / src / main / java / org / oransc / policyagent / configuration / ApplicationConfig.java
index f23b5e2..1e8c6d4 100644 (file)
@@ -42,6 +42,15 @@ public class ApplicationConfig {
     @NotEmpty
     private String filepath;
 
+    @NotEmpty
+    private String a1ControllerBaseUrl;
+
+    @NotEmpty
+    private String a1ControllerUsername;
+
+    @NotEmpty
+    private String a1ControllerPassword;
+
     private Collection<Observer> observers = new Vector<>();
     private Map<String, RicConfig> ricConfigs = new HashMap<>();
     @Getter
@@ -57,6 +66,18 @@ public class ApplicationConfig {
         return this.filepath;
     }
 
+    public String getA1ControllerBaseUrl() {
+        return this.a1ControllerBaseUrl;
+    }
+
+    public String getA1ControllerUsername() {
+        return this.a1ControllerUsername;
+    }
+
+    public String getA1ControllerPassword() {
+        return this.a1ControllerPassword;
+    }
+
     /*
      * Do not remove, used by framework!
      */
@@ -64,6 +85,18 @@ public class ApplicationConfig {
         this.filepath = filepath;
     }
 
+    public synchronized void setA1ControllerBaseUrl(String a1ControllerBaseUrl) {
+        this.a1ControllerBaseUrl = a1ControllerBaseUrl;
+    }
+
+    public synchronized void setA1ControllerUsername(String a1ControllerUsername) {
+        this.a1ControllerUsername = a1ControllerUsername;
+    }
+
+    public synchronized void setA1ControllerPassword(String a1ControllerPassword) {
+        this.a1ControllerPassword = a1ControllerPassword;
+    }
+
     public synchronized Collection<RicConfig> getRicConfigs() {
         return this.ricConfigs.values();
     }