From 14e7f8024066253b312b942b8f2f3491b5ef19d8 Mon Sep 17 00:00:00 2001 From: Manuel Bentele Date: Thu, 23 Dec 2021 15:13:52 +0100 Subject: [SERVER] Add source code of autogenerated server API --- dozentenmodulserver/api/.openapi-generator-ignore | 23 + dozentenmodulserver/api/.openapi-generator/FILES | 33 ++ dozentenmodulserver/api/.openapi-generator/VERSION | 1 + .../bwlp-server-openapi.yaml-default.sha256 | 1 + dozentenmodulserver/api/README.md | 18 + dozentenmodulserver/api/pom.xml | 78 +++ .../openapitools/configuration/HomeController.java | 19 + .../org/openslx/bwlp/sat/api/handler/ApiUtil.java | 19 + .../org/openslx/bwlp/sat/api/handler/BwlpApi.java | 54 ++ .../bwlp/sat/api/handler/BwlpApiController.java | 24 + .../org/openslx/bwlp/sat/api/handler/DoApi.java | 217 ++++++++ .../bwlp/sat/api/handler/DoApiController.java | 24 + .../org/openslx/bwlp/sat/api/handler/ImageApi.java | 58 +++ .../bwlp/sat/api/handler/ImageApiController.java | 24 + .../bwlp/sat/api/handler/OpenAPI2SpringBoot.java | 57 +++ .../bwlp/sat/api/handler/RFC3339DateFormat.java | 38 ++ .../openslx/bwlp/sat/api/handler/StatusApi.java | 61 +++ .../bwlp/sat/api/handler/StatusApiController.java | 24 + .../openslx/bwlp/sat/api/handler/VmchooserApi.java | 152 ++++++ .../sat/api/handler/VmchooserApiController.java | 24 + .../bwlp/sat/api/model/StatusFileserver.java | 109 ++++ .../bwlp/sat/api/model/VirtualMachineImage.java | 408 +++++++++++++++ .../sat/api/model/VirtualMachineImageCreator.java | 84 +++ .../api/model/VirtualMachineImageForLocation.java | 84 +++ .../api/model/VirtualMachineImageIsTemplate.java | 120 +++++ .../model/VirtualMachineImageLongDescription.java | 84 +++ .../sat/api/model/VirtualMachineImageName.java | 84 +++ .../sat/api/model/VirtualMachineImageOsName.java | 84 +++ .../sat/api/model/VirtualMachineImagePriority.java | 84 +++ .../model/VirtualMachineImageShortDescription.java | 84 +++ .../sat/api/model/VirtualMachineImageUuid.java | 86 ++++ .../model/VirtualMachineImageVirtualMachine.java | 84 +++ .../model/VirtualMachineImageVirtualizerName.java | 84 +++ .../bwlp/sat/api/model/VirtualMachineImages.java | 97 ++++ .../api/src/main/resources/application.properties | 4 + .../api/src/main/resources/openapi.yaml | 568 +++++++++++++++++++++ 36 files changed, 3097 insertions(+) create mode 100644 dozentenmodulserver/api/.openapi-generator-ignore create mode 100644 dozentenmodulserver/api/.openapi-generator/FILES create mode 100644 dozentenmodulserver/api/.openapi-generator/VERSION create mode 100644 dozentenmodulserver/api/.openapi-generator/bwlp-server-openapi.yaml-default.sha256 create mode 100644 dozentenmodulserver/api/README.md create mode 100644 dozentenmodulserver/api/pom.xml create mode 100644 dozentenmodulserver/api/src/main/java/org/openapitools/configuration/HomeController.java create mode 100644 dozentenmodulserver/api/src/main/java/org/openslx/bwlp/sat/api/handler/ApiUtil.java create mode 100644 dozentenmodulserver/api/src/main/java/org/openslx/bwlp/sat/api/handler/BwlpApi.java create mode 100644 dozentenmodulserver/api/src/main/java/org/openslx/bwlp/sat/api/handler/BwlpApiController.java create mode 100644 dozentenmodulserver/api/src/main/java/org/openslx/bwlp/sat/api/handler/DoApi.java create mode 100644 dozentenmodulserver/api/src/main/java/org/openslx/bwlp/sat/api/handler/DoApiController.java create mode 100644 dozentenmodulserver/api/src/main/java/org/openslx/bwlp/sat/api/handler/ImageApi.java create mode 100644 dozentenmodulserver/api/src/main/java/org/openslx/bwlp/sat/api/handler/ImageApiController.java create mode 100644 dozentenmodulserver/api/src/main/java/org/openslx/bwlp/sat/api/handler/OpenAPI2SpringBoot.java create mode 100644 dozentenmodulserver/api/src/main/java/org/openslx/bwlp/sat/api/handler/RFC3339DateFormat.java create mode 100644 dozentenmodulserver/api/src/main/java/org/openslx/bwlp/sat/api/handler/StatusApi.java create mode 100644 dozentenmodulserver/api/src/main/java/org/openslx/bwlp/sat/api/handler/StatusApiController.java create mode 100644 dozentenmodulserver/api/src/main/java/org/openslx/bwlp/sat/api/handler/VmchooserApi.java create mode 100644 dozentenmodulserver/api/src/main/java/org/openslx/bwlp/sat/api/handler/VmchooserApiController.java create mode 100644 dozentenmodulserver/api/src/main/java/org/openslx/bwlp/sat/api/model/StatusFileserver.java create mode 100644 dozentenmodulserver/api/src/main/java/org/openslx/bwlp/sat/api/model/VirtualMachineImage.java create mode 100644 dozentenmodulserver/api/src/main/java/org/openslx/bwlp/sat/api/model/VirtualMachineImageCreator.java create mode 100644 dozentenmodulserver/api/src/main/java/org/openslx/bwlp/sat/api/model/VirtualMachineImageForLocation.java create mode 100644 dozentenmodulserver/api/src/main/java/org/openslx/bwlp/sat/api/model/VirtualMachineImageIsTemplate.java create mode 100644 dozentenmodulserver/api/src/main/java/org/openslx/bwlp/sat/api/model/VirtualMachineImageLongDescription.java create mode 100644 dozentenmodulserver/api/src/main/java/org/openslx/bwlp/sat/api/model/VirtualMachineImageName.java create mode 100644 dozentenmodulserver/api/src/main/java/org/openslx/bwlp/sat/api/model/VirtualMachineImageOsName.java create mode 100644 dozentenmodulserver/api/src/main/java/org/openslx/bwlp/sat/api/model/VirtualMachineImagePriority.java create mode 100644 dozentenmodulserver/api/src/main/java/org/openslx/bwlp/sat/api/model/VirtualMachineImageShortDescription.java create mode 100644 dozentenmodulserver/api/src/main/java/org/openslx/bwlp/sat/api/model/VirtualMachineImageUuid.java create mode 100644 dozentenmodulserver/api/src/main/java/org/openslx/bwlp/sat/api/model/VirtualMachineImageVirtualMachine.java create mode 100644 dozentenmodulserver/api/src/main/java/org/openslx/bwlp/sat/api/model/VirtualMachineImageVirtualizerName.java create mode 100644 dozentenmodulserver/api/src/main/java/org/openslx/bwlp/sat/api/model/VirtualMachineImages.java create mode 100644 dozentenmodulserver/api/src/main/resources/application.properties create mode 100644 dozentenmodulserver/api/src/main/resources/openapi.yaml diff --git a/dozentenmodulserver/api/.openapi-generator-ignore b/dozentenmodulserver/api/.openapi-generator-ignore new file mode 100644 index 00000000..7484ee59 --- /dev/null +++ b/dozentenmodulserver/api/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/dozentenmodulserver/api/.openapi-generator/FILES b/dozentenmodulserver/api/.openapi-generator/FILES new file mode 100644 index 00000000..143a6f59 --- /dev/null +++ b/dozentenmodulserver/api/.openapi-generator/FILES @@ -0,0 +1,33 @@ +.openapi-generator-ignore +README.md +pom.xml +src/main/java/org/openapitools/configuration/HomeController.java +src/main/java/org/openslx/bwlp/sat/api/handler/ApiUtil.java +src/main/java/org/openslx/bwlp/sat/api/handler/BwlpApi.java +src/main/java/org/openslx/bwlp/sat/api/handler/BwlpApiController.java +src/main/java/org/openslx/bwlp/sat/api/handler/DoApi.java +src/main/java/org/openslx/bwlp/sat/api/handler/DoApiController.java +src/main/java/org/openslx/bwlp/sat/api/handler/ImageApi.java +src/main/java/org/openslx/bwlp/sat/api/handler/ImageApiController.java +src/main/java/org/openslx/bwlp/sat/api/handler/OpenAPI2SpringBoot.java +src/main/java/org/openslx/bwlp/sat/api/handler/RFC3339DateFormat.java +src/main/java/org/openslx/bwlp/sat/api/handler/StatusApi.java +src/main/java/org/openslx/bwlp/sat/api/handler/StatusApiController.java +src/main/java/org/openslx/bwlp/sat/api/handler/VmchooserApi.java +src/main/java/org/openslx/bwlp/sat/api/handler/VmchooserApiController.java +src/main/java/org/openslx/bwlp/sat/api/model/StatusFileserver.java +src/main/java/org/openslx/bwlp/sat/api/model/VirtualMachineImage.java +src/main/java/org/openslx/bwlp/sat/api/model/VirtualMachineImageCreator.java +src/main/java/org/openslx/bwlp/sat/api/model/VirtualMachineImageForLocation.java +src/main/java/org/openslx/bwlp/sat/api/model/VirtualMachineImageIsTemplate.java +src/main/java/org/openslx/bwlp/sat/api/model/VirtualMachineImageLongDescription.java +src/main/java/org/openslx/bwlp/sat/api/model/VirtualMachineImageName.java +src/main/java/org/openslx/bwlp/sat/api/model/VirtualMachineImageOsName.java +src/main/java/org/openslx/bwlp/sat/api/model/VirtualMachineImagePriority.java +src/main/java/org/openslx/bwlp/sat/api/model/VirtualMachineImageShortDescription.java +src/main/java/org/openslx/bwlp/sat/api/model/VirtualMachineImageUuid.java +src/main/java/org/openslx/bwlp/sat/api/model/VirtualMachineImageVirtualMachine.java +src/main/java/org/openslx/bwlp/sat/api/model/VirtualMachineImageVirtualizerName.java +src/main/java/org/openslx/bwlp/sat/api/model/VirtualMachineImages.java +src/main/resources/application.properties +src/main/resources/openapi.yaml diff --git a/dozentenmodulserver/api/.openapi-generator/VERSION b/dozentenmodulserver/api/.openapi-generator/VERSION new file mode 100644 index 00000000..7d3cdbf0 --- /dev/null +++ b/dozentenmodulserver/api/.openapi-generator/VERSION @@ -0,0 +1 @@ +5.3.1 \ No newline at end of file diff --git a/dozentenmodulserver/api/.openapi-generator/bwlp-server-openapi.yaml-default.sha256 b/dozentenmodulserver/api/.openapi-generator/bwlp-server-openapi.yaml-default.sha256 new file mode 100644 index 00000000..3044b519 --- /dev/null +++ b/dozentenmodulserver/api/.openapi-generator/bwlp-server-openapi.yaml-default.sha256 @@ -0,0 +1 @@ +4fc8fbe3d1d5b419b9e6b3bf2e49544e4dad307356e3f4869c77ea95184a5f7a \ No newline at end of file diff --git a/dozentenmodulserver/api/README.md b/dozentenmodulserver/api/README.md new file mode 100644 index 00000000..00c138a5 --- /dev/null +++ b/dozentenmodulserver/api/README.md @@ -0,0 +1,18 @@ +# OpenAPI generated server + +Spring Boot Server + + +## Overview +This server was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. +By using the [OpenAPI-Spec](https://openapis.org), you can easily generate a server stub. +This is an example of building a OpenAPI-enabled server in Java using the SpringBoot framework. + +The underlying library integrating OpenAPI to SpringBoot is [springfox](https://github.com/springfox/springfox) + +Start your server as a simple java application + +You can view the api documentation in swagger-ui by pointing to +http://localhost:9080/ + +Change default port value in application.properties \ No newline at end of file diff --git a/dozentenmodulserver/api/pom.xml b/dozentenmodulserver/api/pom.xml new file mode 100644 index 00000000..c8c40764 --- /dev/null +++ b/dozentenmodulserver/api/pom.xml @@ -0,0 +1,78 @@ + + 4.0.0 + org.openslx.bwlp.sat.api + dozmod-server-api + jar + dozmod-server-api + 1.0.0 + + 1.8 + ${java.version} + ${java.version} + 2.9.2 + + + org.springframework.boot + spring-boot-starter-parent + 2.3.3.RELEASE + + + src/main/java + + + org.springframework.boot + spring-boot-maven-plugin + + + + repackage + + + + + + + + + org.springframework.boot + spring-boot-starter-web + + + org.springframework.data + spring-data-commons + + + + io.springfox + springfox-swagger2 + ${springfox-version} + + + io.springfox + springfox-swagger-ui + ${springfox-version} + + + jakarta.xml.bind + jakarta.xml.bind-api + + + com.fasterxml.jackson.datatype + jackson-datatype-jsr310 + + + org.openapitools + jackson-databind-nullable + 0.2.1 + + + + jakarta.validation + jakarta.validation-api + + + com.fasterxml.jackson.core + jackson-databind + + + diff --git a/dozentenmodulserver/api/src/main/java/org/openapitools/configuration/HomeController.java b/dozentenmodulserver/api/src/main/java/org/openapitools/configuration/HomeController.java new file mode 100644 index 00000000..25727830 --- /dev/null +++ b/dozentenmodulserver/api/src/main/java/org/openapitools/configuration/HomeController.java @@ -0,0 +1,19 @@ +package org.openapitools.configuration; + +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.RequestMapping; + + +/** + * Home redirection to OpenAPI api documentation + */ +@Controller +public class HomeController { + + @RequestMapping("/") + public String index() { + return "redirect:swagger-ui.html"; + } + + +} diff --git a/dozentenmodulserver/api/src/main/java/org/openslx/bwlp/sat/api/handler/ApiUtil.java b/dozentenmodulserver/api/src/main/java/org/openslx/bwlp/sat/api/handler/ApiUtil.java new file mode 100644 index 00000000..c72e5fe8 --- /dev/null +++ b/dozentenmodulserver/api/src/main/java/org/openslx/bwlp/sat/api/handler/ApiUtil.java @@ -0,0 +1,19 @@ +package org.openslx.bwlp.sat.api.handler; + +import org.springframework.web.context.request.NativeWebRequest; + +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; + +public class ApiUtil { + public static void setExampleResponse(NativeWebRequest req, String contentType, String example) { + try { + HttpServletResponse res = req.getNativeResponse(HttpServletResponse.class); + res.setCharacterEncoding("UTF-8"); + res.addHeader("Content-Type", contentType); + res.getWriter().print(example); + } catch (IOException e) { + throw new RuntimeException(e); + } + } +} diff --git a/dozentenmodulserver/api/src/main/java/org/openslx/bwlp/sat/api/handler/BwlpApi.java b/dozentenmodulserver/api/src/main/java/org/openslx/bwlp/sat/api/handler/BwlpApi.java new file mode 100644 index 00000000..cdc2bfd7 --- /dev/null +++ b/dozentenmodulserver/api/src/main/java/org/openslx/bwlp/sat/api/handler/BwlpApi.java @@ -0,0 +1,54 @@ +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.1). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +package org.openslx.bwlp.sat.api.handler; + +import io.swagger.annotations.*; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.context.request.NativeWebRequest; +import org.springframework.web.multipart.MultipartFile; + +import javax.validation.Valid; +import javax.validation.constraints.*; +import java.util.List; +import java.util.Map; +import java.util.Optional; +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2021-12-23T15:12:42.264617368+01:00[Europe/Berlin]") +@Validated +@Api(value = "bwlp", description = "the bwlp API") +public interface BwlpApi { + + default Optional getRequest() { + return Optional.empty(); + } + + /** + * GET /bwlp/container/clusterimages : List all bwLehrpool container images + * + * @return Successful operation (status code 200) + * or Failed to retrieve container images (status code 500) + */ + + @ApiOperation(value = "List all bwLehrpool container images", nickname = "bwlpGetClusterImagesList", notes = "", tags={ "container", }) + @ApiResponses(value = { + + @ApiResponse(code = 200, message = "Successful operation"), + + @ApiResponse(code = 500, message = "Failed to retrieve container images") }) + @RequestMapping( + method = RequestMethod.GET, + value = "/bwlp/container/clusterimages", + produces = { "application/json" } + ) + default ResponseEntity bwlpGetClusterImagesList() { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + +} diff --git a/dozentenmodulserver/api/src/main/java/org/openslx/bwlp/sat/api/handler/BwlpApiController.java b/dozentenmodulserver/api/src/main/java/org/openslx/bwlp/sat/api/handler/BwlpApiController.java new file mode 100644 index 00000000..2450618b --- /dev/null +++ b/dozentenmodulserver/api/src/main/java/org/openslx/bwlp/sat/api/handler/BwlpApiController.java @@ -0,0 +1,24 @@ +package org.openslx.bwlp.sat.api.handler; + +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.context.request.NativeWebRequest; +import java.util.Optional; +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2021-12-23T15:12:42.264617368+01:00[Europe/Berlin]") +@Controller +@RequestMapping("${openapi.bwLehrpoolServer.base-path:}") +public class BwlpApiController implements BwlpApi { + + private final NativeWebRequest request; + + @org.springframework.beans.factory.annotation.Autowired + public BwlpApiController(NativeWebRequest request) { + this.request = request; + } + + @Override + public Optional getRequest() { + return Optional.ofNullable(request); + } + +} diff --git a/dozentenmodulserver/api/src/main/java/org/openslx/bwlp/sat/api/handler/DoApi.java b/dozentenmodulserver/api/src/main/java/org/openslx/bwlp/sat/api/handler/DoApi.java new file mode 100644 index 00000000..19e7f5eb --- /dev/null +++ b/dozentenmodulserver/api/src/main/java/org/openslx/bwlp/sat/api/handler/DoApi.java @@ -0,0 +1,217 @@ +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.1). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +package org.openslx.bwlp.sat.api.handler; + +import java.util.UUID; +import io.swagger.annotations.*; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.context.request.NativeWebRequest; +import org.springframework.web.multipart.MultipartFile; + +import javax.validation.Valid; +import javax.validation.constraints.*; +import java.util.List; +import java.util.Map; +import java.util.Optional; +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2021-12-23T15:12:42.264617368+01:00[Europe/Berlin]") +@Validated +@Api(value = "do", description = "the do API") +public interface DoApi { + + default Optional getRequest() { + return Optional.empty(); + } + + /** + * POST /do/delete-images : Delete old images on the bwLehrpool-Server + * + * @return Successful operation (status code 200) + * or Failed to delete old images (status code 500) + */ + + @ApiOperation(value = "Delete old images on the bwLehrpool-Server", nickname = "doDeleteOldImagesOnFileserver", notes = "", tags={ "server", }) + @ApiResponses(value = { + + @ApiResponse(code = 200, message = "Successful operation"), + + @ApiResponse(code = 500, message = "Failed to delete old images") }) + @RequestMapping( + method = RequestMethod.POST, + value = "/do/delete-images", + produces = { "text/plain" } + ) + default ResponseEntity doDeleteOldImagesOnFileserver() { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * POST /do/mailtest : Send a test mail from the bwLehrpool-Server + * + * @param host Domain of SMTP mail server (required) + * @param port Port of SMTP mail server (required) + * @param ssl Encryption mode for the SMTP mail server (required) + * @param serverName Name of the SMTP mail server (required) + * @param username Username for the SMTP mail server (required) + * @param password Password for the SMTP mail server (required) + * @param senderAddress Sender address for the test mail (required) + * @param recipient Recipient for the test mail (required) + * @param replyTo Reply-To address for the test mail (required) + * @return Successful operation (status code 200) + * or Failed to send test mail (status code 400) + */ + + @ApiOperation(value = "Send a test mail from the bwLehrpool-Server", nickname = "doMailtestOnFileserver", notes = "", tags={ "server", }) + @ApiResponses(value = { + + @ApiResponse(code = 200, message = "Successful operation"), + + @ApiResponse(code = 400, message = "Failed to send test mail") }) + @RequestMapping( + method = RequestMethod.POST, + value = "/do/mailtest", + produces = { "text/plain" } + ) + default ResponseEntity doMailtestOnFileserver(@NotNull @ApiParam(value = "Domain of SMTP mail server", required = true) @Valid @RequestParam(value = "host", required = true) String host + +,@NotNull @ApiParam(value = "Port of SMTP mail server", required = true) @Valid @RequestParam(value = "port", required = true) Integer port + +,@NotNull @ApiParam(value = "Encryption mode for the SMTP mail server", required = true, allowableValues = "NONE, IMPLICIT, EXPLICIT") @Valid @RequestParam(value = "ssl", required = true) String ssl + +,@NotNull @ApiParam(value = "Name of the SMTP mail server", required = true) @Valid @RequestParam(value = "serverName", required = true) String serverName + +,@NotNull @ApiParam(value = "Username for the SMTP mail server", required = true) @Valid @RequestParam(value = "username", required = true) String username + +,@NotNull @ApiParam(value = "Password for the SMTP mail server", required = true) @Valid @RequestParam(value = "password", required = true) String password + +,@NotNull @ApiParam(value = "Sender address for the test mail", required = true) @Valid @RequestParam(value = "senderAddress", required = true) String senderAddress + +,@NotNull @ApiParam(value = "Recipient for the test mail", required = true) @Valid @RequestParam(value = "recipient", required = true) String recipient + +,@NotNull @ApiParam(value = "Reply-To address for the test mail", required = true) @Valid @RequestParam(value = "replyTo", required = true) String replyTo + +) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * POST /do/query-image-check : Query image check on the bwLehrpool-Server + * + * @param versionid Query image check for specified image version (optional) + * @return Successful operation (status code 200) + * or Failed to query image check (status code 500) + */ + + @ApiOperation(value = "Query image check on the bwLehrpool-Server", nickname = "doQueryImageCheckOnFileserver", notes = "", tags={ "server", }) + @ApiResponses(value = { + + @ApiResponse(code = 200, message = "Successful operation"), + + @ApiResponse(code = 500, message = "Failed to query image check") }) + @RequestMapping( + method = RequestMethod.POST, + value = "/do/query-image-check", + produces = { "application/json" } + ) + default ResponseEntity doQueryImageCheckOnFileserver(@ApiParam(value = "Query image check for specified image version") @Valid @RequestParam(value = "versionid", required = false) UUID versionid + +) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * POST /do/reset-mail-templates : Rest mail templates on the bwLehrpool-Server + * + * @return Successful operation (status code 200) + * or Failed to reset mail templates (status code 500) + */ + + @ApiOperation(value = "Rest mail templates on the bwLehrpool-Server", nickname = "doResetMailTemplatesOnFileserver", notes = "", tags={ "server", }) + @ApiResponses(value = { + + @ApiResponse(code = 200, message = "Successful operation"), + + @ApiResponse(code = 500, message = "Failed to reset mail templates") }) + @RequestMapping( + method = RequestMethod.POST, + value = "/do/reset-mail-templates", + produces = { "text/plain" } + ) + default ResponseEntity doResetMailTemplatesOnFileserver() { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * POST /do/scan-orphaned-files : Scan orphaned files on the bwLehrpool-Server + * + * @param action Action for orphaned files (optional) + * @return Successful operation (status code 200) + * or Failed to scan orphaned files (status code 500) + */ + + @ApiOperation(value = "Scan orphaned files on the bwLehrpool-Server", nickname = "doScanOrphanedFilesOnFileserver", notes = "", tags={ "server", }) + @ApiResponses(value = { + + @ApiResponse(code = 200, message = "Successful operation"), + + @ApiResponse(code = 500, message = "Failed to scan orphaned files") }) + @RequestMapping( + method = RequestMethod.POST, + value = "/do/scan-orphaned-files", + produces = { "application/json" } + ) + default ResponseEntity doScanOrphanedFilesOnFileserver(@ApiParam(value = "Action for orphaned files", allowableValues = "delete") @Valid @RequestParam(value = "action", required = false) String action + +) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * POST /do/start-image-check : Start image check on the bwLehrpool-Server + * + * @param versionid Image version for the image check (required) + * @param hash Check hashes of images (required) + * @param update Update state of images (required) + * @return Successful operation (status code 200) + * or Failed to start image check (status code 500) + */ + + @ApiOperation(value = "Start image check on the bwLehrpool-Server", nickname = "doStartImageCheckOnFileserver", notes = "", tags={ "server", }) + @ApiResponses(value = { + + @ApiResponse(code = 200, message = "Successful operation"), + + @ApiResponse(code = 500, message = "Failed to start image check") }) + @RequestMapping( + method = RequestMethod.POST, + value = "/do/start-image-check", + produces = { "text/plain" } + ) + default ResponseEntity doStartImageCheckOnFileserver(@NotNull @ApiParam(value = "Image version for the image check", required = true) @Valid @RequestParam(value = "versionid", required = true) UUID versionid + +,@NotNull @ApiParam(value = "Check hashes of images", required = true) @Valid @RequestParam(value = "hash", required = true) Boolean hash + +,@NotNull @ApiParam(value = "Update state of images", required = true) @Valid @RequestParam(value = "update", required = true) Boolean update + +) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + +} diff --git a/dozentenmodulserver/api/src/main/java/org/openslx/bwlp/sat/api/handler/DoApiController.java b/dozentenmodulserver/api/src/main/java/org/openslx/bwlp/sat/api/handler/DoApiController.java new file mode 100644 index 00000000..b34f8d5b --- /dev/null +++ b/dozentenmodulserver/api/src/main/java/org/openslx/bwlp/sat/api/handler/DoApiController.java @@ -0,0 +1,24 @@ +package org.openslx.bwlp.sat.api.handler; + +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.context.request.NativeWebRequest; +import java.util.Optional; +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2021-12-23T15:12:42.264617368+01:00[Europe/Berlin]") +@Controller +@RequestMapping("${openapi.bwLehrpoolServer.base-path:}") +public class DoApiController implements DoApi { + + private final NativeWebRequest request; + + @org.springframework.beans.factory.annotation.Autowired + public DoApiController(NativeWebRequest request) { + this.request = request; + } + + @Override + public Optional getRequest() { + return Optional.ofNullable(request); + } + +} diff --git a/dozentenmodulserver/api/src/main/java/org/openslx/bwlp/sat/api/handler/ImageApi.java b/dozentenmodulserver/api/src/main/java/org/openslx/bwlp/sat/api/handler/ImageApi.java new file mode 100644 index 00000000..b73b6e0f --- /dev/null +++ b/dozentenmodulserver/api/src/main/java/org/openslx/bwlp/sat/api/handler/ImageApi.java @@ -0,0 +1,58 @@ +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.1). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +package org.openslx.bwlp.sat.api.handler; + +import java.util.UUID; +import io.swagger.annotations.*; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.context.request.NativeWebRequest; +import org.springframework.web.multipart.MultipartFile; + +import javax.validation.Valid; +import javax.validation.constraints.*; +import java.util.List; +import java.util.Map; +import java.util.Optional; +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2021-12-23T15:12:42.264617368+01:00[Europe/Berlin]") +@Validated +@Api(value = "image", description = "the image API") +public interface ImageApi { + + default Optional getRequest() { + return Optional.empty(); + } + + /** + * GET /image/container/{uuid}/metadata : Get metadata for specified container image + * + * @param uuid UUID of the container (required) + * @return Successful operation (status code 200) + * or Failed to retrieve container metadata (status code 500) + */ + + @ApiOperation(value = "Get metadata for specified container image", nickname = "getContainerImageMetadata", notes = "", tags={ "container", }) + @ApiResponses(value = { + + @ApiResponse(code = 200, message = "Successful operation"), + + @ApiResponse(code = 500, message = "Failed to retrieve container metadata") }) + @RequestMapping( + method = RequestMethod.GET, + value = "/image/container/{uuid}/metadata", + produces = { "application/json" } + ) + default ResponseEntity getContainerImageMetadata(@ApiParam(value = "UUID of the container", required = true) @PathVariable("uuid") UUID uuid + +) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + +} diff --git a/dozentenmodulserver/api/src/main/java/org/openslx/bwlp/sat/api/handler/ImageApiController.java b/dozentenmodulserver/api/src/main/java/org/openslx/bwlp/sat/api/handler/ImageApiController.java new file mode 100644 index 00000000..55337159 --- /dev/null +++ b/dozentenmodulserver/api/src/main/java/org/openslx/bwlp/sat/api/handler/ImageApiController.java @@ -0,0 +1,24 @@ +package org.openslx.bwlp.sat.api.handler; + +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.context.request.NativeWebRequest; +import java.util.Optional; +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2021-12-23T15:12:42.264617368+01:00[Europe/Berlin]") +@Controller +@RequestMapping("${openapi.bwLehrpoolServer.base-path:}") +public class ImageApiController implements ImageApi { + + private final NativeWebRequest request; + + @org.springframework.beans.factory.annotation.Autowired + public ImageApiController(NativeWebRequest request) { + this.request = request; + } + + @Override + public Optional getRequest() { + return Optional.ofNullable(request); + } + +} diff --git a/dozentenmodulserver/api/src/main/java/org/openslx/bwlp/sat/api/handler/OpenAPI2SpringBoot.java b/dozentenmodulserver/api/src/main/java/org/openslx/bwlp/sat/api/handler/OpenAPI2SpringBoot.java new file mode 100644 index 00000000..258ef11a --- /dev/null +++ b/dozentenmodulserver/api/src/main/java/org/openslx/bwlp/sat/api/handler/OpenAPI2SpringBoot.java @@ -0,0 +1,57 @@ +package org.openslx.bwlp.sat.api.handler; + +import com.fasterxml.jackson.databind.Module; +import org.openapitools.jackson.nullable.JsonNullableModule; +import org.springframework.boot.CommandLineRunner; +import org.springframework.boot.ExitCodeGenerator; +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.ComponentScan; +import org.springframework.web.servlet.config.annotation.CorsRegistry; +import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; + +@SpringBootApplication +@ComponentScan(basePackages = {"org.openslx.bwlp.sat.api.handler", "org.openslx.bwlp.sat.api.handler" , "org.openapitools.configuration"}) +public class OpenAPI2SpringBoot implements CommandLineRunner { + + @Override + public void run(String... arg0) throws Exception { + if (arg0.length > 0 && arg0[0].equals("exitcode")) { + throw new ExitException(); + } + } + + public static void main(String[] args) throws Exception { + new SpringApplication(OpenAPI2SpringBoot.class).run(args); + } + + static class ExitException extends RuntimeException implements ExitCodeGenerator { + private static final long serialVersionUID = 1L; + + @Override + public int getExitCode() { + return 10; + } + + } + + @Bean + public WebMvcConfigurer webConfigurer() { + return new WebMvcConfigurer() { + /*@Override + public void addCorsMappings(CorsRegistry registry) { + registry.addMapping("/**") + .allowedOrigins("*") + .allowedMethods("*") + .allowedHeaders("Content-Type"); + }*/ + }; + } + + @Bean + public Module jsonNullableModule() { + return new JsonNullableModule(); + } + +} diff --git a/dozentenmodulserver/api/src/main/java/org/openslx/bwlp/sat/api/handler/RFC3339DateFormat.java b/dozentenmodulserver/api/src/main/java/org/openslx/bwlp/sat/api/handler/RFC3339DateFormat.java new file mode 100644 index 00000000..cf996787 --- /dev/null +++ b/dozentenmodulserver/api/src/main/java/org/openslx/bwlp/sat/api/handler/RFC3339DateFormat.java @@ -0,0 +1,38 @@ +package org.openslx.bwlp.sat.api.handler; + +import com.fasterxml.jackson.databind.util.StdDateFormat; + +import java.text.DateFormat; +import java.text.FieldPosition; +import java.text.ParsePosition; +import java.util.Date; +import java.util.GregorianCalendar; +import java.util.TimeZone; + +public class RFC3339DateFormat extends DateFormat { + private static final long serialVersionUID = 1L; + private static final TimeZone TIMEZONE_Z = TimeZone.getTimeZone("UTC"); + + private final StdDateFormat fmt = new StdDateFormat() + .withTimeZone(TIMEZONE_Z) + .withColonInTimeZone(true); + + public RFC3339DateFormat() { + this.calendar = new GregorianCalendar(); + } + + @Override + public Date parse(String source, ParsePosition pos) { + return fmt.parse(source, pos); + } + + @Override + public StringBuffer format(Date date, StringBuffer toAppendTo, FieldPosition fieldPosition) { + return fmt.format(date, toAppendTo, fieldPosition); + } + + @Override + public Object clone() { + return this; + } +} \ No newline at end of file diff --git a/dozentenmodulserver/api/src/main/java/org/openslx/bwlp/sat/api/handler/StatusApi.java b/dozentenmodulserver/api/src/main/java/org/openslx/bwlp/sat/api/handler/StatusApi.java new file mode 100644 index 00000000..141058c2 --- /dev/null +++ b/dozentenmodulserver/api/src/main/java/org/openslx/bwlp/sat/api/handler/StatusApi.java @@ -0,0 +1,61 @@ +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.1). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +package org.openslx.bwlp.sat.api.handler; + +import org.openslx.bwlp.sat.api.model.StatusFileserver; +import io.swagger.annotations.*; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.context.request.NativeWebRequest; +import org.springframework.web.multipart.MultipartFile; + +import javax.validation.Valid; +import javax.validation.constraints.*; +import java.util.List; +import java.util.Map; +import java.util.Optional; +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2021-12-23T15:12:42.264617368+01:00[Europe/Berlin]") +@Validated +@Api(value = "status", description = "the status API") +public interface StatusApi { + + default Optional getRequest() { + return Optional.empty(); + } + + /** + * GET /status/fileserver : Get bwLehrpool-Server status + * + * @return Successful operation (status code 200) + */ + + @ApiOperation(value = "Get bwLehrpool-Server status", nickname = "getFileserverStatus", notes = "", response = StatusFileserver.class, tags={ "server", }) + @ApiResponses(value = { + + @ApiResponse(code = 200, message = "Successful operation", response = StatusFileserver.class) }) + @RequestMapping( + method = RequestMethod.GET, + value = "/status/fileserver", + produces = { "application/json" } + ) + default ResponseEntity getFileserverStatus() { + getRequest().ifPresent(request -> { + for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + String exampleString = "{ \"activeUploads\" : 0, \"activeDownloads\" : 6 }"; + ApiUtil.setExampleResponse(request, "application/json", exampleString); + break; + } + } + }); + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + +} diff --git a/dozentenmodulserver/api/src/main/java/org/openslx/bwlp/sat/api/handler/StatusApiController.java b/dozentenmodulserver/api/src/main/java/org/openslx/bwlp/sat/api/handler/StatusApiController.java new file mode 100644 index 00000000..3b486073 --- /dev/null +++ b/dozentenmodulserver/api/src/main/java/org/openslx/bwlp/sat/api/handler/StatusApiController.java @@ -0,0 +1,24 @@ +package org.openslx.bwlp.sat.api.handler; + +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.context.request.NativeWebRequest; +import java.util.Optional; +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2021-12-23T15:12:42.264617368+01:00[Europe/Berlin]") +@Controller +@RequestMapping("${openapi.bwLehrpoolServer.base-path:}") +public class StatusApiController implements StatusApi { + + private final NativeWebRequest request; + + @org.springframework.beans.factory.annotation.Autowired + public StatusApiController(NativeWebRequest request) { + this.request = request; + } + + @Override + public Optional getRequest() { + return Optional.ofNullable(request); + } + +} diff --git a/dozentenmodulserver/api/src/main/java/org/openslx/bwlp/sat/api/handler/VmchooserApi.java b/dozentenmodulserver/api/src/main/java/org/openslx/bwlp/sat/api/handler/VmchooserApi.java new file mode 100644 index 00000000..cf35d745 --- /dev/null +++ b/dozentenmodulserver/api/src/main/java/org/openslx/bwlp/sat/api/handler/VmchooserApi.java @@ -0,0 +1,152 @@ +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.1). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +package org.openslx.bwlp.sat.api.handler; + +import java.util.UUID; +import org.openslx.bwlp.sat.api.model.VirtualMachineImages; +import io.swagger.annotations.*; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.context.request.NativeWebRequest; +import org.springframework.web.multipart.MultipartFile; + +import javax.validation.Valid; +import javax.validation.constraints.*; +import java.util.List; +import java.util.Map; +import java.util.Optional; +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2021-12-23T15:12:42.264617368+01:00[Europe/Berlin]") +@Validated +@Api(value = "vmchooser", description = "the vmchooser API") +public interface VmchooserApi { + + default Optional getRequest() { + return Optional.empty(); + } + + /** + * GET /vmchooser/lecture/{uuid}/imagemeta : Get metadata of virtual mchine image for specified lecture + * + * @param uuid UUID of the lecture (required) + * @return Successful operation (status code 200) + * or Faild to retrieve metadata (status code 500) + */ + + @ApiOperation(value = "Get metadata of virtual mchine image for specified lecture", nickname = "vmchooserGetLectureImageMeta", notes = "", tags={ "vmchooser", }) + @ApiResponses(value = { + + @ApiResponse(code = 200, message = "Successful operation"), + + @ApiResponse(code = 500, message = "Faild to retrieve metadata") }) + @RequestMapping( + method = RequestMethod.GET, + value = "/vmchooser/lecture/{uuid}/imagemeta", + produces = { "application/json" } + ) + default ResponseEntity vmchooserGetLectureImageMeta(@ApiParam(value = "UUID of the lecture", required = true) @PathVariable("uuid") UUID uuid + +) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * GET /vmchooser/lecture/{uuid}/metadata : Get metadata for specified lecture + * + * @param uuid UUID of the lecture (required) + * @return Successful operation (status code 200) + * or Faild to retrieve metadata (status code 500) + */ + + @ApiOperation(value = "Get metadata for specified lecture", nickname = "vmchooserGetLectureMetadata", notes = "", tags={ "vmchooser", }) + @ApiResponses(value = { + + @ApiResponse(code = 200, message = "Successful operation"), + + @ApiResponse(code = 500, message = "Faild to retrieve metadata") }) + @RequestMapping( + method = RequestMethod.GET, + value = "/vmchooser/lecture/{uuid}/metadata", + produces = { "application/gzip" } + ) + default ResponseEntity vmchooserGetLectureMetadata(@ApiParam(value = "UUID of the lecture", required = true) @PathVariable("uuid") UUID uuid + +) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * GET /vmchooser/lecture/{uuid}/netrules : Get network rules for specified lecture + * + * @param uuid UUID of the lecture (required) + * @return Successful operation (status code 200) + * or Faild to retrieve network rules (status code 500) + */ + + @ApiOperation(value = "Get network rules for specified lecture", nickname = "vmchooserGetLectureNetRules", notes = "", tags={ "vmchooser", }) + @ApiResponses(value = { + + @ApiResponse(code = 200, message = "Successful operation"), + + @ApiResponse(code = 500, message = "Faild to retrieve network rules") }) + @RequestMapping( + method = RequestMethod.GET, + value = "/vmchooser/lecture/{uuid}/netrules", + produces = { "text/plain" } + ) + default ResponseEntity vmchooserGetLectureNetRules(@ApiParam(value = "UUID of the lecture", required = true) @PathVariable("uuid") UUID uuid + +) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * GET /vmchooser/list : List all bwLehrpool virtual machine images + * + * @param locations IDs of locations that need to be considered for the filter (optional) + * @param exams Include exam events for the filter (optional, default to false) + * @return Successful operation (status code 200) + * or Failed to retrieve list (status code 500) + */ + + @ApiOperation(value = "List all bwLehrpool virtual machine images", nickname = "vmchooserGetList", notes = "", response = VirtualMachineImages.class, tags={ "vmchooser", }) + @ApiResponses(value = { + + @ApiResponse(code = 200, message = "Successful operation", response = VirtualMachineImages.class), + + @ApiResponse(code = 500, message = "Failed to retrieve list") }) + @RequestMapping( + method = RequestMethod.GET, + value = "/vmchooser/list", + produces = { "application/xml" } + ) + default ResponseEntity vmchooserGetList(@ApiParam(value = "IDs of locations that need to be considered for the filter") @Valid @RequestParam(value = "locations", required = false) List locations + +,@ApiParam(value = "Include exam events for the filter", defaultValue = "false") @Valid @RequestParam(value = "exams", required = false, defaultValue = "false") Boolean exams + +) { + getRequest().ifPresent(request -> { + for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { + if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) { + String exampleString = " "; + ApiUtil.setExampleResponse(request, "application/xml", exampleString); + break; + } + } + }); + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + +} diff --git a/dozentenmodulserver/api/src/main/java/org/openslx/bwlp/sat/api/handler/VmchooserApiController.java b/dozentenmodulserver/api/src/main/java/org/openslx/bwlp/sat/api/handler/VmchooserApiController.java new file mode 100644 index 00000000..1a717861 --- /dev/null +++ b/dozentenmodulserver/api/src/main/java/org/openslx/bwlp/sat/api/handler/VmchooserApiController.java @@ -0,0 +1,24 @@ +package org.openslx.bwlp.sat.api.handler; + +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.context.request.NativeWebRequest; +import java.util.Optional; +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2021-12-23T15:12:42.264617368+01:00[Europe/Berlin]") +@Controller +@RequestMapping("${openapi.bwLehrpoolServer.base-path:}") +public class VmchooserApiController implements VmchooserApi { + + private final NativeWebRequest request; + + @org.springframework.beans.factory.annotation.Autowired + public VmchooserApiController(NativeWebRequest request) { + this.request = request; + } + + @Override + public Optional getRequest() { + return Optional.ofNullable(request); + } + +} diff --git a/dozentenmodulserver/api/src/main/java/org/openslx/bwlp/sat/api/model/StatusFileserver.java b/dozentenmodulserver/api/src/main/java/org/openslx/bwlp/sat/api/model/StatusFileserver.java new file mode 100644 index 00000000..7a95dd74 --- /dev/null +++ b/dozentenmodulserver/api/src/main/java/org/openslx/bwlp/sat/api/model/StatusFileserver.java @@ -0,0 +1,109 @@ +package org.openslx.bwlp.sat.api.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; + + +import java.util.*; + +/** + * StatusFileserver + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2021-12-23T15:12:42.264617368+01:00[Europe/Berlin]") +public class StatusFileserver { + @JsonProperty("activeUploads") + private Integer activeUploads; + + @JsonProperty("activeDownloads") + private Integer activeDownloads; + + public StatusFileserver activeUploads(Integer activeUploads) { + this.activeUploads = activeUploads; + return this; + } + + /** + * Get activeUploads + * @return activeUploads + */ + @ApiModelProperty(value = "") + + + public Integer getActiveUploads() { + return activeUploads; + } + + public void setActiveUploads(Integer activeUploads) { + this.activeUploads = activeUploads; + } + + public StatusFileserver activeDownloads(Integer activeDownloads) { + this.activeDownloads = activeDownloads; + return this; + } + + /** + * Get activeDownloads + * @return activeDownloads + */ + @ApiModelProperty(value = "") + + + public Integer getActiveDownloads() { + return activeDownloads; + } + + public void setActiveDownloads(Integer activeDownloads) { + this.activeDownloads = activeDownloads; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + StatusFileserver statusFileserver = (StatusFileserver) o; + return Objects.equals(this.activeUploads, statusFileserver.activeUploads) && + Objects.equals(this.activeDownloads, statusFileserver.activeDownloads); + } + + @Override + public int hashCode() { + return Objects.hash(activeUploads, activeDownloads); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class StatusFileserver {\n"); + + sb.append(" activeUploads: ").append(toIndentedString(activeUploads)).append("\n"); + sb.append(" activeDownloads: ").append(toIndentedString(activeDownloads)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/dozentenmodulserver/api/src/main/java/org/openslx/bwlp/sat/api/model/VirtualMachineImage.java b/dozentenmodulserver/api/src/main/java/org/openslx/bwlp/sat/api/model/VirtualMachineImage.java new file mode 100644 index 00000000..56a5d2be --- /dev/null +++ b/dozentenmodulserver/api/src/main/java/org/openslx/bwlp/sat/api/model/VirtualMachineImage.java @@ -0,0 +1,408 @@ +package org.openslx.bwlp.sat.api.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.openslx.bwlp.sat.api.model.VirtualMachineImageCreator; +import org.openslx.bwlp.sat.api.model.VirtualMachineImageForLocation; +import org.openslx.bwlp.sat.api.model.VirtualMachineImageIsTemplate; +import org.openslx.bwlp.sat.api.model.VirtualMachineImageLongDescription; +import org.openslx.bwlp.sat.api.model.VirtualMachineImageName; +import org.openslx.bwlp.sat.api.model.VirtualMachineImageOsName; +import org.openslx.bwlp.sat.api.model.VirtualMachineImagePriority; +import org.openslx.bwlp.sat.api.model.VirtualMachineImageShortDescription; +import org.openslx.bwlp.sat.api.model.VirtualMachineImageUuid; +import org.openslx.bwlp.sat.api.model.VirtualMachineImageVirtualMachine; +import org.openslx.bwlp.sat.api.model.VirtualMachineImageVirtualizerName; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; + + +import java.util.*; + +/** + * VirtualMachineImage + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2021-12-23T15:12:42.264617368+01:00[Europe/Berlin]") +public class VirtualMachineImage { + @JsonProperty("name") + private VirtualMachineImageName name; + + @JsonProperty("priority") + private VirtualMachineImagePriority priority; + + @JsonProperty("creator") + private VirtualMachineImageCreator creator; + + @JsonProperty("shortDescription") + private VirtualMachineImageShortDescription shortDescription; + + @JsonProperty("longDescription") + private VirtualMachineImageLongDescription longDescription; + + @JsonProperty("uuid") + private VirtualMachineImageUuid uuid; + + @JsonProperty("virtualMachine") + private VirtualMachineImageVirtualMachine virtualMachine; + + @JsonProperty("os") + private VirtualMachineImageCreator os; + + @JsonProperty("icon") + private VirtualMachineImageCreator icon; + + @JsonProperty("virtualizerName") + private VirtualMachineImageVirtualizerName virtualizerName; + + @JsonProperty("osName") + private VirtualMachineImageOsName osName; + + @JsonProperty("forLocation") + private VirtualMachineImageForLocation forLocation; + + @JsonProperty("isTemplate") + private VirtualMachineImageIsTemplate isTemplate; + + public VirtualMachineImage name(VirtualMachineImageName name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @ApiModelProperty(value = "") + + @Valid + + public VirtualMachineImageName getName() { + return name; + } + + public void setName(VirtualMachineImageName name) { + this.name = name; + } + + public VirtualMachineImage priority(VirtualMachineImagePriority priority) { + this.priority = priority; + return this; + } + + /** + * Get priority + * @return priority + */ + @ApiModelProperty(value = "") + + @Valid + + public VirtualMachineImagePriority getPriority() { + return priority; + } + + public void setPriority(VirtualMachineImagePriority priority) { + this.priority = priority; + } + + public VirtualMachineImage creator(VirtualMachineImageCreator creator) { + this.creator = creator; + return this; + } + + /** + * Get creator + * @return creator + */ + @ApiModelProperty(value = "") + + @Valid + + public VirtualMachineImageCreator getCreator() { + return creator; + } + + public void setCreator(VirtualMachineImageCreator creator) { + this.creator = creator; + } + + public VirtualMachineImage shortDescription(VirtualMachineImageShortDescription shortDescription) { + this.shortDescription = shortDescription; + return this; + } + + /** + * Get shortDescription + * @return shortDescription + */ + @ApiModelProperty(value = "") + + @Valid + + public VirtualMachineImageShortDescription getShortDescription() { + return shortDescription; + } + + public void setShortDescription(VirtualMachineImageShortDescription shortDescription) { + this.shortDescription = shortDescription; + } + + public VirtualMachineImage longDescription(VirtualMachineImageLongDescription longDescription) { + this.longDescription = longDescription; + return this; + } + + /** + * Get longDescription + * @return longDescription + */ + @ApiModelProperty(value = "") + + @Valid + + public VirtualMachineImageLongDescription getLongDescription() { + return longDescription; + } + + public void setLongDescription(VirtualMachineImageLongDescription longDescription) { + this.longDescription = longDescription; + } + + public VirtualMachineImage uuid(VirtualMachineImageUuid uuid) { + this.uuid = uuid; + return this; + } + + /** + * Get uuid + * @return uuid + */ + @ApiModelProperty(value = "") + + @Valid + + public VirtualMachineImageUuid getUuid() { + return uuid; + } + + public void setUuid(VirtualMachineImageUuid uuid) { + this.uuid = uuid; + } + + public VirtualMachineImage virtualMachine(VirtualMachineImageVirtualMachine virtualMachine) { + this.virtualMachine = virtualMachine; + return this; + } + + /** + * Get virtualMachine + * @return virtualMachine + */ + @ApiModelProperty(value = "") + + @Valid + + public VirtualMachineImageVirtualMachine getVirtualMachine() { + return virtualMachine; + } + + public void setVirtualMachine(VirtualMachineImageVirtualMachine virtualMachine) { + this.virtualMachine = virtualMachine; + } + + public VirtualMachineImage os(VirtualMachineImageCreator os) { + this.os = os; + return this; + } + + /** + * Get os + * @return os + */ + @ApiModelProperty(value = "") + + @Valid + + public VirtualMachineImageCreator getOs() { + return os; + } + + public void setOs(VirtualMachineImageCreator os) { + this.os = os; + } + + public VirtualMachineImage icon(VirtualMachineImageCreator icon) { + this.icon = icon; + return this; + } + + /** + * Get icon + * @return icon + */ + @ApiModelProperty(value = "") + + @Valid + + public VirtualMachineImageCreator getIcon() { + return icon; + } + + public void setIcon(VirtualMachineImageCreator icon) { + this.icon = icon; + } + + public VirtualMachineImage virtualizerName(VirtualMachineImageVirtualizerName virtualizerName) { + this.virtualizerName = virtualizerName; + return this; + } + + /** + * Get virtualizerName + * @return virtualizerName + */ + @ApiModelProperty(value = "") + + @Valid + + public VirtualMachineImageVirtualizerName getVirtualizerName() { + return virtualizerName; + } + + public void setVirtualizerName(VirtualMachineImageVirtualizerName virtualizerName) { + this.virtualizerName = virtualizerName; + } + + public VirtualMachineImage osName(VirtualMachineImageOsName osName) { + this.osName = osName; + return this; + } + + /** + * Get osName + * @return osName + */ + @ApiModelProperty(value = "") + + @Valid + + public VirtualMachineImageOsName getOsName() { + return osName; + } + + public void setOsName(VirtualMachineImageOsName osName) { + this.osName = osName; + } + + public VirtualMachineImage forLocation(VirtualMachineImageForLocation forLocation) { + this.forLocation = forLocation; + return this; + } + + /** + * Get forLocation + * @return forLocation + */ + @ApiModelProperty(value = "") + + @Valid + + public VirtualMachineImageForLocation getForLocation() { + return forLocation; + } + + public void setForLocation(VirtualMachineImageForLocation forLocation) { + this.forLocation = forLocation; + } + + public VirtualMachineImage isTemplate(VirtualMachineImageIsTemplate isTemplate) { + this.isTemplate = isTemplate; + return this; + } + + /** + * Get isTemplate + * @return isTemplate + */ + @ApiModelProperty(value = "") + + @Valid + + public VirtualMachineImageIsTemplate getIsTemplate() { + return isTemplate; + } + + public void setIsTemplate(VirtualMachineImageIsTemplate isTemplate) { + this.isTemplate = isTemplate; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + VirtualMachineImage virtualMachineImage = (VirtualMachineImage) o; + return Objects.equals(this.name, virtualMachineImage.name) && + Objects.equals(this.priority, virtualMachineImage.priority) && + Objects.equals(this.creator, virtualMachineImage.creator) && + Objects.equals(this.shortDescription, virtualMachineImage.shortDescription) && + Objects.equals(this.longDescription, virtualMachineImage.longDescription) && + Objects.equals(this.uuid, virtualMachineImage.uuid) && + Objects.equals(this.virtualMachine, virtualMachineImage.virtualMachine) && + Objects.equals(this.os, virtualMachineImage.os) && + Objects.equals(this.icon, virtualMachineImage.icon) && + Objects.equals(this.virtualizerName, virtualMachineImage.virtualizerName) && + Objects.equals(this.osName, virtualMachineImage.osName) && + Objects.equals(this.forLocation, virtualMachineImage.forLocation) && + Objects.equals(this.isTemplate, virtualMachineImage.isTemplate); + } + + @Override + public int hashCode() { + return Objects.hash(name, priority, creator, shortDescription, longDescription, uuid, virtualMachine, os, icon, virtualizerName, osName, forLocation, isTemplate); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class VirtualMachineImage {\n"); + + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" priority: ").append(toIndentedString(priority)).append("\n"); + sb.append(" creator: ").append(toIndentedString(creator)).append("\n"); + sb.append(" shortDescription: ").append(toIndentedString(shortDescription)).append("\n"); + sb.append(" longDescription: ").append(toIndentedString(longDescription)).append("\n"); + sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); + sb.append(" virtualMachine: ").append(toIndentedString(virtualMachine)).append("\n"); + sb.append(" os: ").append(toIndentedString(os)).append("\n"); + sb.append(" icon: ").append(toIndentedString(icon)).append("\n"); + sb.append(" virtualizerName: ").append(toIndentedString(virtualizerName)).append("\n"); + sb.append(" osName: ").append(toIndentedString(osName)).append("\n"); + sb.append(" forLocation: ").append(toIndentedString(forLocation)).append("\n"); + sb.append(" isTemplate: ").append(toIndentedString(isTemplate)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/dozentenmodulserver/api/src/main/java/org/openslx/bwlp/sat/api/model/VirtualMachineImageCreator.java b/dozentenmodulserver/api/src/main/java/org/openslx/bwlp/sat/api/model/VirtualMachineImageCreator.java new file mode 100644 index 00000000..54b822b9 --- /dev/null +++ b/dozentenmodulserver/api/src/main/java/org/openslx/bwlp/sat/api/model/VirtualMachineImageCreator.java @@ -0,0 +1,84 @@ +package org.openslx.bwlp.sat.api.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; + + +import java.util.*; + +/** + * VirtualMachineImageCreator + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2021-12-23T15:12:42.264617368+01:00[Europe/Berlin]") +public class VirtualMachineImageCreator { + @JsonProperty("param") + private String param; + + public VirtualMachineImageCreator param(String param) { + this.param = param; + return this; + } + + /** + * Get param + * @return param + */ + @ApiModelProperty(value = "") + + + public String getParam() { + return param; + } + + public void setParam(String param) { + this.param = param; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + VirtualMachineImageCreator virtualMachineImageCreator = (VirtualMachineImageCreator) o; + return Objects.equals(this.param, virtualMachineImageCreator.param); + } + + @Override + public int hashCode() { + return Objects.hash(param); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class VirtualMachineImageCreator {\n"); + + sb.append(" param: ").append(toIndentedString(param)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/dozentenmodulserver/api/src/main/java/org/openslx/bwlp/sat/api/model/VirtualMachineImageForLocation.java b/dozentenmodulserver/api/src/main/java/org/openslx/bwlp/sat/api/model/VirtualMachineImageForLocation.java new file mode 100644 index 00000000..f509829a --- /dev/null +++ b/dozentenmodulserver/api/src/main/java/org/openslx/bwlp/sat/api/model/VirtualMachineImageForLocation.java @@ -0,0 +1,84 @@ +package org.openslx.bwlp.sat.api.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; + + +import java.util.*; + +/** + * VirtualMachineImageForLocation + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2021-12-23T15:12:42.264617368+01:00[Europe/Berlin]") +public class VirtualMachineImageForLocation { + @JsonProperty("param") + private String param; + + public VirtualMachineImageForLocation param(String param) { + this.param = param; + return this; + } + + /** + * Get param + * @return param + */ + @ApiModelProperty(value = "") + + + public String getParam() { + return param; + } + + public void setParam(String param) { + this.param = param; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + VirtualMachineImageForLocation virtualMachineImageForLocation = (VirtualMachineImageForLocation) o; + return Objects.equals(this.param, virtualMachineImageForLocation.param); + } + + @Override + public int hashCode() { + return Objects.hash(param); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class VirtualMachineImageForLocation {\n"); + + sb.append(" param: ").append(toIndentedString(param)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/dozentenmodulserver/api/src/main/java/org/openslx/bwlp/sat/api/model/VirtualMachineImageIsTemplate.java b/dozentenmodulserver/api/src/main/java/org/openslx/bwlp/sat/api/model/VirtualMachineImageIsTemplate.java new file mode 100644 index 00000000..09bddfa7 --- /dev/null +++ b/dozentenmodulserver/api/src/main/java/org/openslx/bwlp/sat/api/model/VirtualMachineImageIsTemplate.java @@ -0,0 +1,120 @@ +package org.openslx.bwlp.sat.api.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; + + +import java.util.*; + +/** + * VirtualMachineImageIsTemplate + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2021-12-23T15:12:42.264617368+01:00[Europe/Berlin]") +public class VirtualMachineImageIsTemplate { + /** + * Gets or Sets param + */ + public enum ParamEnum { + NUMBER_0(0), + + NUMBER_1(1); + + private Integer value; + + ParamEnum(Integer value) { + this.value = value; + } + + @JsonValue + public Integer getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ParamEnum fromValue(Integer value) { + for (ParamEnum b : ParamEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + @JsonProperty("param") + private ParamEnum param; + + public VirtualMachineImageIsTemplate param(ParamEnum param) { + this.param = param; + return this; + } + + /** + * Get param + * @return param + */ + @ApiModelProperty(value = "") + + + public ParamEnum getParam() { + return param; + } + + public void setParam(ParamEnum param) { + this.param = param; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + VirtualMachineImageIsTemplate virtualMachineImageIsTemplate = (VirtualMachineImageIsTemplate) o; + return Objects.equals(this.param, virtualMachineImageIsTemplate.param); + } + + @Override + public int hashCode() { + return Objects.hash(param); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class VirtualMachineImageIsTemplate {\n"); + + sb.append(" param: ").append(toIndentedString(param)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/dozentenmodulserver/api/src/main/java/org/openslx/bwlp/sat/api/model/VirtualMachineImageLongDescription.java b/dozentenmodulserver/api/src/main/java/org/openslx/bwlp/sat/api/model/VirtualMachineImageLongDescription.java new file mode 100644 index 00000000..81fe023b --- /dev/null +++ b/dozentenmodulserver/api/src/main/java/org/openslx/bwlp/sat/api/model/VirtualMachineImageLongDescription.java @@ -0,0 +1,84 @@ +package org.openslx.bwlp.sat.api.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; + + +import java.util.*; + +/** + * VirtualMachineImageLongDescription + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2021-12-23T15:12:42.264617368+01:00[Europe/Berlin]") +public class VirtualMachineImageLongDescription { + @JsonProperty("param") + private String param; + + public VirtualMachineImageLongDescription param(String param) { + this.param = param; + return this; + } + + /** + * Get param + * @return param + */ + @ApiModelProperty(value = "") + + + public String getParam() { + return param; + } + + public void setParam(String param) { + this.param = param; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + VirtualMachineImageLongDescription virtualMachineImageLongDescription = (VirtualMachineImageLongDescription) o; + return Objects.equals(this.param, virtualMachineImageLongDescription.param); + } + + @Override + public int hashCode() { + return Objects.hash(param); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class VirtualMachineImageLongDescription {\n"); + + sb.append(" param: ").append(toIndentedString(param)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/dozentenmodulserver/api/src/main/java/org/openslx/bwlp/sat/api/model/VirtualMachineImageName.java b/dozentenmodulserver/api/src/main/java/org/openslx/bwlp/sat/api/model/VirtualMachineImageName.java new file mode 100644 index 00000000..83975c88 --- /dev/null +++ b/dozentenmodulserver/api/src/main/java/org/openslx/bwlp/sat/api/model/VirtualMachineImageName.java @@ -0,0 +1,84 @@ +package org.openslx.bwlp.sat.api.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; + + +import java.util.*; + +/** + * VirtualMachineImageName + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2021-12-23T15:12:42.264617368+01:00[Europe/Berlin]") +public class VirtualMachineImageName { + @JsonProperty("param") + private String param; + + public VirtualMachineImageName param(String param) { + this.param = param; + return this; + } + + /** + * Get param + * @return param + */ + @ApiModelProperty(value = "") + + + public String getParam() { + return param; + } + + public void setParam(String param) { + this.param = param; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + VirtualMachineImageName virtualMachineImageName = (VirtualMachineImageName) o; + return Objects.equals(this.param, virtualMachineImageName.param); + } + + @Override + public int hashCode() { + return Objects.hash(param); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class VirtualMachineImageName {\n"); + + sb.append(" param: ").append(toIndentedString(param)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/dozentenmodulserver/api/src/main/java/org/openslx/bwlp/sat/api/model/VirtualMachineImageOsName.java b/dozentenmodulserver/api/src/main/java/org/openslx/bwlp/sat/api/model/VirtualMachineImageOsName.java new file mode 100644 index 00000000..5c6630cf --- /dev/null +++ b/dozentenmodulserver/api/src/main/java/org/openslx/bwlp/sat/api/model/VirtualMachineImageOsName.java @@ -0,0 +1,84 @@ +package org.openslx.bwlp.sat.api.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; + + +import java.util.*; + +/** + * VirtualMachineImageOsName + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2021-12-23T15:12:42.264617368+01:00[Europe/Berlin]") +public class VirtualMachineImageOsName { + @JsonProperty("param") + private String param; + + public VirtualMachineImageOsName param(String param) { + this.param = param; + return this; + } + + /** + * Get param + * @return param + */ + @ApiModelProperty(value = "") + + + public String getParam() { + return param; + } + + public void setParam(String param) { + this.param = param; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + VirtualMachineImageOsName virtualMachineImageOsName = (VirtualMachineImageOsName) o; + return Objects.equals(this.param, virtualMachineImageOsName.param); + } + + @Override + public int hashCode() { + return Objects.hash(param); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class VirtualMachineImageOsName {\n"); + + sb.append(" param: ").append(toIndentedString(param)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/dozentenmodulserver/api/src/main/java/org/openslx/bwlp/sat/api/model/VirtualMachineImagePriority.java b/dozentenmodulserver/api/src/main/java/org/openslx/bwlp/sat/api/model/VirtualMachineImagePriority.java new file mode 100644 index 00000000..81b8388f --- /dev/null +++ b/dozentenmodulserver/api/src/main/java/org/openslx/bwlp/sat/api/model/VirtualMachineImagePriority.java @@ -0,0 +1,84 @@ +package org.openslx.bwlp.sat.api.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; + + +import java.util.*; + +/** + * VirtualMachineImagePriority + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2021-12-23T15:12:42.264617368+01:00[Europe/Berlin]") +public class VirtualMachineImagePriority { + @JsonProperty("param") + private Integer param; + + public VirtualMachineImagePriority param(Integer param) { + this.param = param; + return this; + } + + /** + * Get param + * @return param + */ + @ApiModelProperty(value = "") + + + public Integer getParam() { + return param; + } + + public void setParam(Integer param) { + this.param = param; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + VirtualMachineImagePriority virtualMachineImagePriority = (VirtualMachineImagePriority) o; + return Objects.equals(this.param, virtualMachineImagePriority.param); + } + + @Override + public int hashCode() { + return Objects.hash(param); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class VirtualMachineImagePriority {\n"); + + sb.append(" param: ").append(toIndentedString(param)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/dozentenmodulserver/api/src/main/java/org/openslx/bwlp/sat/api/model/VirtualMachineImageShortDescription.java b/dozentenmodulserver/api/src/main/java/org/openslx/bwlp/sat/api/model/VirtualMachineImageShortDescription.java new file mode 100644 index 00000000..6d35387a --- /dev/null +++ b/dozentenmodulserver/api/src/main/java/org/openslx/bwlp/sat/api/model/VirtualMachineImageShortDescription.java @@ -0,0 +1,84 @@ +package org.openslx.bwlp.sat.api.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; + + +import java.util.*; + +/** + * VirtualMachineImageShortDescription + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2021-12-23T15:12:42.264617368+01:00[Europe/Berlin]") +public class VirtualMachineImageShortDescription { + @JsonProperty("param") + private String param; + + public VirtualMachineImageShortDescription param(String param) { + this.param = param; + return this; + } + + /** + * Get param + * @return param + */ + @ApiModelProperty(value = "") + + + public String getParam() { + return param; + } + + public void setParam(String param) { + this.param = param; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + VirtualMachineImageShortDescription virtualMachineImageShortDescription = (VirtualMachineImageShortDescription) o; + return Objects.equals(this.param, virtualMachineImageShortDescription.param); + } + + @Override + public int hashCode() { + return Objects.hash(param); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class VirtualMachineImageShortDescription {\n"); + + sb.append(" param: ").append(toIndentedString(param)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/dozentenmodulserver/api/src/main/java/org/openslx/bwlp/sat/api/model/VirtualMachineImageUuid.java b/dozentenmodulserver/api/src/main/java/org/openslx/bwlp/sat/api/model/VirtualMachineImageUuid.java new file mode 100644 index 00000000..58affeea --- /dev/null +++ b/dozentenmodulserver/api/src/main/java/org/openslx/bwlp/sat/api/model/VirtualMachineImageUuid.java @@ -0,0 +1,86 @@ +package org.openslx.bwlp.sat.api.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; + + +import java.util.*; + +/** + * VirtualMachineImageUuid + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2021-12-23T15:12:42.264617368+01:00[Europe/Berlin]") +public class VirtualMachineImageUuid { + @JsonProperty("param") + private UUID param; + + public VirtualMachineImageUuid param(UUID param) { + this.param = param; + return this; + } + + /** + * Get param + * @return param + */ + @ApiModelProperty(value = "") + + @Valid + + public UUID getParam() { + return param; + } + + public void setParam(UUID param) { + this.param = param; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + VirtualMachineImageUuid virtualMachineImageUuid = (VirtualMachineImageUuid) o; + return Objects.equals(this.param, virtualMachineImageUuid.param); + } + + @Override + public int hashCode() { + return Objects.hash(param); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class VirtualMachineImageUuid {\n"); + + sb.append(" param: ").append(toIndentedString(param)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/dozentenmodulserver/api/src/main/java/org/openslx/bwlp/sat/api/model/VirtualMachineImageVirtualMachine.java b/dozentenmodulserver/api/src/main/java/org/openslx/bwlp/sat/api/model/VirtualMachineImageVirtualMachine.java new file mode 100644 index 00000000..e3186a42 --- /dev/null +++ b/dozentenmodulserver/api/src/main/java/org/openslx/bwlp/sat/api/model/VirtualMachineImageVirtualMachine.java @@ -0,0 +1,84 @@ +package org.openslx.bwlp.sat.api.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; + + +import java.util.*; + +/** + * VirtualMachineImageVirtualMachine + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2021-12-23T15:12:42.264617368+01:00[Europe/Berlin]") +public class VirtualMachineImageVirtualMachine { + @JsonProperty("param") + private String param; + + public VirtualMachineImageVirtualMachine param(String param) { + this.param = param; + return this; + } + + /** + * Get param + * @return param + */ + @ApiModelProperty(value = "") + + + public String getParam() { + return param; + } + + public void setParam(String param) { + this.param = param; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + VirtualMachineImageVirtualMachine virtualMachineImageVirtualMachine = (VirtualMachineImageVirtualMachine) o; + return Objects.equals(this.param, virtualMachineImageVirtualMachine.param); + } + + @Override + public int hashCode() { + return Objects.hash(param); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class VirtualMachineImageVirtualMachine {\n"); + + sb.append(" param: ").append(toIndentedString(param)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/dozentenmodulserver/api/src/main/java/org/openslx/bwlp/sat/api/model/VirtualMachineImageVirtualizerName.java b/dozentenmodulserver/api/src/main/java/org/openslx/bwlp/sat/api/model/VirtualMachineImageVirtualizerName.java new file mode 100644 index 00000000..3ca6a053 --- /dev/null +++ b/dozentenmodulserver/api/src/main/java/org/openslx/bwlp/sat/api/model/VirtualMachineImageVirtualizerName.java @@ -0,0 +1,84 @@ +package org.openslx.bwlp.sat.api.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; + + +import java.util.*; + +/** + * VirtualMachineImageVirtualizerName + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2021-12-23T15:12:42.264617368+01:00[Europe/Berlin]") +public class VirtualMachineImageVirtualizerName { + @JsonProperty("param") + private String param; + + public VirtualMachineImageVirtualizerName param(String param) { + this.param = param; + return this; + } + + /** + * Get param + * @return param + */ + @ApiModelProperty(value = "") + + + public String getParam() { + return param; + } + + public void setParam(String param) { + this.param = param; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + VirtualMachineImageVirtualizerName virtualMachineImageVirtualizerName = (VirtualMachineImageVirtualizerName) o; + return Objects.equals(this.param, virtualMachineImageVirtualizerName.param); + } + + @Override + public int hashCode() { + return Objects.hash(param); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class VirtualMachineImageVirtualizerName {\n"); + + sb.append(" param: ").append(toIndentedString(param)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/dozentenmodulserver/api/src/main/java/org/openslx/bwlp/sat/api/model/VirtualMachineImages.java b/dozentenmodulserver/api/src/main/java/org/openslx/bwlp/sat/api/model/VirtualMachineImages.java new file mode 100644 index 00000000..11f8f026 --- /dev/null +++ b/dozentenmodulserver/api/src/main/java/org/openslx/bwlp/sat/api/model/VirtualMachineImages.java @@ -0,0 +1,97 @@ +package org.openslx.bwlp.sat.api.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.ArrayList; +import java.util.List; +import org.openslx.bwlp.sat.api.model.VirtualMachineImage; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; + + +import java.util.*; + +/** + * VirtualMachineImages + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2021-12-23T15:12:42.264617368+01:00[Europe/Berlin]") +public class VirtualMachineImages { + @JsonProperty("settings") + @Valid + private List settings = null; + + public VirtualMachineImages settings(List settings) { + this.settings = settings; + return this; + } + + public VirtualMachineImages addSettingsItem(VirtualMachineImage settingsItem) { + if (this.settings == null) { + this.settings = new ArrayList<>(); + } + this.settings.add(settingsItem); + return this; + } + + /** + * Get settings + * @return settings + */ + @ApiModelProperty(value = "") + + @Valid + + public List getSettings() { + return settings; + } + + public void setSettings(List settings) { + this.settings = settings; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + VirtualMachineImages virtualMachineImages = (VirtualMachineImages) o; + return Objects.equals(this.settings, virtualMachineImages.settings); + } + + @Override + public int hashCode() { + return Objects.hash(settings); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class VirtualMachineImages {\n"); + + sb.append(" settings: ").append(toIndentedString(settings)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/dozentenmodulserver/api/src/main/resources/application.properties b/dozentenmodulserver/api/src/main/resources/application.properties new file mode 100644 index 00000000..aee22931 --- /dev/null +++ b/dozentenmodulserver/api/src/main/resources/application.properties @@ -0,0 +1,4 @@ +springfox.documentation.swagger.v2.path=/api-docs +server.port=9080 +spring.jackson.date-format=org.openslx.bwlp.sat.api.handler.RFC3339DateFormat +spring.jackson.serialization.WRITE_DATES_AS_TIMESTAMPS=false diff --git a/dozentenmodulserver/api/src/main/resources/openapi.yaml b/dozentenmodulserver/api/src/main/resources/openapi.yaml new file mode 100644 index 00000000..ae247ad7 --- /dev/null +++ b/dozentenmodulserver/api/src/main/resources/openapi.yaml @@ -0,0 +1,568 @@ +openapi: 3.0.0 +info: + contact: + name: bwLehrpool-Server + url: https://git.openslx.org/openslx-ng/tutor-module.git + description: This is the description document of the bwLehrpool-Server API. The + API provides functionality to create, modify, and query events or virtual machine + images. You can find out more about the bwLehrpool-Server at [https://git.openslx.org/openslx-ng/tutor-module.git](https://git.openslx.org/openslx-ng/tutor-module.git). + title: bwLehrpool-Server + version: 1.0.0 +servers: +- url: http://192.168.200.20:9080 +tags: +- description: Query bwLehrpool events and virtual machine images + name: vmchooser +- description: Query bwLehrpool container images + name: container +- description: Status and actions of the bwLehrpool-Server + name: server +paths: + /vmchooser/list: + get: + operationId: vmchooserGetList + parameters: + - description: IDs of locations that need to be considered for the filter + explode: false + in: query + name: locations + required: false + schema: + items: + type: integer + type: array + style: spaceDelimited + - description: Include exam events for the filter + explode: true + in: query + name: exams + required: false + schema: + default: false + type: boolean + style: form + responses: + "200": + content: + application/xml: + schema: + $ref: '#/components/schemas/VirtualMachineImages' + description: Successful operation + "500": + description: Failed to retrieve list + summary: List all bwLehrpool virtual machine images + tags: + - vmchooser + x-accepts: application/xml + x-tags: + - tag: vmchooser + /vmchooser/lecture/{uuid}/metadata: + get: + operationId: vmchooserGetLectureMetadata + parameters: + - description: UUID of the lecture + explode: false + in: path + name: uuid + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + content: + application/gzip: {} + description: Successful operation + "500": + description: Faild to retrieve metadata + summary: Get metadata for specified lecture + tags: + - vmchooser + x-accepts: application/gzip + x-tags: + - tag: vmchooser + /vmchooser/lecture/{uuid}/netrules: + get: + operationId: vmchooserGetLectureNetRules + parameters: + - description: UUID of the lecture + explode: false + in: path + name: uuid + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + content: + text/plain: {} + description: Successful operation + "500": + description: Faild to retrieve network rules + summary: Get network rules for specified lecture + tags: + - vmchooser + x-accepts: text/plain + x-tags: + - tag: vmchooser + /vmchooser/lecture/{uuid}/imagemeta: + get: + operationId: vmchooserGetLectureImageMeta + parameters: + - description: UUID of the lecture + explode: false + in: path + name: uuid + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + content: + application/json: {} + description: Successful operation + "500": + description: Faild to retrieve metadata + summary: Get metadata of virtual mchine image for specified lecture + tags: + - vmchooser + x-accepts: application/json + x-tags: + - tag: vmchooser + /bwlp/container/clusterimages: + get: + operationId: bwlpGetClusterImagesList + responses: + "200": + content: + application/json: {} + description: Successful operation + "500": + description: Failed to retrieve container images + summary: List all bwLehrpool container images + tags: + - container + x-accepts: application/json + x-tags: + - tag: container + /image/container/{uuid}/metadata: + get: + operationId: getContainerImageMetadata + parameters: + - description: UUID of the container + explode: false + in: path + name: uuid + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + content: + application/json: {} + description: Successful operation + "500": + description: Failed to retrieve container metadata + summary: Get metadata for specified container image + tags: + - container + x-accepts: application/json + x-tags: + - tag: container + /status/fileserver: + get: + operationId: getFileserverStatus + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/StatusFileserver' + description: Successful operation + summary: Get bwLehrpool-Server status + tags: + - server + x-accepts: application/json + x-tags: + - tag: server + /do/mailtest: + post: + operationId: doMailtestOnFileserver + parameters: + - description: Domain of SMTP mail server + explode: true + in: query + name: host + required: true + schema: + type: string + style: form + - description: Port of SMTP mail server + explode: true + in: query + name: port + required: true + schema: + format: int32 + type: integer + style: form + - description: Encryption mode for the SMTP mail server + explode: true + in: query + name: ssl + required: true + schema: + enum: + - NONE + - IMPLICIT + - EXPLICIT + type: string + style: form + - description: Name of the SMTP mail server + explode: true + in: query + name: serverName + required: true + schema: + type: string + style: form + - description: Username for the SMTP mail server + explode: true + in: query + name: username + required: true + schema: + type: string + style: form + - description: Password for the SMTP mail server + explode: true + in: query + name: password + required: true + schema: + type: string + style: form + - description: Sender address for the test mail + explode: true + in: query + name: senderAddress + required: true + schema: + type: string + style: form + - description: Recipient for the test mail + explode: true + in: query + name: recipient + required: true + schema: + type: string + style: form + - description: Reply-To address for the test mail + explode: true + in: query + name: replyTo + required: true + schema: + type: string + style: form + responses: + "200": + content: + text/plain: {} + description: Successful operation + "400": + description: Failed to send test mail + summary: Send a test mail from the bwLehrpool-Server + tags: + - server + x-accepts: text/plain + x-tags: + - tag: server + /do/delete-images: + post: + operationId: doDeleteOldImagesOnFileserver + responses: + "200": + content: + text/plain: {} + description: Successful operation + "500": + description: Failed to delete old images + summary: Delete old images on the bwLehrpool-Server + tags: + - server + x-accepts: text/plain + x-tags: + - tag: server + /do/start-image-check: + post: + operationId: doStartImageCheckOnFileserver + parameters: + - description: Image version for the image check + explode: true + in: query + name: versionid + required: true + schema: + format: uuid + type: string + style: form + - description: Check hashes of images + explode: true + in: query + name: hash + required: true + schema: + type: boolean + style: form + - description: Update state of images + explode: true + in: query + name: update + required: true + schema: + type: boolean + style: form + responses: + "200": + content: + text/plain: {} + description: Successful operation + "500": + description: Failed to start image check + summary: Start image check on the bwLehrpool-Server + tags: + - server + x-accepts: text/plain + x-tags: + - tag: server + /do/query-image-check: + post: + operationId: doQueryImageCheckOnFileserver + parameters: + - description: Query image check for specified image version + explode: true + in: query + name: versionid + required: false + schema: + format: uuid + type: string + style: form + responses: + "200": + content: + application/json: {} + description: Successful operation + "500": + description: Failed to query image check + summary: Query image check on the bwLehrpool-Server + tags: + - server + x-accepts: application/json + x-tags: + - tag: server + /do/reset-mail-templates: + post: + operationId: doResetMailTemplatesOnFileserver + responses: + "200": + content: + text/plain: {} + description: Successful operation + "500": + description: Failed to reset mail templates + summary: Rest mail templates on the bwLehrpool-Server + tags: + - server + x-accepts: text/plain + x-tags: + - tag: server + /do/scan-orphaned-files: + post: + operationId: doScanOrphanedFilesOnFileserver + parameters: + - description: Action for orphaned files + explode: true + in: query + name: action + required: false + schema: + enum: + - delete + type: string + style: form + responses: + "200": + content: + application/json: {} + description: Successful operation + "500": + description: Failed to scan orphaned files + summary: Scan orphaned files on the bwLehrpool-Server + tags: + - server + x-accepts: application/json + x-tags: + - tag: server +components: + schemas: + VirtualMachineImages: + properties: + settings: + items: + $ref: '#/components/schemas/VirtualMachineImage' + type: array + type: object + xml: + name: settings + VirtualMachineImage: + properties: + name: + $ref: '#/components/schemas/VirtualMachineImage_name' + priority: + $ref: '#/components/schemas/VirtualMachineImage_priority' + creator: + $ref: '#/components/schemas/VirtualMachineImage_creator' + shortDescription: + $ref: '#/components/schemas/VirtualMachineImage_shortDescription' + longDescription: + $ref: '#/components/schemas/VirtualMachineImage_longDescription' + uuid: + $ref: '#/components/schemas/VirtualMachineImage_uuid' + virtualMachine: + $ref: '#/components/schemas/VirtualMachineImage_virtualMachine' + os: + $ref: '#/components/schemas/VirtualMachineImage_creator' + icon: + $ref: '#/components/schemas/VirtualMachineImage_creator' + virtualizerName: + $ref: '#/components/schemas/VirtualMachineImage_virtualizerName' + osName: + $ref: '#/components/schemas/VirtualMachineImage_osName' + forLocation: + $ref: '#/components/schemas/VirtualMachineImage_forLocation' + isTemplate: + $ref: '#/components/schemas/VirtualMachineImage_isTemplate' + type: object + xml: + name: eintrag + StatusFileserver: + example: + activeUploads: 0 + activeDownloads: 6 + properties: + activeUploads: + format: int32 + type: integer + activeDownloads: + format: int32 + type: integer + type: object + VirtualMachineImage_name: + properties: + param: + type: string + xml: + attribute: true + type: object + xml: + name: image_name + VirtualMachineImage_priority: + properties: + param: + format: int32 + type: integer + xml: + attribute: true + type: object + VirtualMachineImage_creator: + properties: + param: + type: string + xml: + attribute: true + type: object + VirtualMachineImage_shortDescription: + properties: + param: + type: string + xml: + attribute: true + type: object + xml: + name: short_description + VirtualMachineImage_longDescription: + properties: + param: + type: string + xml: + attribute: true + type: object + xml: + name: long_description + VirtualMachineImage_uuid: + properties: + param: + format: uuid + type: string + xml: + attribute: true + type: object + VirtualMachineImage_virtualMachine: + properties: + param: + type: string + xml: + attribute: true + type: object + xml: + name: virtualmachine + VirtualMachineImage_virtualizerName: + properties: + param: + type: string + xml: + attribute: true + type: object + xml: + name: virtualizer_name + VirtualMachineImage_osName: + properties: + param: + type: string + xml: + attribute: true + type: object + xml: + name: os_name + VirtualMachineImage_forLocation: + properties: + param: + type: string + xml: + attribute: true + type: object + xml: + name: for_location + VirtualMachineImage_isTemplate: + properties: + param: + enum: + - 0 + - 1 + format: int32 + type: integer + xml: + attribute: true + type: object + xml: + name: is_template -- cgit v1.2.3-55-g7522