PolicyTypes,
} from "@interfaces/policy.types";
import { Rics } from "@interfaces/ric";
+import { RicConfig } from "@interfaces/ric.config";
+import { HttpHeaders } from "@angular/common/http";
/**
* Services for calling the policy endpoints.
return this.httpClient.get<PolicyStatus>(url);
}
- /**
- * Gets policy parameters.
- * @returns Observable that should yield a policy instance
- */
- getPolicy(policyTypeId: string, policyInstanceId: string): Observable<any> {
- const url =
- this.buildPath(this.policyPath, policyInstanceId) +
- "?type=" +
- policyTypeId;
- return this.httpClient.get<any>(url);
- }
-
/**
* Creates or replaces policy instance.
* @param policyTypeId ID of the policy type that the instance will have
const url = this.buildPath("rics") + "?policytype_id=" + policyTypeId;
return this.httpClient.get<any>(url);
}
+
+ getConfiguration(): Observable<RicConfig> {
+ const url = this.buildPath("configuration");
+ return this.httpClient.get<RicConfig>(url);
+ }
+
+ updateConfiguration(ricConfig: RicConfig): Observable<RicConfig> {
+ const httpOptions = {
+ headers: new HttpHeaders({'Content-Type': 'application/json'}),
+ observe: 'response' as 'body'
+ }
+ const url = this.buildPath("configuration");
+ return this.httpClient.put<RicConfig>(url, ricConfig, httpOptions);
+ }
}