/*-
* ========================LICENSE_START=================================
- * ORAN-OSC
+ * O-RAN-SC
* %%
* Copyright (C) 2019 AT&T Intellectual Property and Nokia
* %%
import { Injectable } from '@angular/core';
import { HttpClient } from '@angular/common/http';
import { Observable } from 'rxjs';
+import { XMXappInfo } from '../../interfaces/xapp-mgr.types';
@Injectable()
export class CatalogService {
-
- constructor(private http: HttpClient) {
+
+ constructor(private httpClient: HttpClient) {
+ // injects to variable httpClient
}
getAll() {
- return this.http.get('api/xappmgr/xapps');
+ return this.httpClient.get('api/xappmgr/xapps');
+ }
+
+ deployXapp(name) {
+ let xappInfo: XMXappInfo = {
+ xAppName: name
+ };
+ return this.httpClient.post('api/xappmgr/xapps', xappInfo, { observe: 'response' });
}
-
+
}