import { Injectable } from '@angular/core';
import { ConfigService } from '@shared/config/config.service';
import { HttpClient } from '@angular/common/http';
import { Observable } from 'rxjs';
import { FleioApiService } from '@fleio-api/fleio-api.service';
import { IEnduserOpenstackSummaryModel } from '@fleio-api/openstack/model/enduser-openstack-summary.model';

@Injectable({
  providedIn: 'root'
})
export class OpenstackApiService extends FleioApiService<any> {
  constructor(protected httpClient: HttpClient, protected config: ConfigService) {
    super();
    this.setEndpoint(config.getPanelApiUrl('openstack'));
  }

  getSummary(): Observable<IEnduserOpenstackSummaryModel> {
    return this.getAction( 'summary');
  }

}
