X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;ds=sidebyside;f=webapp-frontend%2Fsrc%2Fapp%2Fservices%2Fac-xapp%2Fac-xapp.service.ts;h=47b54401d6675877375477a395d80417c1c73447;hb=749749f288de7ef42e3d1507c7f07a4453a774b4;hp=19e5fc943de7797ccea7ce1c1b2996ddb67c138e;hpb=7845281a4bdb97925cba281f133ef058f15a1f95;p=portal%2Fric-dashboard.git diff --git a/webapp-frontend/src/app/services/ac-xapp/ac-xapp.service.ts b/webapp-frontend/src/app/services/ac-xapp/ac-xapp.service.ts index 19e5fc94..47b54401 100644 --- a/webapp-frontend/src/app/services/ac-xapp/ac-xapp.service.ts +++ b/webapp-frontend/src/app/services/ac-xapp/ac-xapp.service.ts @@ -26,15 +26,16 @@ import { ACAdmissionIntervalControl, ACAdmissionIntervalControlAck } from '../.. import { DashboardSuccessTransport } from '../../interfaces/dashboard.types'; /** - * Services for calling the Dashboard's AC endpoints. + * Services for calling the Dashboard's A1 endpoints to get/put AC policies. */ @Injectable({ providedIn: 'root' }) export class ACXappService { - private basePath = 'api/xapp/admctl'; - private policyPath = 'policy'; + private basePath = 'api/a1-p'; + private policyPath = 'policies'; + private acPolicyName = 'admission_control_policy'; private buildPath(...args: any[]) { let result = this.basePath; @@ -61,21 +62,21 @@ export class ACXappService { } /** - * Gets admission control parameters. + * Gets admission control policy. * @returns Observable that should yield an ACAdmissionIntervalControl */ getPolicy(): Observable { - const url = this.buildPath(this.policyPath); + const url = this.buildPath(this.policyPath, this.acPolicyName); return this.httpClient.get(url); } /** - * Puts admission control parameters. + * Puts admission control policy. * @param policy an instance of ACAdmissionIntervalControl * @returns Observable that should yield a response code, no data */ putPolicy(policy: ACAdmissionIntervalControl): Observable { - const url = this.buildPath(this.policyPath); + const url = this.buildPath(this.policyPath, this.acPolicyName); return this.httpClient.put(url, policy, { observe: 'response' }); }