소스 검색

Add stackit provider support

Lucian Petrut 6 일 전
부모
커밋
c4d1ecf27b
5개의 변경된 파일26개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 0
      config.ts
  2. 2 1
      src/@types/Providers.ts
  3. 2 0
      src/plugins/index.ts
  4. 17 0
      src/plugins/stackit/ConnectionSchemaPlugin.ts
  5. 3 0
      tests/mocks/ProvidersMock.ts

+ 2 - 0
config.ts

@@ -179,6 +179,7 @@ const conf: Config = {
     sap_libvirt: 4,
     cloudstack: 4,
     nutanix: 4,
+    stackit: 4,
   },
 
   providerNames: {
@@ -205,6 +206,7 @@ const conf: Config = {
     sap_libvirt: "Libvirt SAP",
     cloudstack: "Cloudstack",
     nutanix: "Nutanix",
+    stackit: "Stackit",
   },
 
   // The list of providers for which to disable setting the 'Execute Now Options' field

+ 2 - 1
src/@types/Providers.ts

@@ -35,7 +35,8 @@ export type ProviderTypes =
   | "libvirt"
   | "sap_libvirt"
   | "cloudstack"
-  | "nutanix";
+  | "nutanix"
+  | "stackit";
 
 export type Providers = {
   [provider in ProviderTypes]: {

+ 2 - 0
src/plugins/index.ts

@@ -24,6 +24,7 @@ import KubevirtConnectionSchemaPlugin from "./kubevirt/ConnectionSchemaPlugin";
 import HarvesterConnectionSchemaPlugin from "./harvester/ConnectionSchemaPlugin";
 import LibvirtConnectionSchemaPlugin from "./libvirt/ConnectionSchemaPlugin";
 import NutanixConnectionSchemaPlugin from "./nutanix/ConnectionSchemaPlugin";
+import StackitConnectionSchemaPlugin from "./stackit/ConnectionSchemaPlugin";
 
 import DefaultContentPlugin from "./default/ContentPlugin";
 import AzureContentPlugin from "./azure/ContentPlugin";
@@ -66,6 +67,7 @@ export const ConnectionSchemaPlugin = {
       libvirt: new LibvirtConnectionSchemaPlugin(),
       sap_libvirt: new LibvirtConnectionSchemaPlugin(),
       nutanix: new NutanixConnectionSchemaPlugin(),
+      stackit: new StackitConnectionSchemaPlugin(),
     };
     if (hasKey(map, provider)) {
       return map[provider];

+ 17 - 0
src/plugins/stackit/ConnectionSchemaPlugin.ts

@@ -0,0 +1,17 @@
+/*
+Copyright (C) 2026  Cloudbase Solutions SRL
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU Affero General Public License as
+published by the Free Software Foundation, either version 3 of the
+License, or (at your option) any later version.
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU Affero General Public License for more details.
+You should have received a copy of the GNU Affero General Public License
+along with this program.  If not, see <http://www.gnu.org/licenses/>.
+*/
+
+import ConnectionSchemaParserBase from "@src/plugins/default/ConnectionSchemaPlugin";
+
+export default class StackitConnectionSchemaPlugin extends ConnectionSchemaParserBase {}

+ 3 - 0
tests/mocks/ProvidersMock.ts

@@ -71,4 +71,7 @@ export const PROVIDERS_MOCK: Providers = {
   cloudstack: {
     types: [],
   },
+  stackit: {
+    types: [],
+  },
 };