blob: 1b0872eca7387110aefc8befe52cf1316e4de755 [file] [log] [blame]
import { Injectable } from '@angular/core';
import {Observable} from 'rxjs';
import { map, catchError } from 'rxjs/operators';
import { ApplicationServiceFacade } from './applicationServiceFacade.service';
import { ErrorUtils } from '../util';
@Injectable()
export class LegionDeploymentService {
constructor(private applicationServiceFacade: ApplicationServiceFacade) { }
public createOdahuNewCluster(data): Observable<{}> {
return this.applicationServiceFacade
.createOdahuCluster(data)
.pipe(
map(response => response),
catchError(ErrorUtils.handleServiceError));
}
public getOduhuClustersList(): Observable<{}> {
return this.applicationServiceFacade
.getOdahuList()
.pipe(
map(response => response),
catchError(ErrorUtils.handleServiceError));
}
public odahuAction(data, action) {
return this.applicationServiceFacade
.odahuStartStop(data, action)
.pipe(
map(response => response),
catchError(ErrorUtils.handleServiceError));
}
}