From 1805cfa02c1ea93a823edd40bcdf50cc3d3ae085 Mon Sep 17 00:00:00 2001 From: alvaro Date: Mon, 13 May 2024 11:14:34 +0200 Subject: [PATCH 01/10] Add Ogdhcp y Ogboot apis definitions --- APIs/web-core-ogboot.yaml | 168 ++++++++++++++++++ APIs/web-core-ogdhcp.yaml | 346 ++++++++++++++++++++++++++++++++++++++ README.md | 3 + 3 files changed, 517 insertions(+) create mode 100644 APIs/web-core-ogboot.yaml create mode 100644 APIs/web-core-ogdhcp.yaml create mode 100644 README.md diff --git a/APIs/web-core-ogboot.yaml b/APIs/web-core-ogboot.yaml new file mode 100644 index 0000000..7c9ca90 --- /dev/null +++ b/APIs/web-core-ogboot.yaml @@ -0,0 +1,168 @@ +openapi: 3.0.3 +info: + title: Core - ogBoot - OpenAPI 3.0 + description: |- + API for ogBOOT service. Used by OGweb. + + Some useful links: + - [The ogBOOT repository](https://ognproject.evlt.uma.es/gitea/opengnsys/ogboot) + contact: + name: ogn-qindel + email: seguimiento-ogn-quindel@listas.unizar.es + version: 1.0.0 +paths: + /opengnsys3/rest/core/clients: + get: + summary: Obtener Lista de Clientes + description: Obtiene la lista de clientes registrados en el sistema. + responses: + '200': + description: Lista de clientes + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Client' + '401': + description: No autorizado + /opengnsys3/rest/core/wol: + post: + summary: Encender Equipos Remotamente (Wake-on-LAN) + description: Envía comandos de encendido remoto a uno o varios equipos utilizando Wake-on-LAN. + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/WOLRequest' + responses: + '200': + description: Comando de encendido enviado correctamente + '401': + description: No autorizado + /opengnsys3/rest/core/session: + post: + summary: Gestión de Sesión + description: Gestiona las sesiones de usuario en el sistema. + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/SessionRequest' + responses: + '200': + description: Sesión gestionada correctamente + '401': + description: No autorizado + /opengnsys3/rest/core/poweroff: + post: + summary: Apagar Equipos + description: Envía comandos de apagado a uno o varios equipos. + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/PowerOffRequest' + responses: + '200': + description: Comando de apagado enviado correctamente + '401': + description: No autorizado + /opengnsys3/rest/core/reboot: + post: + summary: Reiniciar Equipos + description: Envía comandos de reinicio a uno o varios equipos. + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/RebootRequest' + responses: + '200': + description: Comando de reinicio enviado correctamente + '401': + description: No autorizado + /opengnsys3/rest/core/stop: + post: + summary: Detener Operaciones en Curso + description: Detiene las operaciones en curso en los equipos. + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/StopRequest' + responses: + '200': + description: Operaciones detenidas correctamente + '401': + description: No autorizado +components: + schemas: + Client: + type: object + properties: + id: + type: integer + description: ID del cliente + name: + type: string + description: Nombre del cliente + ip_address: + type: string + description: Dirección IP del cliente + mac_address: + type: string + description: Dirección MAC del cliente + WOLRequest: + type: object + properties: + type: + type: string + description: Tipo de envío de paquetes Wake-on-LAN + clients: + type: array + items: + $ref: '#/components/schemas/Client' + SessionRequest: + type: object + properties: + clients: + type: array + items: + type: string + description: Direcciones IP de los clientes + disk: + type: string + description: Número del disco duro + partition: + type: string + description: Número de la partición + PowerOffRequest: + type: object + properties: + clients: + type: array + items: + type: string + description: Direcciones IP de los clientes + RebootRequest: + type: object + properties: + clients: + type: array + items: + type: string + description: Direcciones IP de los clientes + StopRequest: + type: object + properties: + clients: + type: array + items: + type: string + description: Direcciones IP de los clientes diff --git a/APIs/web-core-ogdhcp.yaml b/APIs/web-core-ogdhcp.yaml new file mode 100644 index 0000000..d686881 --- /dev/null +++ b/APIs/web-core-ogdhcp.yaml @@ -0,0 +1,346 @@ +openapi: 3.0.3 +info: + title: Core - ogDHCP - OpenAPI 3.0 + description: |- + API for DHCP service. Used by OGweb. + + Some useful links: + - [The ogDHCP repository](https://ognproject.evlt.uma.es/gitea/opengnsys/ogdhcp) + contact: + name: ogn-qindel + email: seguimiento-ogn-quindel@listas.unizar.es + version: 1.0.0 +paths: + /opengnsys3/rest/core/subnets: + get: + operationId: 8f92a1cbcb8cd176bdc4ae272b3ad303 + responses: + '200': + description: Devuelve todas las subredes + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Subnet' + '400': + description: Error al obtener las subredes + post: + summary: Add a new DHCP subnet + operationId: 88949bae5e7784ce2721ffafe7c88c0a + requestBody: + description: JSON payload + required: true + content: + application/json: + schema: + properties: + subnetId: + type: integer + example: 2 + mask: + type: string + example: 255.255.255.0 + address: + type: string + example: 192.168.1.0 + nextServer: + type: string + example: 192.168.1.1 + bootFileName: + type: string + example: pxelinux.0 + type: object + responses: + '200': + description: Subnet added successfully + content: + application/json: + schema: + properties: + success: + type: string + type: object + '400': + description: Error occurred + content: + application/json: + schema: + properties: + error: + type: string + type: object + /opengnsys3/rest/core/subnets/{subnetId}: + put: + summary: Modify a DHCP subnet + operationId: 548b55fc0e1ad59ea5b5c909dfd07c71 + parameters: + - name: subnetId + in: path + description: ID of the subnet to modify + required: true + schema: + type: integer + requestBody: + description: Data to modify the subnet + required: true + content: + application/json: + schema: + properties: + mask: + type: string + address: + type: string + nextServer: + type: string + bootFileName: + type: string + type: object + responses: + '200': + description: Subnet modified successfully + content: + application/json: + schema: + properties: + success: + type: string + type: object + '400': + description: Error occurred + content: + application/json: + schema: + properties: + error: + type: string + type: object + delete: + summary: Delete a DHCP subnet + operationId: c1c1c34729bdd85857b22e6e2bdc41de + parameters: + - name: subnetId + in: path + description: ID of the subnet to delete + required: true + schema: + type: integer + responses: + '200': + description: Subnet deleted successfully + content: + application/json: + schema: + properties: + success: + type: string + type: object + '400': + description: Error occurred + content: + application/json: + schema: + properties: + error: + type: string + type: object + /opengnsys3/rest/core/subnets/{subnetId}/hosts: + get: + summary: Get all hosts in a subnet + operationId: 0989ca622a6a7e23f5af8e3bdd6f6b05 + parameters: + - name: subnetId + in: path + description: The ID of the subnet + required: true + schema: + type: integer + responses: + '200': + description: List of hosts in the subnet + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Host' + '400': + description: Error occurred + content: + application/json: + schema: + properties: + error: + type: string + type: object + '500': + description: Server error + content: + application/json: + schema: + properties: + error: + type: string + type: object + put: + summary: Update a DHCP host + operationId: 1541441cd53685aaf6df45ab48befaa8 + parameters: + - name: subnetId + in: path + description: The ID of the subnet + required: true + schema: + type: integer + requestBody: + description: Data for the host to update + required: true + content: + application/json: + schema: + properties: + host: + type: string + example: pc11 + oldMacAddress: + type: string + example: 56:6f:c7:4f:00:4f + oldAddress: + type: string + example: 192.168.1.11 + macAddress: + type: string + example: 56:6f:c7:4f:01:01 + address: + type: string + example: 192.168.1.11 + type: object + responses: + '200': + description: Host updated successfully + content: + application/json: + schema: + properties: + success: + type: string + type: object + '400': + description: Error occurred + content: + application/json: + schema: + properties: + error: + type: string + type: object + post: + summary: Add a DHCP host to a subnet + operationId: 3f897dcd7c04787ac9c42ddbb57cb800 + parameters: + - name: subnetId + in: path + description: ID of the subnet to add the host to + required: true + schema: + type: integer + requestBody: + description: Data for the new host + required: true + content: + application/json: + schema: + properties: + host: + type: string + example: pc11 + macAddress: + type: string + example: 56:6f:c7:4f:00:4f + address: + type: string + example: 172.30.4.11 + type: object + responses: + '200': + description: Host added successfully + content: + application/json: + schema: + properties: + success: + type: string + type: object + '400': + description: Error occurred + content: + application/json: + schema: + properties: + error: + type: string + type: object + delete: + summary: Delete a DHCP host from a specific subnet + operationId: f652c52b39d57d283401df66a7930b5f + parameters: + - name: subnetId + in: path + description: The ID of the subnet + required: true + schema: + type: integer + responses: + '200': + description: Host deleted successfully + content: + application/json: + schema: + properties: + success: + type: string + type: object + '400': + description: Error occurred + content: + application/json: + schema: + properties: + error: + type: string + type: object +components: + schemas: + Subnet: + properties: + id: + description: The ID of the subnet + type: integer + subnet: + description: The name of the subnet + type: string + next-server: + description: The next server in the subnet + type: string + boot-file-name: + description: The boot file name for the subnet + type: string + reservations: + type: array + items: + description: The reservations in the subnet + type: object + type: object + Host: + properties: + host: + type: string + example: pc11 + macAddress: + type: string + example: 56:6f:c7:4f:00:4f + address: + type: string + example: 172.30.4.11 + type: object diff --git a/README.md b/README.md new file mode 100644 index 0000000..ab9443d --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# ogCore + +ogCore es el servicio central de OpenGnsys, diseñado para proporcionar funcionalidades a través de una API RESTful. Esta herramienta utiliza tecnología PHP, aprovechando el framework Symfony y el ORM Doctrine para gestionar la base de datos. \ No newline at end of file From e79f745d59a2c13b5c9df141de56653ed4da1f96 Mon Sep 17 00:00:00 2001 From: Alvaro Puente Mella Date: Wed, 15 May 2024 15:05:40 +0200 Subject: [PATCH 02/10] Delete files for initial PR fix --- APIs/web-core-ogboot.yaml | 168 -------------------------------------- 1 file changed, 168 deletions(-) delete mode 100644 APIs/web-core-ogboot.yaml diff --git a/APIs/web-core-ogboot.yaml b/APIs/web-core-ogboot.yaml deleted file mode 100644 index 7c9ca90..0000000 --- a/APIs/web-core-ogboot.yaml +++ /dev/null @@ -1,168 +0,0 @@ -openapi: 3.0.3 -info: - title: Core - ogBoot - OpenAPI 3.0 - description: |- - API for ogBOOT service. Used by OGweb. - - Some useful links: - - [The ogBOOT repository](https://ognproject.evlt.uma.es/gitea/opengnsys/ogboot) - contact: - name: ogn-qindel - email: seguimiento-ogn-quindel@listas.unizar.es - version: 1.0.0 -paths: - /opengnsys3/rest/core/clients: - get: - summary: Obtener Lista de Clientes - description: Obtiene la lista de clientes registrados en el sistema. - responses: - '200': - description: Lista de clientes - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/Client' - '401': - description: No autorizado - /opengnsys3/rest/core/wol: - post: - summary: Encender Equipos Remotamente (Wake-on-LAN) - description: Envía comandos de encendido remoto a uno o varios equipos utilizando Wake-on-LAN. - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/WOLRequest' - responses: - '200': - description: Comando de encendido enviado correctamente - '401': - description: No autorizado - /opengnsys3/rest/core/session: - post: - summary: Gestión de Sesión - description: Gestiona las sesiones de usuario en el sistema. - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/SessionRequest' - responses: - '200': - description: Sesión gestionada correctamente - '401': - description: No autorizado - /opengnsys3/rest/core/poweroff: - post: - summary: Apagar Equipos - description: Envía comandos de apagado a uno o varios equipos. - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/PowerOffRequest' - responses: - '200': - description: Comando de apagado enviado correctamente - '401': - description: No autorizado - /opengnsys3/rest/core/reboot: - post: - summary: Reiniciar Equipos - description: Envía comandos de reinicio a uno o varios equipos. - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/RebootRequest' - responses: - '200': - description: Comando de reinicio enviado correctamente - '401': - description: No autorizado - /opengnsys3/rest/core/stop: - post: - summary: Detener Operaciones en Curso - description: Detiene las operaciones en curso en los equipos. - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/StopRequest' - responses: - '200': - description: Operaciones detenidas correctamente - '401': - description: No autorizado -components: - schemas: - Client: - type: object - properties: - id: - type: integer - description: ID del cliente - name: - type: string - description: Nombre del cliente - ip_address: - type: string - description: Dirección IP del cliente - mac_address: - type: string - description: Dirección MAC del cliente - WOLRequest: - type: object - properties: - type: - type: string - description: Tipo de envío de paquetes Wake-on-LAN - clients: - type: array - items: - $ref: '#/components/schemas/Client' - SessionRequest: - type: object - properties: - clients: - type: array - items: - type: string - description: Direcciones IP de los clientes - disk: - type: string - description: Número del disco duro - partition: - type: string - description: Número de la partición - PowerOffRequest: - type: object - properties: - clients: - type: array - items: - type: string - description: Direcciones IP de los clientes - RebootRequest: - type: object - properties: - clients: - type: array - items: - type: string - description: Direcciones IP de los clientes - StopRequest: - type: object - properties: - clients: - type: array - items: - type: string - description: Direcciones IP de los clientes From 99795c53b648db3c649fcc9158127125e3c2295b Mon Sep 17 00:00:00 2001 From: Alvaro Puente Mella Date: Wed, 15 May 2024 15:05:49 +0200 Subject: [PATCH 03/10] Delete files for initial PR fix --- APIs/web-core-ogdhcp.yaml | 346 -------------------------------------- 1 file changed, 346 deletions(-) delete mode 100644 APIs/web-core-ogdhcp.yaml diff --git a/APIs/web-core-ogdhcp.yaml b/APIs/web-core-ogdhcp.yaml deleted file mode 100644 index d686881..0000000 --- a/APIs/web-core-ogdhcp.yaml +++ /dev/null @@ -1,346 +0,0 @@ -openapi: 3.0.3 -info: - title: Core - ogDHCP - OpenAPI 3.0 - description: |- - API for DHCP service. Used by OGweb. - - Some useful links: - - [The ogDHCP repository](https://ognproject.evlt.uma.es/gitea/opengnsys/ogdhcp) - contact: - name: ogn-qindel - email: seguimiento-ogn-quindel@listas.unizar.es - version: 1.0.0 -paths: - /opengnsys3/rest/core/subnets: - get: - operationId: 8f92a1cbcb8cd176bdc4ae272b3ad303 - responses: - '200': - description: Devuelve todas las subredes - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/Subnet' - '400': - description: Error al obtener las subredes - post: - summary: Add a new DHCP subnet - operationId: 88949bae5e7784ce2721ffafe7c88c0a - requestBody: - description: JSON payload - required: true - content: - application/json: - schema: - properties: - subnetId: - type: integer - example: 2 - mask: - type: string - example: 255.255.255.0 - address: - type: string - example: 192.168.1.0 - nextServer: - type: string - example: 192.168.1.1 - bootFileName: - type: string - example: pxelinux.0 - type: object - responses: - '200': - description: Subnet added successfully - content: - application/json: - schema: - properties: - success: - type: string - type: object - '400': - description: Error occurred - content: - application/json: - schema: - properties: - error: - type: string - type: object - /opengnsys3/rest/core/subnets/{subnetId}: - put: - summary: Modify a DHCP subnet - operationId: 548b55fc0e1ad59ea5b5c909dfd07c71 - parameters: - - name: subnetId - in: path - description: ID of the subnet to modify - required: true - schema: - type: integer - requestBody: - description: Data to modify the subnet - required: true - content: - application/json: - schema: - properties: - mask: - type: string - address: - type: string - nextServer: - type: string - bootFileName: - type: string - type: object - responses: - '200': - description: Subnet modified successfully - content: - application/json: - schema: - properties: - success: - type: string - type: object - '400': - description: Error occurred - content: - application/json: - schema: - properties: - error: - type: string - type: object - delete: - summary: Delete a DHCP subnet - operationId: c1c1c34729bdd85857b22e6e2bdc41de - parameters: - - name: subnetId - in: path - description: ID of the subnet to delete - required: true - schema: - type: integer - responses: - '200': - description: Subnet deleted successfully - content: - application/json: - schema: - properties: - success: - type: string - type: object - '400': - description: Error occurred - content: - application/json: - schema: - properties: - error: - type: string - type: object - /opengnsys3/rest/core/subnets/{subnetId}/hosts: - get: - summary: Get all hosts in a subnet - operationId: 0989ca622a6a7e23f5af8e3bdd6f6b05 - parameters: - - name: subnetId - in: path - description: The ID of the subnet - required: true - schema: - type: integer - responses: - '200': - description: List of hosts in the subnet - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/Host' - '400': - description: Error occurred - content: - application/json: - schema: - properties: - error: - type: string - type: object - '500': - description: Server error - content: - application/json: - schema: - properties: - error: - type: string - type: object - put: - summary: Update a DHCP host - operationId: 1541441cd53685aaf6df45ab48befaa8 - parameters: - - name: subnetId - in: path - description: The ID of the subnet - required: true - schema: - type: integer - requestBody: - description: Data for the host to update - required: true - content: - application/json: - schema: - properties: - host: - type: string - example: pc11 - oldMacAddress: - type: string - example: 56:6f:c7:4f:00:4f - oldAddress: - type: string - example: 192.168.1.11 - macAddress: - type: string - example: 56:6f:c7:4f:01:01 - address: - type: string - example: 192.168.1.11 - type: object - responses: - '200': - description: Host updated successfully - content: - application/json: - schema: - properties: - success: - type: string - type: object - '400': - description: Error occurred - content: - application/json: - schema: - properties: - error: - type: string - type: object - post: - summary: Add a DHCP host to a subnet - operationId: 3f897dcd7c04787ac9c42ddbb57cb800 - parameters: - - name: subnetId - in: path - description: ID of the subnet to add the host to - required: true - schema: - type: integer - requestBody: - description: Data for the new host - required: true - content: - application/json: - schema: - properties: - host: - type: string - example: pc11 - macAddress: - type: string - example: 56:6f:c7:4f:00:4f - address: - type: string - example: 172.30.4.11 - type: object - responses: - '200': - description: Host added successfully - content: - application/json: - schema: - properties: - success: - type: string - type: object - '400': - description: Error occurred - content: - application/json: - schema: - properties: - error: - type: string - type: object - delete: - summary: Delete a DHCP host from a specific subnet - operationId: f652c52b39d57d283401df66a7930b5f - parameters: - - name: subnetId - in: path - description: The ID of the subnet - required: true - schema: - type: integer - responses: - '200': - description: Host deleted successfully - content: - application/json: - schema: - properties: - success: - type: string - type: object - '400': - description: Error occurred - content: - application/json: - schema: - properties: - error: - type: string - type: object -components: - schemas: - Subnet: - properties: - id: - description: The ID of the subnet - type: integer - subnet: - description: The name of the subnet - type: string - next-server: - description: The next server in the subnet - type: string - boot-file-name: - description: The boot file name for the subnet - type: string - reservations: - type: array - items: - description: The reservations in the subnet - type: object - type: object - Host: - properties: - host: - type: string - example: pc11 - macAddress: - type: string - example: 56:6f:c7:4f:00:4f - address: - type: string - example: 172.30.4.11 - type: object From 333632009c94747b7a5d27e9375e7226b7fd108e Mon Sep 17 00:00:00 2001 From: Manuel Aranda Date: Tue, 21 May 2024 09:07:03 +0200 Subject: [PATCH 04/10] refs #386. Crear documentacion para migracion --- README.md | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 37bad13..57f4ded 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ ## Descripción -ogCore es el servicio central de OpenGnsys, diseñado para proporcionar funcionalidades a través de una API RESTful. Esta herramienta utiliza tecnología PHP, aprovechando el framework Symfony y el ORM Doctrine para gestionar la base de datos. +ogCore es el servicio central de OpenGnsys, diseñado para proporcionar funcionalidades a través de una API RESTful. Esta herramienta utiliza tecnología PHP, aprovechando el framework Symfony y el ORM Doctrine para gestionar la base de datos. A continuación, se detallan los pasos necesarios para desplegar el proyecto en un entorno de desarrollo. ## Requisitos @@ -10,7 +10,7 @@ A continuación, se detallan los pasos necesarios para desplegar el proyecto en Antes de comenzar, asegúrate de tener los siguientes requisitos: - Docker -- Docker compose +- Docker compose ## Instalación @@ -22,7 +22,7 @@ Para que no haya conflictos entre los puertos, asegúrate de que no tienes ning docker compose up --build -d ``` -Comprobamos que se han levantado correctamente bien los 3 contenedores de la aplicación: +Comprobamos que se han levantado correctamente bien los 3 contenedores de la aplicación: ```sh docker ps @@ -34,10 +34,23 @@ Y deberiamos ver algo parecido a : - ogcore-php-1 - ogcore-database-1 -Comprobamos, que el contenedor de Nginx, tiene el puerto 8080 levantado correctamente, asi que tan solo tendremos que -acceder a la siguiente URL: +Comprobamos, que el contenedor de Nginx, tiene el puerto 8080 levantado correctamente, asi que tan solo tendremos que +acceder a la siguiente URL: ```sh http://127.0.0.1:8080/api ``` -Si todo ha ido bien, deberiamos ver la documentación de la API de ogCore. +Si todo ha ido bien, deberiamos ver la documentación de la API de ogCore. + +Para poder actualizar la base de datos: + +Para inicializar la base de datos: + +```sh +docker exec ogcore-php symfony console doctrine:migrations:migrate --no-interaction +``` + +```sh +docker exec ogcore-php symfony console doctrine:fixtures:load --no-interaction +``` + From 48358fe0089da420cd8b7f4bfefd0912e7349dd7 Mon Sep 17 00:00:00 2001 From: Manuel Aranda Date: Tue, 21 May 2024 09:28:19 +0200 Subject: [PATCH 05/10] Updated README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 57f4ded..aaa3156 100644 --- a/README.md +++ b/README.md @@ -38,7 +38,7 @@ Comprobamos, que el contenedor de Nginx, tiene el puerto 8080 levantado correcta acceder a la siguiente URL: ```sh -http://127.0.0.1:8080/api +http://127.0.0.1:8080/api/docs ``` Si todo ha ido bien, deberiamos ver la documentación de la API de ogCore. From 07b4a3dd2402657030d829594d7f4fae678fd31f Mon Sep 17 00:00:00 2001 From: Manuel Aranda Date: Tue, 21 May 2024 09:39:16 +0200 Subject: [PATCH 06/10] Updated README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ab9443d..6164c2b 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,3 @@ # ogCore -ogCore es el servicio central de OpenGnsys, diseñado para proporcionar funcionalidades a través de una API RESTful. Esta herramienta utiliza tecnología PHP, aprovechando el framework Symfony y el ORM Doctrine para gestionar la base de datos. \ No newline at end of file +ogCore es el servicio central de OpenGnsys, diseñado para proporcionar funcionalidades a través de una API RESTful. Esta herramienta utiliza tecnología PHP, aprovechando el framework Symfony y el ORM Doctrine para gestionar la base de datos \ No newline at end of file From 4e99ad241d992b0c4898090ffa100af7a0868f95 Mon Sep 17 00:00:00 2001 From: Manuel Aranda Date: Tue, 21 May 2024 09:56:54 +0200 Subject: [PATCH 07/10] refs #386. Crear documentacion para despliegue de entorno de desarrollo --- APIs/web-core-ogboot.yaml | 168 ++++++++++++++++++ APIs/web-core-ogdhcp.yaml | 346 ++++++++++++++++++++++++++++++++++++++ README.md | 57 +------ 3 files changed, 515 insertions(+), 56 deletions(-) create mode 100644 APIs/web-core-ogboot.yaml create mode 100644 APIs/web-core-ogdhcp.yaml diff --git a/APIs/web-core-ogboot.yaml b/APIs/web-core-ogboot.yaml new file mode 100644 index 0000000..7c9ca90 --- /dev/null +++ b/APIs/web-core-ogboot.yaml @@ -0,0 +1,168 @@ +openapi: 3.0.3 +info: + title: Core - ogBoot - OpenAPI 3.0 + description: |- + API for ogBOOT service. Used by OGweb. + + Some useful links: + - [The ogBOOT repository](https://ognproject.evlt.uma.es/gitea/opengnsys/ogboot) + contact: + name: ogn-qindel + email: seguimiento-ogn-quindel@listas.unizar.es + version: 1.0.0 +paths: + /opengnsys3/rest/core/clients: + get: + summary: Obtener Lista de Clientes + description: Obtiene la lista de clientes registrados en el sistema. + responses: + '200': + description: Lista de clientes + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Client' + '401': + description: No autorizado + /opengnsys3/rest/core/wol: + post: + summary: Encender Equipos Remotamente (Wake-on-LAN) + description: Envía comandos de encendido remoto a uno o varios equipos utilizando Wake-on-LAN. + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/WOLRequest' + responses: + '200': + description: Comando de encendido enviado correctamente + '401': + description: No autorizado + /opengnsys3/rest/core/session: + post: + summary: Gestión de Sesión + description: Gestiona las sesiones de usuario en el sistema. + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/SessionRequest' + responses: + '200': + description: Sesión gestionada correctamente + '401': + description: No autorizado + /opengnsys3/rest/core/poweroff: + post: + summary: Apagar Equipos + description: Envía comandos de apagado a uno o varios equipos. + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/PowerOffRequest' + responses: + '200': + description: Comando de apagado enviado correctamente + '401': + description: No autorizado + /opengnsys3/rest/core/reboot: + post: + summary: Reiniciar Equipos + description: Envía comandos de reinicio a uno o varios equipos. + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/RebootRequest' + responses: + '200': + description: Comando de reinicio enviado correctamente + '401': + description: No autorizado + /opengnsys3/rest/core/stop: + post: + summary: Detener Operaciones en Curso + description: Detiene las operaciones en curso en los equipos. + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/StopRequest' + responses: + '200': + description: Operaciones detenidas correctamente + '401': + description: No autorizado +components: + schemas: + Client: + type: object + properties: + id: + type: integer + description: ID del cliente + name: + type: string + description: Nombre del cliente + ip_address: + type: string + description: Dirección IP del cliente + mac_address: + type: string + description: Dirección MAC del cliente + WOLRequest: + type: object + properties: + type: + type: string + description: Tipo de envío de paquetes Wake-on-LAN + clients: + type: array + items: + $ref: '#/components/schemas/Client' + SessionRequest: + type: object + properties: + clients: + type: array + items: + type: string + description: Direcciones IP de los clientes + disk: + type: string + description: Número del disco duro + partition: + type: string + description: Número de la partición + PowerOffRequest: + type: object + properties: + clients: + type: array + items: + type: string + description: Direcciones IP de los clientes + RebootRequest: + type: object + properties: + clients: + type: array + items: + type: string + description: Direcciones IP de los clientes + StopRequest: + type: object + properties: + clients: + type: array + items: + type: string + description: Direcciones IP de los clientes diff --git a/APIs/web-core-ogdhcp.yaml b/APIs/web-core-ogdhcp.yaml new file mode 100644 index 0000000..d686881 --- /dev/null +++ b/APIs/web-core-ogdhcp.yaml @@ -0,0 +1,346 @@ +openapi: 3.0.3 +info: + title: Core - ogDHCP - OpenAPI 3.0 + description: |- + API for DHCP service. Used by OGweb. + + Some useful links: + - [The ogDHCP repository](https://ognproject.evlt.uma.es/gitea/opengnsys/ogdhcp) + contact: + name: ogn-qindel + email: seguimiento-ogn-quindel@listas.unizar.es + version: 1.0.0 +paths: + /opengnsys3/rest/core/subnets: + get: + operationId: 8f92a1cbcb8cd176bdc4ae272b3ad303 + responses: + '200': + description: Devuelve todas las subredes + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Subnet' + '400': + description: Error al obtener las subredes + post: + summary: Add a new DHCP subnet + operationId: 88949bae5e7784ce2721ffafe7c88c0a + requestBody: + description: JSON payload + required: true + content: + application/json: + schema: + properties: + subnetId: + type: integer + example: 2 + mask: + type: string + example: 255.255.255.0 + address: + type: string + example: 192.168.1.0 + nextServer: + type: string + example: 192.168.1.1 + bootFileName: + type: string + example: pxelinux.0 + type: object + responses: + '200': + description: Subnet added successfully + content: + application/json: + schema: + properties: + success: + type: string + type: object + '400': + description: Error occurred + content: + application/json: + schema: + properties: + error: + type: string + type: object + /opengnsys3/rest/core/subnets/{subnetId}: + put: + summary: Modify a DHCP subnet + operationId: 548b55fc0e1ad59ea5b5c909dfd07c71 + parameters: + - name: subnetId + in: path + description: ID of the subnet to modify + required: true + schema: + type: integer + requestBody: + description: Data to modify the subnet + required: true + content: + application/json: + schema: + properties: + mask: + type: string + address: + type: string + nextServer: + type: string + bootFileName: + type: string + type: object + responses: + '200': + description: Subnet modified successfully + content: + application/json: + schema: + properties: + success: + type: string + type: object + '400': + description: Error occurred + content: + application/json: + schema: + properties: + error: + type: string + type: object + delete: + summary: Delete a DHCP subnet + operationId: c1c1c34729bdd85857b22e6e2bdc41de + parameters: + - name: subnetId + in: path + description: ID of the subnet to delete + required: true + schema: + type: integer + responses: + '200': + description: Subnet deleted successfully + content: + application/json: + schema: + properties: + success: + type: string + type: object + '400': + description: Error occurred + content: + application/json: + schema: + properties: + error: + type: string + type: object + /opengnsys3/rest/core/subnets/{subnetId}/hosts: + get: + summary: Get all hosts in a subnet + operationId: 0989ca622a6a7e23f5af8e3bdd6f6b05 + parameters: + - name: subnetId + in: path + description: The ID of the subnet + required: true + schema: + type: integer + responses: + '200': + description: List of hosts in the subnet + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Host' + '400': + description: Error occurred + content: + application/json: + schema: + properties: + error: + type: string + type: object + '500': + description: Server error + content: + application/json: + schema: + properties: + error: + type: string + type: object + put: + summary: Update a DHCP host + operationId: 1541441cd53685aaf6df45ab48befaa8 + parameters: + - name: subnetId + in: path + description: The ID of the subnet + required: true + schema: + type: integer + requestBody: + description: Data for the host to update + required: true + content: + application/json: + schema: + properties: + host: + type: string + example: pc11 + oldMacAddress: + type: string + example: 56:6f:c7:4f:00:4f + oldAddress: + type: string + example: 192.168.1.11 + macAddress: + type: string + example: 56:6f:c7:4f:01:01 + address: + type: string + example: 192.168.1.11 + type: object + responses: + '200': + description: Host updated successfully + content: + application/json: + schema: + properties: + success: + type: string + type: object + '400': + description: Error occurred + content: + application/json: + schema: + properties: + error: + type: string + type: object + post: + summary: Add a DHCP host to a subnet + operationId: 3f897dcd7c04787ac9c42ddbb57cb800 + parameters: + - name: subnetId + in: path + description: ID of the subnet to add the host to + required: true + schema: + type: integer + requestBody: + description: Data for the new host + required: true + content: + application/json: + schema: + properties: + host: + type: string + example: pc11 + macAddress: + type: string + example: 56:6f:c7:4f:00:4f + address: + type: string + example: 172.30.4.11 + type: object + responses: + '200': + description: Host added successfully + content: + application/json: + schema: + properties: + success: + type: string + type: object + '400': + description: Error occurred + content: + application/json: + schema: + properties: + error: + type: string + type: object + delete: + summary: Delete a DHCP host from a specific subnet + operationId: f652c52b39d57d283401df66a7930b5f + parameters: + - name: subnetId + in: path + description: The ID of the subnet + required: true + schema: + type: integer + responses: + '200': + description: Host deleted successfully + content: + application/json: + schema: + properties: + success: + type: string + type: object + '400': + description: Error occurred + content: + application/json: + schema: + properties: + error: + type: string + type: object +components: + schemas: + Subnet: + properties: + id: + description: The ID of the subnet + type: integer + subnet: + description: The name of the subnet + type: string + next-server: + description: The next server in the subnet + type: string + boot-file-name: + description: The boot file name for the subnet + type: string + reservations: + type: array + items: + description: The reservations in the subnet + type: object + type: object + Host: + properties: + host: + type: string + example: pc11 + macAddress: + type: string + example: 56:6f:c7:4f:00:4f + address: + type: string + example: 172.30.4.11 + type: object diff --git a/README.md b/README.md index aaa3156..c871635 100644 --- a/README.md +++ b/README.md @@ -1,56 +1 @@ -# OgCore Project - -## Descripción - -ogCore es el servicio central de OpenGnsys, diseñado para proporcionar funcionalidades a través de una API RESTful. Esta herramienta utiliza tecnología PHP, aprovechando el framework Symfony y el ORM Doctrine para gestionar la base de datos. -A continuación, se detallan los pasos necesarios para desplegar el proyecto en un entorno de desarrollo. - -## Requisitos - -Antes de comenzar, asegúrate de tener los siguientes requisitos: - -- Docker -- Docker compose - -## Instalación - -### Desplegar contenedores - -Para que no haya conflictos entre los puertos, asegúrate de que no tienes ningún servicio corriendo en los puertos 8080 y 3306. - -```sh -docker compose up --build -d -``` - -Comprobamos que se han levantado correctamente bien los 3 contenedores de la aplicación: - -```sh -docker ps -``` - -Y deberiamos ver algo parecido a : - -- ogcore-nginx-1 -- ogcore-php-1 -- ogcore-database-1 - -Comprobamos, que el contenedor de Nginx, tiene el puerto 8080 levantado correctamente, asi que tan solo tendremos que -acceder a la siguiente URL: - -```sh -http://127.0.0.1:8080/api/docs -``` -Si todo ha ido bien, deberiamos ver la documentación de la API de ogCore. - -Para poder actualizar la base de datos: - -Para inicializar la base de datos: - -```sh -docker exec ogcore-php symfony console doctrine:migrations:migrate --no-interaction -``` - -```sh -docker exec ogcore-php symfony console doctrine:fixtures:load --no-interaction -``` - +ogCore es el servicio central de OpenGnsys, diseñado para proporcionar funcionalidades a través de una API RESTful. Esta herramienta utiliza tecnología PHP, aprovechando el framework Symfony y el ORM Doctrine para gestionar la base de datos. \ No newline at end of file From 34dd5e497109ec0f37a8560582e16dbdcf29d66b Mon Sep 17 00:00:00 2001 From: Manuel Aranda Date: Tue, 21 May 2024 09:57:58 +0200 Subject: [PATCH 08/10] refs #386. Crear documentacion para despliegue de entorno de desarrollo --- README.md | 55 ++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 54 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index c871635..c6ca4ae 100644 --- a/README.md +++ b/README.md @@ -1 +1,54 @@ -ogCore es el servicio central de OpenGnsys, diseñado para proporcionar funcionalidades a través de una API RESTful. Esta herramienta utiliza tecnología PHP, aprovechando el framework Symfony y el ORM Doctrine para gestionar la base de datos. \ No newline at end of file + +## Descripción + +ogCore es el servicio central de OpenGnsys, diseñado para proporcionar funcionalidades a través de una API RESTful. Esta herramienta utiliza tecnología PHP, aprovechando el framework Symfony y el ORM Doctrine para gestionar la base de datos. +A continuación, se detallan los pasos necesarios para desplegar el proyecto en un entorno de desarrollo. + +## Requisitos + +Antes de comenzar, asegúrate de tener los siguientes requisitos: + +- Docker +- Docker compose + +## Instalación + +### Desplegar contenedores + +Para que no haya conflictos entre los puertos, asegúrate de que no tienes ningún servicio corriendo en los puertos 8080 y 3306. + +```sh +docker compose up --build -d +``` + +Comprobamos que se han levantado correctamente bien los 3 contenedores de la aplicación: + +```sh +docker ps +``` + +Y deberiamos ver algo parecido a : + +- ogcore-nginx-1 +- ogcore-php-1 +- ogcore-database-1 + +Comprobamos, que el contenedor de Nginx, tiene el puerto 8080 levantado correctamente, asi que tan solo tendremos que +acceder a la siguiente URL: + +```sh +http://127.0.0.1:8080/api/docs +``` +Si todo ha ido bien, deberiamos ver la documentación de la API de ogCore. + +Para poder actualizar la base de datos: + +Para inicializar la base de datos: + +```sh +docker exec ogcore-php symfony console doctrine:migrations:migrate --no-interaction +``` + +```sh +docker exec ogcore-php symfony console doctrine:fixtures:load --no-interaction +``` From 255867eac15c9fb17443d6993656f9dd370d1fef Mon Sep 17 00:00:00 2001 From: Alvaro Puente Mella Date: Wed, 15 May 2024 15:05:40 +0200 Subject: [PATCH 09/10] Delete files for initial PR fix --- APIs/web-core-ogboot.yaml | 168 -------------------------------------- 1 file changed, 168 deletions(-) delete mode 100644 APIs/web-core-ogboot.yaml diff --git a/APIs/web-core-ogboot.yaml b/APIs/web-core-ogboot.yaml deleted file mode 100644 index 7c9ca90..0000000 --- a/APIs/web-core-ogboot.yaml +++ /dev/null @@ -1,168 +0,0 @@ -openapi: 3.0.3 -info: - title: Core - ogBoot - OpenAPI 3.0 - description: |- - API for ogBOOT service. Used by OGweb. - - Some useful links: - - [The ogBOOT repository](https://ognproject.evlt.uma.es/gitea/opengnsys/ogboot) - contact: - name: ogn-qindel - email: seguimiento-ogn-quindel@listas.unizar.es - version: 1.0.0 -paths: - /opengnsys3/rest/core/clients: - get: - summary: Obtener Lista de Clientes - description: Obtiene la lista de clientes registrados en el sistema. - responses: - '200': - description: Lista de clientes - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/Client' - '401': - description: No autorizado - /opengnsys3/rest/core/wol: - post: - summary: Encender Equipos Remotamente (Wake-on-LAN) - description: Envía comandos de encendido remoto a uno o varios equipos utilizando Wake-on-LAN. - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/WOLRequest' - responses: - '200': - description: Comando de encendido enviado correctamente - '401': - description: No autorizado - /opengnsys3/rest/core/session: - post: - summary: Gestión de Sesión - description: Gestiona las sesiones de usuario en el sistema. - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/SessionRequest' - responses: - '200': - description: Sesión gestionada correctamente - '401': - description: No autorizado - /opengnsys3/rest/core/poweroff: - post: - summary: Apagar Equipos - description: Envía comandos de apagado a uno o varios equipos. - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/PowerOffRequest' - responses: - '200': - description: Comando de apagado enviado correctamente - '401': - description: No autorizado - /opengnsys3/rest/core/reboot: - post: - summary: Reiniciar Equipos - description: Envía comandos de reinicio a uno o varios equipos. - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/RebootRequest' - responses: - '200': - description: Comando de reinicio enviado correctamente - '401': - description: No autorizado - /opengnsys3/rest/core/stop: - post: - summary: Detener Operaciones en Curso - description: Detiene las operaciones en curso en los equipos. - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/StopRequest' - responses: - '200': - description: Operaciones detenidas correctamente - '401': - description: No autorizado -components: - schemas: - Client: - type: object - properties: - id: - type: integer - description: ID del cliente - name: - type: string - description: Nombre del cliente - ip_address: - type: string - description: Dirección IP del cliente - mac_address: - type: string - description: Dirección MAC del cliente - WOLRequest: - type: object - properties: - type: - type: string - description: Tipo de envío de paquetes Wake-on-LAN - clients: - type: array - items: - $ref: '#/components/schemas/Client' - SessionRequest: - type: object - properties: - clients: - type: array - items: - type: string - description: Direcciones IP de los clientes - disk: - type: string - description: Número del disco duro - partition: - type: string - description: Número de la partición - PowerOffRequest: - type: object - properties: - clients: - type: array - items: - type: string - description: Direcciones IP de los clientes - RebootRequest: - type: object - properties: - clients: - type: array - items: - type: string - description: Direcciones IP de los clientes - StopRequest: - type: object - properties: - clients: - type: array - items: - type: string - description: Direcciones IP de los clientes From 26a85ec6ab7320f0e74f2c856d582aaf0a872bcd Mon Sep 17 00:00:00 2001 From: Alvaro Puente Mella Date: Wed, 15 May 2024 15:05:49 +0200 Subject: [PATCH 10/10] Delete files for initial PR fix --- APIs/web-core-ogdhcp.yaml | 346 -------------------------------------- 1 file changed, 346 deletions(-) delete mode 100644 APIs/web-core-ogdhcp.yaml diff --git a/APIs/web-core-ogdhcp.yaml b/APIs/web-core-ogdhcp.yaml deleted file mode 100644 index d686881..0000000 --- a/APIs/web-core-ogdhcp.yaml +++ /dev/null @@ -1,346 +0,0 @@ -openapi: 3.0.3 -info: - title: Core - ogDHCP - OpenAPI 3.0 - description: |- - API for DHCP service. Used by OGweb. - - Some useful links: - - [The ogDHCP repository](https://ognproject.evlt.uma.es/gitea/opengnsys/ogdhcp) - contact: - name: ogn-qindel - email: seguimiento-ogn-quindel@listas.unizar.es - version: 1.0.0 -paths: - /opengnsys3/rest/core/subnets: - get: - operationId: 8f92a1cbcb8cd176bdc4ae272b3ad303 - responses: - '200': - description: Devuelve todas las subredes - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/Subnet' - '400': - description: Error al obtener las subredes - post: - summary: Add a new DHCP subnet - operationId: 88949bae5e7784ce2721ffafe7c88c0a - requestBody: - description: JSON payload - required: true - content: - application/json: - schema: - properties: - subnetId: - type: integer - example: 2 - mask: - type: string - example: 255.255.255.0 - address: - type: string - example: 192.168.1.0 - nextServer: - type: string - example: 192.168.1.1 - bootFileName: - type: string - example: pxelinux.0 - type: object - responses: - '200': - description: Subnet added successfully - content: - application/json: - schema: - properties: - success: - type: string - type: object - '400': - description: Error occurred - content: - application/json: - schema: - properties: - error: - type: string - type: object - /opengnsys3/rest/core/subnets/{subnetId}: - put: - summary: Modify a DHCP subnet - operationId: 548b55fc0e1ad59ea5b5c909dfd07c71 - parameters: - - name: subnetId - in: path - description: ID of the subnet to modify - required: true - schema: - type: integer - requestBody: - description: Data to modify the subnet - required: true - content: - application/json: - schema: - properties: - mask: - type: string - address: - type: string - nextServer: - type: string - bootFileName: - type: string - type: object - responses: - '200': - description: Subnet modified successfully - content: - application/json: - schema: - properties: - success: - type: string - type: object - '400': - description: Error occurred - content: - application/json: - schema: - properties: - error: - type: string - type: object - delete: - summary: Delete a DHCP subnet - operationId: c1c1c34729bdd85857b22e6e2bdc41de - parameters: - - name: subnetId - in: path - description: ID of the subnet to delete - required: true - schema: - type: integer - responses: - '200': - description: Subnet deleted successfully - content: - application/json: - schema: - properties: - success: - type: string - type: object - '400': - description: Error occurred - content: - application/json: - schema: - properties: - error: - type: string - type: object - /opengnsys3/rest/core/subnets/{subnetId}/hosts: - get: - summary: Get all hosts in a subnet - operationId: 0989ca622a6a7e23f5af8e3bdd6f6b05 - parameters: - - name: subnetId - in: path - description: The ID of the subnet - required: true - schema: - type: integer - responses: - '200': - description: List of hosts in the subnet - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/Host' - '400': - description: Error occurred - content: - application/json: - schema: - properties: - error: - type: string - type: object - '500': - description: Server error - content: - application/json: - schema: - properties: - error: - type: string - type: object - put: - summary: Update a DHCP host - operationId: 1541441cd53685aaf6df45ab48befaa8 - parameters: - - name: subnetId - in: path - description: The ID of the subnet - required: true - schema: - type: integer - requestBody: - description: Data for the host to update - required: true - content: - application/json: - schema: - properties: - host: - type: string - example: pc11 - oldMacAddress: - type: string - example: 56:6f:c7:4f:00:4f - oldAddress: - type: string - example: 192.168.1.11 - macAddress: - type: string - example: 56:6f:c7:4f:01:01 - address: - type: string - example: 192.168.1.11 - type: object - responses: - '200': - description: Host updated successfully - content: - application/json: - schema: - properties: - success: - type: string - type: object - '400': - description: Error occurred - content: - application/json: - schema: - properties: - error: - type: string - type: object - post: - summary: Add a DHCP host to a subnet - operationId: 3f897dcd7c04787ac9c42ddbb57cb800 - parameters: - - name: subnetId - in: path - description: ID of the subnet to add the host to - required: true - schema: - type: integer - requestBody: - description: Data for the new host - required: true - content: - application/json: - schema: - properties: - host: - type: string - example: pc11 - macAddress: - type: string - example: 56:6f:c7:4f:00:4f - address: - type: string - example: 172.30.4.11 - type: object - responses: - '200': - description: Host added successfully - content: - application/json: - schema: - properties: - success: - type: string - type: object - '400': - description: Error occurred - content: - application/json: - schema: - properties: - error: - type: string - type: object - delete: - summary: Delete a DHCP host from a specific subnet - operationId: f652c52b39d57d283401df66a7930b5f - parameters: - - name: subnetId - in: path - description: The ID of the subnet - required: true - schema: - type: integer - responses: - '200': - description: Host deleted successfully - content: - application/json: - schema: - properties: - success: - type: string - type: object - '400': - description: Error occurred - content: - application/json: - schema: - properties: - error: - type: string - type: object -components: - schemas: - Subnet: - properties: - id: - description: The ID of the subnet - type: integer - subnet: - description: The name of the subnet - type: string - next-server: - description: The next server in the subnet - type: string - boot-file-name: - description: The boot file name for the subnet - type: string - reservations: - type: array - items: - description: The reservations in the subnet - type: object - type: object - Host: - properties: - host: - type: string - example: pc11 - macAddress: - type: string - example: 56:6f:c7:4f:00:4f - address: - type: string - example: 172.30.4.11 - type: object