#708 #768: Mostrar datos de clientes ogLive instalados en ruta {{{/info}}} y acatulizar documentación de la API REST.
git-svn-id: https://opengnsys.es/svn/branches/version1.1@5154 a21b9725-9963-47de-94b9-378ad31fedc9remotes/github/debian-pkg
parent
6608f1e79b
commit
90e3284ffe
|
@ -54,18 +54,9 @@ $app->get('/info', function() {
|
|||
if (@$services["RUN_BTTRACKER"] === "yes") array_push($response['services'], "tracker");
|
||||
// Reading installed ogLive information file.
|
||||
if ($hasOglive === true) {
|
||||
$data = explode('-', @file_get_contents('/opt/opengnsys/doc/veroglive.txt'));
|
||||
if ($data[0] === "ogLive") {
|
||||
array_shift($data);
|
||||
$response['oglive'] = array();
|
||||
$tmp = Array();
|
||||
$tmp['distribution'] = trim($data[0]);
|
||||
array_shift($data);
|
||||
$tmp['revision'] = trim(end($data));
|
||||
array_pop($data);
|
||||
$tmp['kernel'] = trim(implode('-', $data));
|
||||
$tmp['directory'] = "tftpboot/ogclient";
|
||||
array_push($response['oglive'], $tmp);
|
||||
$data = json_decode(@file_get_contents('/opt/opengnsys/etc/ogliveinfo.json'));
|
||||
if (isset($data->oglive)) {
|
||||
$response['oglive'] = $data->oglive;
|
||||
}
|
||||
}
|
||||
jsonResponse(200, $response);
|
||||
|
|
|
@ -86,6 +86,27 @@ paths:
|
|||
items:
|
||||
type: string
|
||||
enum: [ 'server', 'repository', 'tracker' ]
|
||||
oglive:
|
||||
description: installed ogLive clients
|
||||
type: array
|
||||
items:
|
||||
type: object
|
||||
properties:
|
||||
distribution:
|
||||
description: base distribution
|
||||
type: string
|
||||
kernel:
|
||||
description: kernel version
|
||||
type: string
|
||||
revision:
|
||||
description: OpenGnsys revision
|
||||
type: string
|
||||
directory:
|
||||
description: installation directory
|
||||
type: string
|
||||
iso:
|
||||
description: ISO file
|
||||
type: string
|
||||
required: [ project, version, release, services ]
|
||||
tags:
|
||||
- server
|
||||
|
@ -263,7 +284,7 @@ paths:
|
|||
description: OU identificator
|
||||
type: integer
|
||||
format: int32
|
||||
required: [ id, name; inremotepc, ou ]
|
||||
required: [ id, name, inremotepc, ou ]
|
||||
security:
|
||||
- apikey: []
|
||||
tags:
|
||||
|
@ -360,7 +381,7 @@ paths:
|
|||
image:
|
||||
description: Lab's picture file
|
||||
type: string
|
||||
required: [ id, name, location, description, inremotepc, capacity, defclients, projector, board, routerip, netmask, modomul, mcastip, mcastport, mcastspeed, p2pmode, p2ptime, image ]
|
||||
required: [ id, name, location, description, inremotepc, capacity, defclients, projector, board, routerip, netmask, mcastmode, mcastip, mcastport, mcastspeed, p2pmode, p2ptime, image ]
|
||||
security:
|
||||
- apikey: []
|
||||
tags:
|
||||
|
@ -918,7 +939,7 @@ paths:
|
|||
- server
|
||||
- image
|
||||
#/ous/{ouid}/images/{imageid}/boot:
|
||||
/repository/images
|
||||
/repository/images:
|
||||
get:
|
||||
description: Get information about images stored in a repository
|
||||
responses:
|
||||
|
@ -952,7 +973,6 @@ paths:
|
|||
description: image file information
|
||||
type: object
|
||||
properties:
|
||||
required: [ total, used, free, percent ]
|
||||
name:
|
||||
description: file name
|
||||
type: string
|
||||
|
@ -963,7 +983,7 @@ paths:
|
|||
modified:
|
||||
description: file modification date
|
||||
type: string
|
||||
format: date-time
|
||||
format: date-time
|
||||
permissions:
|
||||
description: file permissions
|
||||
type: string
|
||||
|
|
Loading…
Reference in New Issue