diff --git a/package-lock.json b/package-lock.json index 92c3480a0..d67d0550a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,7 +14,7 @@ "antd": "^5.17.0", "echarts": "5.5.0", "echarts-for-react": "^3.0.2", - "rc-field-form": "^2.0.0", + "rc-field-form": "^2.0.1", "rc-menu": "^9.12.2", "rc-tabs": "^15.0.0", "react": "^18.2.0", @@ -29,9 +29,9 @@ "@babel/plugin-proposal-private-property-in-object": "^7.21.11", "@tanstack/eslint-plugin-query": "^5.32.1", "@testing-library/jest-dom": "^6.4.5", - "@testing-library/react": "^15.0.6", + "@testing-library/react": "^15.0.7", "@types/jest": "^29.5.12", - "@types/node": "^20.12.10", + "@types/node": "^20.12.11", "@types/react": "^18.3.1", "@types/react-dom": "^18.3.0", "@types/uuid": "^9.0.8", @@ -48,7 +48,7 @@ "identity-obj-proxy": "^3.0.0", "jest": "^29.7.0", "jest-environment-jsdom": "^29.7.0", - "knip": "^5.12.3", + "knip": "^5.13.0", "openapi-typescript-codegen": "^0.29.0", "prettier": "3.2.5", "react-scripts": "5.0.1", @@ -3963,9 +3963,9 @@ } }, "node_modules/@rc-component/async-validator": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/@rc-component/async-validator/-/async-validator-5.0.1.tgz", - "integrity": "sha512-QEoRKwsdwgCC+k5prXyDOqsZOR2WD+lWnM4mbMR97afDKVFwrBkdrzw67wHIvrmXjtsd8uTbE7rnX1wWAhkc9w==", + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/@rc-component/async-validator/-/async-validator-5.0.3.tgz", + "integrity": "sha512-eN5chKrc0ANerXjLJuoqh/YJpor0u4T1bgaph5BPh42cJ2afDihaHJ2Mh3Up3XIFk05EfKG4nIQxbqC6y2eM4Q==", "dependencies": { "@babel/runtime": "^7.24.4" }, @@ -4923,9 +4923,9 @@ } }, "node_modules/@testing-library/react": { - "version": "15.0.6", - "resolved": "https://registry.npmjs.org/@testing-library/react/-/react-15.0.6.tgz", - "integrity": "sha512-UlbazRtEpQClFOiYp+1BapMT+xyqWMnE+hh9tn5DQ6gmlE7AIZWcGpzZukmDZuFk3By01oiqOf8lRedLS4k6xQ==", + "version": "15.0.7", + "resolved": "https://registry.npmjs.org/@testing-library/react/-/react-15.0.7.tgz", + "integrity": "sha512-cg0RvEdD1TIhhkm1IeYMQxrzy0MtUNfa3minv4MjbgcYzJAZ7yD0i0lwoPOTPr+INtiXFezt2o8xMSnyHhEn2Q==", "dev": true, "dependencies": { "@babel/runtime": "^7.12.5", @@ -5237,9 +5237,9 @@ "dev": true }, "node_modules/@types/node": { - "version": "20.12.10", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.12.10.tgz", - "integrity": "sha512-Eem5pH9pmWBHoGAT8Dr5fdc5rYA+4NAovdM4EktRPVAAiJhmWWfQrA0cFhAbOsQdSfIHjAud6YdkbL69+zSKjw==", + "version": "20.12.11", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.12.11.tgz", + "integrity": "sha512-vDg9PZ/zi+Nqp6boSOT7plNuthRugEKixDv5sFTIpkE89MmNtEArAShI4mxuX2+UrLEe9pxC1vm2cjm9YlWbJw==", "dev": true, "dependencies": { "undici-types": "~5.26.4" @@ -16668,9 +16668,9 @@ } }, "node_modules/knip": { - "version": "5.12.3", - "resolved": "https://registry.npmjs.org/knip/-/knip-5.12.3.tgz", - "integrity": "sha512-LL+NsE+3H0TkUnQW6icHQ+5qSrPENmjHJyMHgzjiZPmunstrIsaRG+QjahnzoH/FjMjVJwrdwVOSvksa8ixFbw==", + "version": "5.13.0", + "resolved": "https://registry.npmjs.org/knip/-/knip-5.13.0.tgz", + "integrity": "sha512-CvGvUkb4SIpLWNYOwv8sqGp9WlWe7i57Qw3w/cvEMOdbPxIyzCWBKuD+xpty4zKtdrWxwdV5Jr0LtSKcxxA6Yw==", "dev": true, "funding": [ { @@ -20470,12 +20470,12 @@ } }, "node_modules/rc-field-form": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/rc-field-form/-/rc-field-form-2.0.0.tgz", - "integrity": "sha512-Xwp8SoSbWQOsz3s7IwEkDj/fF73Wa+vVPtP+gnaq6wVvPX8aPhx1vrHpFcgmiIOKdKIdezGLFsTyU3kNXn+IEA==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/rc-field-form/-/rc-field-form-2.0.1.tgz", + "integrity": "sha512-3WK/POHBcfMFKrzScrkmgMIXqoVQ0KgVwcVnej/ukwuQG4ZHCJaTi2KhM+tWTK4WODBXbmjKg5pKHj2IVmSg4A==", "dependencies": { "@babel/runtime": "^7.18.0", - "@rc-component/async-validator": "^5.0.1", + "@rc-component/async-validator": "^5.0.3", "rc-util": "^5.32.2" }, "engines": { diff --git a/package.json b/package.json index 3a7428589..dddbc5aba 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,7 @@ "antd": "^5.17.0", "echarts": "5.5.0", "echarts-for-react": "^3.0.2", - "rc-field-form": "^2.0.0", + "rc-field-form": "^2.0.1", "rc-menu": "^9.12.2", "rc-tabs": "^15.0.0", "react": "^18.2.0", @@ -87,9 +87,9 @@ "@babel/plugin-proposal-private-property-in-object": "^7.21.11", "@tanstack/eslint-plugin-query": "^5.32.1", "@testing-library/jest-dom": "^6.4.5", - "@testing-library/react": "^15.0.6", + "@testing-library/react": "^15.0.7", "@types/jest": "^29.5.12", - "@types/node": "^20.12.10", + "@types/node": "^20.12.11", "@types/react": "^18.3.1", "@types/react-dom": "^18.3.0", "@types/uuid": "^9.0.8", @@ -106,7 +106,7 @@ "identity-obj-proxy": "^3.0.0", "jest": "^29.7.0", "jest-environment-jsdom": "^29.7.0", - "knip": "^5.12.3", + "knip": "^5.13.0", "openapi-typescript-codegen": "^0.29.0", "prettier": "3.2.5", "react-scripts": "5.0.1", diff --git a/src/components/content/order/common/RegionInfo.tsx b/src/components/content/order/common/RegionInfo.tsx index 9380cc522..5f55a5974 100644 --- a/src/components/content/order/common/RegionInfo.tsx +++ b/src/components/content/order/common/RegionInfo.tsx @@ -6,7 +6,7 @@ import React from 'react'; import { Form, Select, Space } from 'antd'; import '../../../../styles/service_order.css'; -import { Region } from '../types/Region'; +import { RegionDropDownInfo } from '../types/RegionDropDownInfo'; export const RegionInfo = ({ selectRegion, @@ -16,7 +16,7 @@ export const RegionInfo = ({ }: { selectRegion: string; onChangeRegion?: (newRegion: string) => void; - regionList?: Region[]; + regionList?: RegionDropDownInfo[]; disabled?: boolean; }): React.JSX.Element => { return ( diff --git a/src/components/content/order/create/SelectServiceForm.tsx b/src/components/content/order/create/SelectServiceForm.tsx index 543978e1d..394943f80 100644 --- a/src/components/content/order/create/SelectServiceForm.tsx +++ b/src/components/content/order/create/SelectServiceForm.tsx @@ -12,7 +12,7 @@ import { UserOrderableServiceVo, } from '../../../../xpanse-api/generated'; import { Tab } from 'rc-tabs/lib/interface'; -import { Region } from '../types/Region'; +import { RegionDropDownInfo } from '../types/RegionDropDownInfo'; import { Flavor } from '../types/Flavor'; import { getSortedVersionList } from '../formDataHelpers/versionHelper'; import { getCspListForVersion } from '../formDataHelpers/cspHelper'; @@ -89,7 +89,7 @@ export function SelectServiceForm({ services }: { services: UserOrderableService ); let areaList: Tab[] = convertAreasToTabs(selectCsp, selectServiceHostType, versionToServicesMap.get(selectVersion)); const [selectArea, setSelectArea] = useState(serviceInfo ? serviceInfo.area : areaList[0].key); - let regionList: Region[] = getRegionDropDownValues( + let regionList: RegionDropDownInfo[] = getRegionDropDownValues( selectCsp, selectServiceHostType, selectArea, diff --git a/src/components/content/order/formDataHelpers/areaHelper.ts b/src/components/content/order/formDataHelpers/areaHelper.ts index 672c162eb..3dbdc78dc 100644 --- a/src/components/content/order/formDataHelpers/areaHelper.ts +++ b/src/components/content/order/formDataHelpers/areaHelper.ts @@ -71,24 +71,3 @@ export function convertAreasToTabs( } return areaTabs; } - -export function getAreaForRegion( - selectCsp: UserOrderableServiceVo.csp, - selectServiceHostingType: UserOrderableServiceVo.serviceHostingType, - userOrderableServices: UserOrderableServiceVo[], - inputRegion: string -) { - const areaList: Area[] = getAreasForSelectedVersionHostingTypeAndCsp( - selectCsp, - selectServiceHostingType, - userOrderableServices - ); - for (const area of areaList) { - for (const region of area.regions) { - if (region === inputRegion) { - return area.name; - } - } - } - return ''; -} diff --git a/src/components/content/order/formDataHelpers/billingHelper.ts b/src/components/content/order/formDataHelpers/billingHelper.ts index 808c21949..b59d91e32 100644 --- a/src/components/content/order/formDataHelpers/billingHelper.ts +++ b/src/components/content/order/formDataHelpers/billingHelper.ts @@ -12,7 +12,7 @@ export function getBilling( ): Billing { let billing: Billing = { // TODO Will be fixed in #1591 or #1592 - billingModes: ['monthly'], + billingModes: ['fixed'], }; if (versionMapper) { versionMapper.forEach((userOrderableServiceVo) => { diff --git a/src/components/content/order/formDataHelpers/flavorHelper.ts b/src/components/content/order/formDataHelpers/flavorHelper.ts index 873acff38..15d512cea 100644 --- a/src/components/content/order/formDataHelpers/flavorHelper.ts +++ b/src/components/content/order/formDataHelpers/flavorHelper.ts @@ -27,7 +27,8 @@ export function getFlavorList( const flavors: Flavor[] = []; if (flavorList.length > 0) { for (const flavor of flavorList) { - const flavorItem = { value: flavor.name, label: flavor.name, price: flavor.fixedPrice.toString() }; + // TODO will be fixed after #1597 is fixed + const flavorItem = { value: flavor.name, label: flavor.name, price: (20).toString() }; flavors.push(flavorItem); } } diff --git a/src/components/content/order/formDataHelpers/regionHelper.ts b/src/components/content/order/formDataHelpers/regionHelper.ts index 5d5c27a2b..f72dbf0d6 100644 --- a/src/components/content/order/formDataHelpers/regionHelper.ts +++ b/src/components/content/order/formDataHelpers/regionHelper.ts @@ -3,23 +3,22 @@ * SPDX-FileCopyrightText: Huawei Inc. */ -import { Region } from '../types/Region'; +import { RegionDropDownInfo } from '../types/RegionDropDownInfo'; import { UserOrderableServiceVo } from '../../../../xpanse-api/generated'; import { Area } from '../types/Area'; import { getAreasForSelectedVersionHostingTypeAndCsp } from './areaHelper'; - export function getRegionDropDownValues( selectCsp: UserOrderableServiceVo.csp, selectServiceHostingType: UserOrderableServiceVo.serviceHostingType, selectArea: string, userOrderableServices: UserOrderableServiceVo[] | undefined -): Region[] { +): RegionDropDownInfo[] { const areaList: Area[] = getAreasForSelectedVersionHostingTypeAndCsp( selectCsp, selectServiceHostingType, userOrderableServices ); - let regions: Region[] = []; + let regions: RegionDropDownInfo[] = []; if (areaList.length > 0) { regions = areaList .filter((v) => v.name === selectArea) diff --git a/src/components/content/order/migrate/ExportServiceData.tsx b/src/components/content/order/migrate/ExportServiceData.tsx index aae7438f9..fed319acc 100644 --- a/src/components/content/order/migrate/ExportServiceData.tsx +++ b/src/components/content/order/migrate/ExportServiceData.tsx @@ -20,7 +20,7 @@ export const ExportServiceData = ({ const next = () => { stepItem.status = 'finish'; - setCurrentMigrationStep(MigrationSteps.SelectADestination); + setCurrentMigrationStep(MigrationSteps.SelectMigrateTarget); }; return ( diff --git a/src/components/content/order/migrate/Migrate.tsx b/src/components/content/order/migrate/Migrate.tsx index 26caa0af0..69965ba64 100644 --- a/src/components/content/order/migrate/Migrate.tsx +++ b/src/components/content/order/migrate/Migrate.tsx @@ -7,7 +7,6 @@ import React, { useMemo, useState } from 'react'; import { DeployedServiceDetails, DeployRequest, - Region, ServiceCatalogService, UserOrderableServiceVo, VendorHostedDeployedServiceDetails, @@ -18,8 +17,11 @@ import { StepProps, Steps } from 'antd'; import { MigrateServiceSubmit } from './MigrateServiceSubmit'; import { ExportServiceData } from './ExportServiceData'; import { ImportServiceData } from './ImportServiceData'; +import { SelectMigrationTarget } from './SelectMigrationTarget'; import { useQuery } from '@tanstack/react-query'; import { MigrationSteps } from '../types/MigrationSteps'; +import { Tab } from 'rc-tabs/lib/interface'; +import { RegionDropDownInfo } from '../types/RegionDropDownInfo'; export const Migrate = ({ currentSelectedService, @@ -27,11 +29,23 @@ export const Migrate = ({ currentSelectedService: DeployedServiceDetails | VendorHostedDeployedServiceDetails; }): React.JSX.Element => { const [currentMigrationStep, setCurrentMigrationStep] = useState(MigrationSteps.ExportServiceData); + + const [target, setTarget] = useState(undefined); + + const [cspList, setCspList] = useState([]); const [selectCsp, setSelectCsp] = useState(currentSelectedService.csp); + + const [serviceHostTypes, setServiceHostTypes] = useState([]); const [selectServiceHostingType, setSelectServiceHostingType] = useState( currentSelectedService.serviceHostingType ); - const [selectRegion, setSelectRegion] = useState(currentSelectedService.deployRequest.region); + + const [areaList, setAreaList] = useState([]); + const [selectArea, setSelectArea] = useState(currentSelectedService.deployRequest.region.area); + + const [regionList, setRegionList] = useState([]); + const [selectRegion, setSelectRegion] = useState(currentSelectedService.deployRequest.region.name); + const [selectAvailabilityZones, setSelectAvailabilityZones] = useState>( currentSelectedService.deployRequest.availabilityZones ?? {} ); @@ -65,10 +79,7 @@ export const Migrate = ({ selectedServiceHostingType: UserOrderableServiceVo.serviceHostingType ) => { setSelectCsp(selectedCsp); - setSelectRegion({ - name: selectRegionName, - area: selectAreaName, - }); + setSelectRegion(selectRegionName); setSelectAvailabilityZones(selectAvailabilityZonesName); setSelectFlavor(selectedFlavor); setSelectServiceHostingType(selectedServiceHostingType); @@ -80,6 +91,11 @@ export const Migrate = ({ title: 'Export data', description: 'Export service data.', }, + { + title: 'Select a migrate target', + description: + 'Select between migrating between different regions within the same cloud or migrating between different clouds', + }, { title: 'Select a destination', description: 'Select a destination for migrating the existing deployment.', @@ -120,17 +136,45 @@ export const Migrate = ({ stepItem={items[MigrationSteps.ExportServiceData]} /> ); + case MigrationSteps.SelectMigrateTarget: + return ( + + ); case MigrationSteps.SelectADestination: return ( @@ -148,7 +192,7 @@ export const Migrate = ({ userOrderableServiceVoList={listOrderableServices.data ?? []} selectCsp={selectCsp} selectServiceHostingType={selectServiceHostingType} - region={selectRegion} + region={{ name: selectRegion, area: selectArea }} availabilityZones={selectAvailabilityZones} selectFlavor={selectFlavor} isEulaAccepted={isEulaAccepted} @@ -163,7 +207,7 @@ export const Migrate = ({ void; - currentCsp: UserOrderableServiceVo.csp; - currentRegion: string; + cspList: UserOrderableServiceVo.csp[]; + selectCsp: UserOrderableServiceVo.csp; + setSelectCsp: Dispatch>; + serviceHostTypes: UserOrderableServiceVo.serviceHostingType[]; + selectServiceHostType: UserOrderableServiceVo.serviceHostingType; + setSelectServiceHostingType: Dispatch>; + areaList: Tab[]; + selectArea: string; + setSelectArea: Dispatch>; + regionList: RegionDropDownInfo[]; + selectRegion: string; + setSelectRegion: Dispatch>; selectAvailabilityZones: Record; setSelectAvailabilityZones: Dispatch>>; currentFlavor: string; - currentServiceHostingType: UserOrderableServiceVo.serviceHostingType; + setCurrentMigrationStep: (currentMigrationStep: MigrationSteps) => void; stepItem: StepProps; }): React.JSX.Element => { const [form] = Form.useForm(); - const cspList = useMemo(() => { - const currentCspList: UserOrderableServiceVo.csp[] = []; - userOrderableServiceVoList.forEach((userOrderableServiceVo) => { - if (!currentCspList.includes(userOrderableServiceVo.csp)) { - currentCspList.push(userOrderableServiceVo.csp); - } - }); - return currentCspList; - }, [userOrderableServiceVoList]); - const [selectCsp, setSelectCsp] = useState(currentCsp); - let serviceHostTypes = getAvailableServiceHostingTypes(selectCsp, userOrderableServiceVoList); - const [selectServiceHostType, setSelectServiceHostType] = - useState(currentServiceHostingType); - - let areaList: Tab[] = convertAreasToTabs(selectCsp, selectServiceHostType, userOrderableServiceVoList); - const [selectArea, setSelectArea] = useState( - getAreaForRegion(selectCsp, selectServiceHostType, userOrderableServiceVoList, currentRegion) - ); - - let regionList: Region[] = getRegionDropDownValues( - selectCsp, - selectServiceHostType, - selectArea, - userOrderableServiceVoList - ); - const [selectRegion, setSelectRegion] = useState(currentRegion); - const getAvailabilityZonesForRegionQuery = useGetAvailabilityZonesForRegionQuery(selectCsp, selectRegion); const availabilityZoneConfigs: AvailabilityZoneConfig[] = getAvailabilityZoneRequirementsForAService( selectCsp, @@ -113,7 +105,7 @@ export const SelectDestination = ({ const prev = () => { stepItem.status = 'wait'; - setCurrentMigrationStep(MigrationSteps.ExportServiceData); + setCurrentMigrationStep(MigrationSteps.SelectMigrateTarget); }; const next = () => { @@ -123,7 +115,7 @@ export const SelectDestination = ({ }; const onChangeServiceHostingType = (serviceHostingType: UserOrderableServiceVo.serviceHostingType) => { - setSelectServiceHostType(serviceHostingType); + setSelectServiceHostingType(selectServiceHostType); updateSelectedParameters( selectCsp, selectArea, @@ -201,7 +193,7 @@ export const SelectDestination = ({ setSelectArea(areaList[0]?.key ?? ''); setSelectRegion(regionList[0]?.value ?? ''); setSelectFlavor(flavorList[0]?.value ?? ''); - setSelectServiceHostType(serviceHostTypes[0]); + setSelectServiceHostingType(serviceHostTypes[0]); updateSelectedParameters( csp, areaList[0]?.key ?? '', diff --git a/src/components/content/order/migrate/SelectMigrationTarget.tsx b/src/components/content/order/migrate/SelectMigrationTarget.tsx new file mode 100644 index 000000000..6e185b46a --- /dev/null +++ b/src/components/content/order/migrate/SelectMigrationTarget.tsx @@ -0,0 +1,176 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * SPDX-FileCopyrightText: Huawei Inc. + */ + +import { Button, Form, Radio, RadioChangeEvent, Space, StepProps } from 'antd'; +import React, { Dispatch, SetStateAction } from 'react'; +import { MigrationSteps } from '../types/MigrationSteps'; +import { + DeployedServiceDetails, + UserOrderableServiceVo, + VendorHostedDeployedServiceDetails, +} from '../../../../xpanse-api/generated'; +import { getAvailableServiceHostingTypes } from '../formDataHelpers/serviceHostingTypeHelper'; +import { Tab } from 'rc-tabs/lib/interface'; +import { convertAreasToTabs } from '../formDataHelpers/areaHelper'; +import { getRegionDropDownValues } from '../formDataHelpers/regionHelper'; +import { RegionDropDownInfo } from '../types/RegionDropDownInfo'; +export const SelectMigrationTarget = ({ + target, + setTarget, + currentSelectedService, + userOrderableServiceVoList, + setCspList, + setSelectCsp, + setServiceHostTypes, + setSelectServiceHostingType, + setAreaList, + setSelectArea, + setRegionList, + setSelectRegion, + setCurrentMigrationStep, + stepItem, +}: { + target: string | undefined; + setTarget: Dispatch>; + currentSelectedService: DeployedServiceDetails | VendorHostedDeployedServiceDetails; + userOrderableServiceVoList: UserOrderableServiceVo[]; + setCspList: Dispatch>; + setSelectCsp: Dispatch>; + setServiceHostTypes: Dispatch>; + setSelectServiceHostingType: Dispatch>; + setAreaList: Dispatch>; + setSelectArea: Dispatch>; + setRegionList: Dispatch>; + setSelectRegion: Dispatch>; + setCurrentMigrationStep: (currentMigrationStep: MigrationSteps) => void; + stepItem: StepProps; +}): React.JSX.Element => { + const [form] = Form.useForm(); + const onChange = (e: RadioChangeEvent) => { + setTarget(e.target.value as string); + const cspList: UserOrderableServiceVo.csp[] = getCspList(e); + setCspList(cspList); + setSelectCsp(cspList[0]); + const serviceHostTypes: UserOrderableServiceVo.serviceHostingType[] = getAvailableServiceHostingTypes( + cspList[0], + userOrderableServiceVoList + ); + setServiceHostTypes(serviceHostTypes); + setSelectServiceHostingType(serviceHostTypes[0]); + const areaList: Tab[] = convertAreasToTabs(cspList[0], serviceHostTypes[0], userOrderableServiceVoList); + setAreaList(areaList); + setSelectArea(areaList[0].key); + const regionList: RegionDropDownInfo[] = getRegionList( + e, + cspList[0], + serviceHostTypes[0], + areaList[0].key, + userOrderableServiceVoList + ); + setRegionList(regionList); + setSelectRegion(regionList.length > 0 ? regionList[0].value : currentSelectedService.deployRequest.region.name); + }; + + const getRegionList = ( + e: RadioChangeEvent, + selectCsp: UserOrderableServiceVo.csp, + selectServiceHostingType: UserOrderableServiceVo.serviceHostingType, + selectArea: string, + userOrderableServices: UserOrderableServiceVo[] | undefined + ) => { + let regions: RegionDropDownInfo[] = []; + const regionList: RegionDropDownInfo[] = getRegionDropDownValues( + selectCsp, + selectServiceHostingType, + selectArea, + userOrderableServices + ); + if (e.target.value === 'csp') { + regions = regionList; + } else { + regionList.forEach((region) => { + if (region.value !== currentSelectedService.deployRequest.region.name) { + regions.push(region); + } + }); + } + return regions; + }; + + const getCspList = (e: RadioChangeEvent) => { + const currentCspList: UserOrderableServiceVo.csp[] = []; + if (e.target.value === 'csp') { + userOrderableServiceVoList.forEach((userOrderableServiceVo) => { + if ( + !currentCspList.includes(userOrderableServiceVo.csp) && + userOrderableServiceVo.csp !== currentSelectedService.csp + ) { + currentCspList.push(userOrderableServiceVo.csp); + } + }); + } else { + currentCspList.push(currentSelectedService.csp); + } + return currentCspList; + }; + + const next = () => { + stepItem.status = 'finish'; + setCurrentMigrationStep(MigrationSteps.SelectADestination); + }; + + const prev = () => { + stepItem.status = 'wait'; + setCurrentMigrationStep(MigrationSteps.ExportServiceData); + }; + + return ( + <> + <> +
+
+
+
+ + + + Migrate service to a different region offered by the same cloud service + provider. + + Migrate service to a different cloud service provider. + + +
+
+
+ + + + +
+ + + + ); +}; diff --git a/src/components/content/order/scale/Scale.tsx b/src/components/content/order/scale/Scale.tsx index 253cb429a..4f03c151c 100644 --- a/src/components/content/order/scale/Scale.tsx +++ b/src/components/content/order/scale/Scale.tsx @@ -165,7 +165,8 @@ export const Scale = ({ {currentBilling ? ( <> - {flavor.fixedPrice} + {/* TODO Will be fixed after #1597 is fixed */} + {(20).toString()} {/* TODO Will be fixed in #1591 or #1592 */} {currentBilling.billingModes[0]} @@ -183,7 +184,8 @@ export const Scale = ({ {currentBilling ? ( <> - {flavor.fixedPrice} + {/* TODO Will be fixed after #1597 is fixed */} + {(20).toString()} {/* TODO Will be fixed in #1591 or #1592 */} {currentBilling.billingModes[0]} in #1591 or #1592 diff --git a/src/components/content/order/types/MigrationSteps.ts b/src/components/content/order/types/MigrationSteps.ts index 541a98daf..39be7fcd8 100644 --- a/src/components/content/order/types/MigrationSteps.ts +++ b/src/components/content/order/types/MigrationSteps.ts @@ -5,8 +5,10 @@ export enum MigrationSteps { ExportServiceData = 0, - SelectADestination = 1, - PrepareDeploymentParameters = 2, - ImportServiceData = 3, - MigrateService = 4, + + SelectMigrateTarget = 1, + SelectADestination = 2, + PrepareDeploymentParameters = 3, + ImportServiceData = 4, + MigrateService = 5, } diff --git a/src/components/content/order/types/Region.ts b/src/components/content/order/types/RegionDropDownInfo.ts similarity index 86% rename from src/components/content/order/types/Region.ts rename to src/components/content/order/types/RegionDropDownInfo.ts index 9a3a20854..5d5ef094b 100644 --- a/src/components/content/order/types/Region.ts +++ b/src/components/content/order/types/RegionDropDownInfo.ts @@ -6,7 +6,7 @@ /** * The regions inside Area */ -export interface Region { +export interface RegionDropDownInfo { /** * The name of the area */ diff --git a/src/styles/service_order.css b/src/styles/service_order.css index 4582c4c2b..45e88e175 100644 --- a/src/styles/service_order.css +++ b/src/styles/service_order.css @@ -26,6 +26,11 @@ padding: 0; background: #f2f2f2; } +.order-select-migrate-target { + display: flex; + margin-top: 2%; + margin-bottom: 3%; +} .order-param-item-row { display: table; diff --git a/src/xpanse-api/api.json b/src/xpanse-api/api.json index 04963fef4..63368d6b7 100644 --- a/src/xpanse-api/api.json +++ b/src/xpanse-api/api.json @@ -3,7 +3,7 @@ "info": { "title": "XpanseAPI", "description": "RESTful Services to interact with Xpanse runtime.", - "version": "@project.version@" + "version": "1.0.11-SNAPSHOT" }, "servers": [{ "url": "http://localhost:8080", "description": "Generated server url" }], "security": [{ "OAuth2Flow": [] }], @@ -12,6 +12,7 @@ "name": "CloudServiceProvider", "description": "APIs for cloud service provider to manage service templates." }, + { "name": "Webhook", "description": "Webhook APIs" }, { "name": "AuthManagement", "description": "APIs for user authentication and authorization." }, { "name": "CredentialsConfiguration", "description": "APIs Viewing Cloud Credentials Configuration" }, { "name": "CloudResources", "description": "API to view cloud resources by type" }, @@ -64,6 +65,10 @@ "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "401": { + "description": "Unauthorized", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -72,10 +77,6 @@ "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "401": { - "description": "Unauthorized", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -115,6 +116,10 @@ "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "401": { + "description": "Unauthorized", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -123,10 +128,6 @@ "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "401": { - "description": "Unauthorized", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -180,6 +181,10 @@ "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "401": { + "description": "Unauthorized", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -188,10 +193,6 @@ "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "401": { - "description": "Unauthorized", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -228,6 +229,10 @@ "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "401": { + "description": "Unauthorized", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -236,10 +241,6 @@ "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "401": { - "description": "Unauthorized", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -266,6 +267,10 @@ "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "401": { + "description": "Unauthorized", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -274,10 +279,6 @@ "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "401": { - "description": "Unauthorized", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -336,6 +337,10 @@ "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "401": { + "description": "Unauthorized", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -344,10 +349,6 @@ "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "401": { - "description": "Unauthorized", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -371,6 +372,10 @@ "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "401": { + "description": "Unauthorized", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -379,10 +384,6 @@ "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "401": { - "description": "Unauthorized", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -411,6 +412,10 @@ "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "401": { + "description": "Unauthorized", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -419,10 +424,6 @@ "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "401": { - "description": "Unauthorized", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -451,6 +452,10 @@ "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "401": { + "description": "Unauthorized", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -459,10 +464,6 @@ "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "401": { - "description": "Unauthorized", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -503,6 +504,10 @@ "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "401": { + "description": "Unauthorized", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -511,10 +516,6 @@ "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "401": { - "description": "Unauthorized", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -555,6 +556,10 @@ "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "401": { + "description": "Unauthorized", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -563,10 +568,6 @@ "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "401": { - "description": "Unauthorized", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -598,6 +599,10 @@ "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "401": { + "description": "Unauthorized", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -606,10 +611,6 @@ "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "401": { - "description": "Unauthorized", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -648,6 +649,10 @@ "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "401": { + "description": "Unauthorized", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -656,10 +661,6 @@ "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "401": { - "description": "Unauthorized", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -694,6 +695,10 @@ "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "401": { + "description": "Unauthorized", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -702,10 +707,6 @@ "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "401": { - "description": "Unauthorized", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -746,6 +747,10 @@ "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "401": { + "description": "Unauthorized", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -754,10 +759,6 @@ "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "401": { - "description": "Unauthorized", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -796,16 +797,16 @@ "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "422": { - "description": "Unprocessable Entity", + "401": { + "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "401": { - "description": "Unauthorized", + "422": { + "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, "403": { @@ -836,6 +837,10 @@ "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "401": { + "description": "Unauthorized", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -844,10 +849,6 @@ "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "401": { - "description": "Unauthorized", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -888,6 +889,10 @@ "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "401": { + "description": "Unauthorized", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -896,10 +901,6 @@ "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "401": { - "description": "Unauthorized", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -926,6 +927,10 @@ "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "401": { + "description": "Unauthorized", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -934,10 +939,6 @@ "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "401": { - "description": "Unauthorized", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -961,6 +962,10 @@ "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "401": { + "description": "Unauthorized", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -969,10 +974,6 @@ "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "401": { - "description": "Unauthorized", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -1011,6 +1012,10 @@ "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "401": { + "description": "Unauthorized", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -1019,10 +1024,6 @@ "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "401": { - "description": "Unauthorized", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -1047,6 +1048,10 @@ "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "401": { + "description": "Unauthorized", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -1055,10 +1060,6 @@ "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "401": { - "description": "Unauthorized", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -1112,6 +1113,10 @@ "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "401": { + "description": "Unauthorized", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -1120,10 +1125,6 @@ "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "401": { - "description": "Unauthorized", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -1160,6 +1161,10 @@ "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "401": { + "description": "Unauthorized", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -1168,10 +1173,6 @@ "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "401": { - "description": "Unauthorized", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -1198,6 +1199,10 @@ "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "401": { + "description": "Unauthorized", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -1206,10 +1211,6 @@ "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "401": { - "description": "Unauthorized", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -1268,6 +1269,10 @@ "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "401": { + "description": "Unauthorized", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -1276,10 +1281,6 @@ "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "401": { - "description": "Unauthorized", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -1380,6 +1381,10 @@ "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "401": { + "description": "Unauthorized", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -1388,10 +1393,6 @@ "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "401": { - "description": "Unauthorized", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -1426,6 +1427,10 @@ "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "401": { + "description": "Unauthorized", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -1434,10 +1439,6 @@ "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "401": { - "description": "Unauthorized", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -1467,6 +1468,10 @@ "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "401": { + "description": "Unauthorized", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -1475,10 +1480,6 @@ "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "401": { - "description": "Unauthorized", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -1578,6 +1579,10 @@ "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "401": { + "description": "Unauthorized", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -1586,10 +1591,6 @@ "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "401": { - "description": "Unauthorized", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -1624,6 +1625,10 @@ "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "401": { + "description": "Unauthorized", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -1632,10 +1637,6 @@ "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "401": { - "description": "Unauthorized", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -1672,16 +1673,16 @@ "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "422": { - "description": "Unprocessable Entity", + "401": { + "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "401": { - "description": "Unauthorized", + "422": { + "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, "403": { @@ -1720,6 +1721,10 @@ "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "401": { + "description": "Unauthorized", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -1728,10 +1733,6 @@ "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "401": { - "description": "Unauthorized", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -1765,6 +1766,10 @@ "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "401": { + "description": "Unauthorized", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -1773,10 +1778,6 @@ "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "401": { - "description": "Unauthorized", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -1832,6 +1833,10 @@ "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "401": { + "description": "Unauthorized", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -1840,10 +1845,6 @@ "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "401": { - "description": "Unauthorized", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -1877,6 +1878,10 @@ "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "401": { + "description": "Unauthorized", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -1885,10 +1890,56 @@ "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "403": { + "description": "Forbidden", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, + "502": { + "description": "Bad Gateway", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, + "200": { + "description": "OK", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserPolicy" } } } + } + } + } + }, + "/webhook/tofu-maker/rollback/{task_id}": { + "post": { + "tags": ["Webhook"], + "description": "Process the execution result after openTofu executes the command line to rollback service deployment.", + "operationId": "rollbackCallback", + "parameters": [ + { + "name": "task_id", + "in": "path", + "description": "task id", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OpenTofuResult" } } }, + "required": true + }, + "responses": { + "500": { + "description": "Internal Server Error", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "400": { + "description": "Bad Request", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, + "422": { + "description": "Unprocessable Entity", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -1897,10 +1948,430 @@ "description": "Bad Gateway", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "200": { - "description": "OK", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserPolicy" } } } + "200": { "description": "OK" } + } + } + }, + "/webhook/tofu-maker/purge/{task_id}": { + "post": { + "tags": ["Webhook"], + "description": "Process the execution result after openTofu executes the command line to purge service.", + "operationId": "purgeCallback", + "parameters": [ + { + "name": "task_id", + "in": "path", + "description": "task id", + "required": true, + "schema": { "type": "string" } } + ], + "requestBody": { + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OpenTofuResult" } } }, + "required": true + }, + "responses": { + "500": { + "description": "Internal Server Error", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, + "401": { + "description": "Unauthorized", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, + "400": { + "description": "Bad Request", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, + "422": { + "description": "Unprocessable Entity", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, + "403": { + "description": "Forbidden", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, + "502": { + "description": "Bad Gateway", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, + "200": { "description": "OK" } + } + } + }, + "/webhook/tofu-maker/modify/{task_id}": { + "post": { + "tags": ["Webhook"], + "description": "Process the execution result after openTofu executes the command line.", + "operationId": "modifyCallback", + "parameters": [ + { + "name": "task_id", + "in": "path", + "description": "task id", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OpenTofuResult" } } }, + "required": true + }, + "responses": { + "500": { + "description": "Internal Server Error", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, + "401": { + "description": "Unauthorized", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, + "400": { + "description": "Bad Request", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, + "422": { + "description": "Unprocessable Entity", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, + "403": { + "description": "Forbidden", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, + "502": { + "description": "Bad Gateway", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, + "200": { "description": "OK" } + } + } + }, + "/webhook/tofu-maker/destroy/{task_id}": { + "post": { + "tags": ["Webhook"], + "description": "Process the execution result after openTofu executes the command line.", + "operationId": "destroyCallback", + "parameters": [ + { + "name": "task_id", + "in": "path", + "description": "task id", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OpenTofuResult" } } }, + "required": true + }, + "responses": { + "500": { + "description": "Internal Server Error", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, + "401": { + "description": "Unauthorized", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, + "400": { + "description": "Bad Request", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, + "422": { + "description": "Unprocessable Entity", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, + "403": { + "description": "Forbidden", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, + "502": { + "description": "Bad Gateway", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, + "200": { "description": "OK" } + } + } + }, + "/webhook/tofu-maker/deploy/{task_id}": { + "post": { + "tags": ["Webhook"], + "description": "Process the execution result after openTofu executes the command line.", + "operationId": "deployCallback", + "parameters": [ + { + "name": "task_id", + "in": "path", + "description": "task id", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OpenTofuResult" } } }, + "required": true + }, + "responses": { + "500": { + "description": "Internal Server Error", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, + "401": { + "description": "Unauthorized", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, + "400": { + "description": "Bad Request", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, + "422": { + "description": "Unprocessable Entity", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, + "403": { + "description": "Forbidden", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, + "502": { + "description": "Bad Gateway", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, + "200": { "description": "OK" } + } + } + }, + "/webhook/terraform-boot/rollback/{task_id}": { + "post": { + "tags": ["Webhook"], + "description": "Process the execution result after terraform executes the command line to rollback service deployment.", + "operationId": "rollbackCallback_1", + "parameters": [ + { + "name": "task_id", + "in": "path", + "description": "task id", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TerraformResult" } } }, + "required": true + }, + "responses": { + "500": { + "description": "Internal Server Error", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, + "401": { + "description": "Unauthorized", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, + "400": { + "description": "Bad Request", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, + "422": { + "description": "Unprocessable Entity", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, + "403": { + "description": "Forbidden", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, + "502": { + "description": "Bad Gateway", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, + "200": { "description": "OK" } + } + } + }, + "/webhook/terraform-boot/purge/{task_id}": { + "post": { + "tags": ["Webhook"], + "description": "Process the execution result after terraform executes the command line to purge service.", + "operationId": "purgeCallback_1", + "parameters": [ + { + "name": "task_id", + "in": "path", + "description": "task id", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TerraformResult" } } }, + "required": true + }, + "responses": { + "500": { + "description": "Internal Server Error", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, + "401": { + "description": "Unauthorized", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, + "400": { + "description": "Bad Request", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, + "422": { + "description": "Unprocessable Entity", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, + "403": { + "description": "Forbidden", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, + "502": { + "description": "Bad Gateway", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, + "200": { "description": "OK" } + } + } + }, + "/webhook/terraform-boot/modify/{task_id}": { + "post": { + "tags": ["Webhook"], + "description": "Process the execution result after terraform executes the command line.", + "operationId": "modifyCallback_1", + "parameters": [ + { + "name": "task_id", + "in": "path", + "description": "task id", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TerraformResult" } } }, + "required": true + }, + "responses": { + "500": { + "description": "Internal Server Error", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, + "401": { + "description": "Unauthorized", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, + "400": { + "description": "Bad Request", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, + "422": { + "description": "Unprocessable Entity", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, + "403": { + "description": "Forbidden", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, + "502": { + "description": "Bad Gateway", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, + "200": { "description": "OK" } + } + } + }, + "/webhook/terraform-boot/destroy/{task_id}": { + "post": { + "tags": ["Webhook"], + "description": "Process the execution result after terraform executes the command line to destroy service.", + "operationId": "destroyCallback_1", + "parameters": [ + { + "name": "task_id", + "in": "path", + "description": "task id", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TerraformResult" } } }, + "required": true + }, + "responses": { + "500": { + "description": "Internal Server Error", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, + "401": { + "description": "Unauthorized", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, + "400": { + "description": "Bad Request", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, + "422": { + "description": "Unprocessable Entity", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, + "403": { + "description": "Forbidden", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, + "502": { + "description": "Bad Gateway", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, + "200": { "description": "OK" } + } + } + }, + "/webhook/terraform-boot/deploy/{task_id}": { + "post": { + "tags": ["Webhook"], + "description": "Process the execution result after terraform executes the command line.", + "operationId": "deployCallback_1", + "parameters": [ + { + "name": "task_id", + "in": "path", + "description": "task id", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TerraformResult" } } }, + "required": true + }, + "responses": { + "500": { + "description": "Internal Server Error", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, + "401": { + "description": "Unauthorized", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, + "400": { + "description": "Bad Request", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, + "422": { + "description": "Unprocessable Entity", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, + "403": { + "description": "Forbidden", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, + "502": { + "description": "Bad Gateway", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, + "200": { "description": "OK" } } } }, @@ -1923,6 +2394,10 @@ "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "401": { + "description": "Unauthorized", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -1931,10 +2406,6 @@ "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "401": { - "description": "Unauthorized", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -2013,6 +2484,10 @@ "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "401": { + "description": "Unauthorized", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -2021,10 +2496,6 @@ "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "401": { - "description": "Unauthorized", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -2066,6 +2537,10 @@ "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "401": { + "description": "Unauthorized", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -2074,10 +2549,6 @@ "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "401": { - "description": "Unauthorized", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -2183,16 +2654,16 @@ "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "400": { - "description": "Bad Request", + "401": { + "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "422": { - "description": "Unprocessable Entity", + "400": { + "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, - "401": { - "description": "Unauthorized", + }, + "422": { + "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, "403": { @@ -2236,6 +2707,10 @@ "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "401": { + "description": "Unauthorized", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -2244,10 +2719,6 @@ "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "401": { - "description": "Unauthorized", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -2353,6 +2824,10 @@ "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "401": { + "description": "Unauthorized", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -2361,10 +2836,6 @@ "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "401": { - "description": "Unauthorized", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -2406,6 +2877,10 @@ "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "401": { + "description": "Unauthorized", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -2414,10 +2889,6 @@ "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "401": { - "description": "Unauthorized", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -2456,6 +2927,10 @@ "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "401": { + "description": "Unauthorized", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -2464,10 +2939,6 @@ "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "401": { - "description": "Unauthorized", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -2549,6 +3020,10 @@ "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "401": { + "description": "Unauthorized", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -2557,10 +3032,6 @@ "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "401": { - "description": "Unauthorized", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -2590,6 +3061,10 @@ "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "401": { + "description": "Unauthorized", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -2598,10 +3073,6 @@ "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "401": { - "description": "Unauthorized", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -2627,6 +3098,10 @@ "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "401": { + "description": "Unauthorized", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -2635,10 +3110,6 @@ "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "401": { - "description": "Unauthorized", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -2738,6 +3209,10 @@ "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "401": { + "description": "Unauthorized", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -2746,10 +3221,6 @@ "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "401": { - "description": "Unauthorized", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -2791,6 +3262,10 @@ "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "401": { + "description": "Unauthorized", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -2799,10 +3274,6 @@ "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "401": { - "description": "Unauthorized", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -2879,6 +3350,10 @@ "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "401": { + "description": "Unauthorized", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -2887,10 +3362,6 @@ "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "401": { - "description": "Unauthorized", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -2946,6 +3417,10 @@ "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "401": { + "description": "Unauthorized", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -2954,10 +3429,6 @@ "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "401": { - "description": "Unauthorized", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -3016,6 +3487,10 @@ "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "401": { + "description": "Unauthorized", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -3024,10 +3499,6 @@ "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "401": { - "description": "Unauthorized", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -3091,6 +3562,10 @@ "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "401": { + "description": "Unauthorized", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -3099,10 +3574,6 @@ "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "401": { - "description": "Unauthorized", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -3156,6 +3627,10 @@ "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "401": { + "description": "Unauthorized", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -3164,10 +3639,6 @@ "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "401": { - "description": "Unauthorized", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -3270,6 +3741,10 @@ "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "401": { + "description": "Unauthorized", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -3278,10 +3753,6 @@ "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "401": { - "description": "Unauthorized", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -3329,6 +3800,10 @@ "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "401": { + "description": "Unauthorized", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -3337,10 +3812,6 @@ "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "401": { - "description": "Unauthorized", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -3369,6 +3840,10 @@ "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "401": { + "description": "Unauthorized", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -3377,10 +3852,6 @@ "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "401": { - "description": "Unauthorized", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -3422,6 +3893,10 @@ "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "401": { + "description": "Unauthorized", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -3430,10 +3905,6 @@ "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "401": { - "description": "Unauthorized", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -3461,6 +3932,10 @@ "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "401": { + "description": "Unauthorized", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -3469,10 +3944,6 @@ "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "401": { - "description": "Unauthorized", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -3496,6 +3967,10 @@ "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "401": { + "description": "Unauthorized", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -3504,10 +3979,6 @@ "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "401": { - "description": "Unauthorized", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -3534,6 +4005,10 @@ "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "401": { + "description": "Unauthorized", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -3542,10 +4017,6 @@ "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "401": { - "description": "Unauthorized", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -3596,6 +4067,7 @@ "Service Template Not Approved", "Service Template Already Reviewed", "Invalid Service Version", + "Invalid Service Flavors", "Service Deployment Not Found", "Resource Not Found", "Deployment Variable Invalid", @@ -3619,7 +4091,8 @@ "Service Migration Failed Exception", "Service Migration Not Found", "Service Locked", - "Eula not accepted", + "Eula Not Accepted", + "Service Flavor Downgrade Not Allowed", "Invalid Git Repo Details" ] }, @@ -3864,7 +4337,7 @@ "items": { "type": "string", "description": "Supported billing modes by the managed service", - "enum": ["yearly", "monthly", "daily", "hourly", "pay_per_use"] + "enum": ["fixed", "pay_per_use"] } } }, @@ -3957,16 +4430,21 @@ }, "description": "The deployment of the managed service" }, - "Flavors": { - "required": ["modificationImpact", "serviceFlavors"], + "FlavorsWithPrice": { + "required": ["isDowngradeAllowed", "modificationImpact", "serviceFlavors"], "type": "object", "properties": { "serviceFlavors": { "type": "array", "description": "The flavors of the managed service.", - "items": { "$ref": "#/components/schemas/ServiceFlavor" } + "items": { "$ref": "#/components/schemas/ServiceFlavorWithPrice" } }, - "modificationImpact": { "$ref": "#/components/schemas/ModificationImpact" } + "modificationImpact": { "$ref": "#/components/schemas/ModificationImpact" }, + "isDowngradeAllowed": { + "type": "boolean", + "description": "Whether the downgrading is allowed, default value: true." + }, + "downgradeAllowed": { "type": "boolean" } }, "description": "The flavors of the managed service" }, @@ -4026,7 +4504,7 @@ "icon": { "type": "string", "description": "The icon of the managed service" }, "cloudServiceProvider": { "$ref": "#/components/schemas/CloudServiceProvider" }, "deployment": { "$ref": "#/components/schemas/Deployment" }, - "flavors": { "$ref": "#/components/schemas/Flavors" }, + "flavors": { "$ref": "#/components/schemas/FlavorsWithPrice" }, "billing": { "$ref": "#/components/schemas/Billing" }, "serviceHostingType": { "type": "string", @@ -4037,6 +4515,37 @@ "eula": { "type": "string", "description": "End user license agreement content of the service." } } }, + "Price": { + "required": ["cost", "currency", "period"], + "type": "object", + "properties": { + "cost": { "type": "integer", "description": "The value of the cost.", "format": "int64" }, + "currency": { + "type": "string", + "description": "The currency of the cost.", + "enum": ["USD", "EUR", "CNY"] + }, + "period": { + "type": "string", + "description": "The period of the cost.", + "enum": ["yearly", "monthly", "daily", "hourly", "oneTime"] + } + }, + "description": "The listed price of the flavor of the manged service." + }, + "RatingMode": { + "required": ["isPriceOnlyForManagementLayer"], + "type": "object", + "properties": { + "fixedPrice": { "$ref": "#/components/schemas/Price" }, + "resourceUsage": { "$ref": "#/components/schemas/ResourceUsage" }, + "isPriceOnlyForManagementLayer": { + "type": "boolean", + "description": "Whether the price is only for management layer. Consumption of the workload resources will be billed additionally.." + } + }, + "description": "The pricing of the flavor" + }, "Region": { "required": ["area", "name"], "type": "object", @@ -4049,6 +4558,52 @@ }, "description": "The regions of the Cloud Service Provider" }, + "Resource": { + "required": ["count", "deployResourceKind"], + "type": "object", + "properties": { + "count": { "type": "integer", "description": "The count of the same resource.", "format": "int32" }, + "deployResourceKind": { + "type": "string", + "description": "The kind of the same resource.", + "enum": [ + "vm", + "container", + "publicIP", + "vpc", + "volume", + "unknown", + "security_group", + "security_group_rule", + "keypair", + "subnet" + ] + }, + "properties": { + "type": "object", + "additionalProperties": { + "type": "string", + "description": "The properties of the same resource." + }, + "description": "The properties of the same resource." + } + }, + "description": "The resources of the flavor of the manged service." + }, + "ResourceUsage": { + "required": ["resources"], + "type": "object", + "properties": { + "resources": { + "type": "array", + "description": "The resources of the flavor of the manged service.", + "items": { "$ref": "#/components/schemas/Resource" } + }, + "licensePrice": { "$ref": "#/components/schemas/Price" }, + "markUpPrice": { "$ref": "#/components/schemas/Price" } + }, + "description": "The resource usage of the flavor in the managed service." + }, "ScriptsRepo": { "required": ["branch", "repoUrl"], "type": "object", @@ -4062,17 +4617,31 @@ }, "description": "Deployment scripts hosted on a GIT repo. Either deployer or deployFromGitRepo must be provided." }, - "ServiceFlavor": { - "required": ["fixedPrice", "name", "properties"], + "ServiceFlavorWithPrice": { + "required": ["name", "pricing", "priority", "properties"], "type": "object", "properties": { "name": { "type": "string", "description": "The flavor name" }, - "fixedPrice": { "type": "integer", "description": "The price of the flavor", "format": "int32" }, "properties": { "type": "object", "additionalProperties": { "type": "string", "description": "The properties of the flavor" }, "description": "The properties of the flavor" - } + }, + "priority": { + "minimum": 1, + "type": "integer", + "description": "The priority of the flavor. The larger value means lower priority.", + "format": "int32" + }, + "features": { + "type": "array", + "description": "Important features and differentiators of the flavor.", + "items": { + "type": "string", + "description": "Important features and differentiators of the flavor." + } + }, + "pricing": { "$ref": "#/components/schemas/RatingMode" } }, "description": "The flavors of the managed service." }, @@ -4188,7 +4757,7 @@ "description": "The variables for the deployment, which will be passed to the deployer.", "items": { "$ref": "#/components/schemas/DeployVariable" } }, - "flavors": { "$ref": "#/components/schemas/Flavors" }, + "flavors": { "$ref": "#/components/schemas/FlavorsWithPrice" }, "billing": { "$ref": "#/components/schemas/Billing" }, "serviceHostingType": { "type": "string", @@ -4475,6 +5044,26 @@ } } }, + "OpenTofuResult": { + "type": "object", + "properties": { + "commandStdOutput": { "type": "string" }, + "commandStdError": { "type": "string" }, + "terraformState": { "type": "string" }, + "importantFileContentMap": { "type": "object", "additionalProperties": { "type": "string" } }, + "commandSuccessful": { "type": "boolean" } + } + }, + "TerraformResult": { + "type": "object", + "properties": { + "commandStdOutput": { "type": "string" }, + "commandStdError": { "type": "string" }, + "terraformState": { "type": "string" }, + "importantFileContentMap": { "type": "object", "additionalProperties": { "type": "string" } }, + "commandSuccessful": { "type": "boolean" } + } + }, "WorkFlowTask": { "required": [ "businessKey", @@ -5006,6 +5595,33 @@ } } }, + "ServiceFlavor": { + "required": ["name", "priority", "properties"], + "type": "object", + "properties": { + "name": { "type": "string", "description": "The flavor name" }, + "properties": { + "type": "object", + "additionalProperties": { "type": "string", "description": "The properties of the flavor" }, + "description": "The properties of the flavor" + }, + "priority": { + "minimum": 1, + "type": "integer", + "description": "The priority of the flavor. The larger value means lower priority.", + "format": "int32" + }, + "features": { + "type": "array", + "description": "Important features and differentiators of the flavor.", + "items": { + "type": "string", + "description": "Important features and differentiators of the flavor." + } + } + }, + "description": "The flavors of the orderable service." + }, "UserOrderableServiceVo": { "required": [ "billing", diff --git a/src/xpanse-api/generated/core/OpenAPI.ts b/src/xpanse-api/generated/core/OpenAPI.ts index 4aa70df79..d6c9ec6d8 100644 --- a/src/xpanse-api/generated/core/OpenAPI.ts +++ b/src/xpanse-api/generated/core/OpenAPI.ts @@ -26,7 +26,7 @@ export type OpenAPIConfig = { export const OpenAPI: OpenAPIConfig = { BASE: 'http://localhost:8080', - VERSION: '@project.version@', + VERSION: '1.0.11-SNAPSHOT', WITH_CREDENTIALS: false, CREDENTIALS: 'include', TOKEN: undefined, diff --git a/src/xpanse-api/generated/index.ts b/src/xpanse-api/generated/index.ts index 6f37eb480..3ebc3b778 100644 --- a/src/xpanse-api/generated/index.ts +++ b/src/xpanse-api/generated/index.ts @@ -28,7 +28,7 @@ export { DeployRequest } from './models/DeployRequest'; export { DeployResource } from './models/DeployResource'; export { DeployVariable } from './models/DeployVariable'; export { DeployVariableKind } from './models/DeployVariableKind'; -export type { Flavors } from './models/Flavors'; +export type { FlavorsWithPrice } from './models/FlavorsWithPrice'; export type { Link } from './models/Link'; export { Metric } from './models/Metric'; export { MetricItem } from './models/MetricItem'; @@ -36,11 +36,17 @@ export { MigrateRequest } from './models/MigrateRequest'; export type { ModificationImpact } from './models/ModificationImpact'; export type { ModifyRequest } from './models/ModifyRequest'; export { Ocl } from './models/Ocl'; +export type { OpenTofuResult } from './models/OpenTofuResult'; +export { Price } from './models/Price'; +export type { RatingMode } from './models/RatingMode'; export type { Region } from './models/Region'; +export { Resource } from './models/Resource'; +export type { ResourceUsage } from './models/ResourceUsage'; export { Response } from './models/Response'; export { ReviewRegistrationRequest } from './models/ReviewRegistrationRequest'; export type { ScriptsRepo } from './models/ScriptsRepo'; export type { ServiceFlavor } from './models/ServiceFlavor'; +export type { ServiceFlavorWithPrice } from './models/ServiceFlavorWithPrice'; export type { ServiceLockConfig } from './models/ServiceLockConfig'; export { ServiceMigrationDetails } from './models/ServiceMigrationDetails'; export type { ServicePolicy } from './models/ServicePolicy'; @@ -49,6 +55,7 @@ export type { ServicePolicyUpdateRequest } from './models/ServicePolicyUpdateReq export type { ServiceProviderContactDetails } from './models/ServiceProviderContactDetails'; export { ServiceTemplateDetailVo } from './models/ServiceTemplateDetailVo'; export { SystemStatus } from './models/SystemStatus'; +export type { TerraformResult } from './models/TerraformResult'; export type { TokenResponse } from './models/TokenResponse'; export { UserOrderableServiceVo } from './models/UserOrderableServiceVo'; export { UserPolicy } from './models/UserPolicy'; diff --git a/src/xpanse-api/generated/models/Billing.ts b/src/xpanse-api/generated/models/Billing.ts index ff8d1b3b0..f82489689 100644 --- a/src/xpanse-api/generated/models/Billing.ts +++ b/src/xpanse-api/generated/models/Billing.ts @@ -14,5 +14,5 @@ export type Billing = { /** * Supported billing modes by the managed service */ - billingModes: Array<'yearly' | 'monthly' | 'daily' | 'hourly' | 'pay_per_use'>; + billingModes: Array<'fixed' | 'pay_per_use'>; }; diff --git a/src/xpanse-api/generated/models/Flavors.ts b/src/xpanse-api/generated/models/FlavorsWithPrice.ts similarity index 59% rename from src/xpanse-api/generated/models/Flavors.ts rename to src/xpanse-api/generated/models/FlavorsWithPrice.ts index a4974004d..d80bf29e8 100644 --- a/src/xpanse-api/generated/models/Flavors.ts +++ b/src/xpanse-api/generated/models/FlavorsWithPrice.ts @@ -8,14 +8,19 @@ /* tslint:disable */ /* eslint-disable */ import type { ModificationImpact } from './ModificationImpact'; -import type { ServiceFlavor } from './ServiceFlavor'; +import type { ServiceFlavorWithPrice } from './ServiceFlavorWithPrice'; /** * The flavors of the managed service */ -export type Flavors = { +export type FlavorsWithPrice = { /** * The flavors of the managed service. */ - serviceFlavors: Array; + serviceFlavors: Array; modificationImpact: ModificationImpact; + /** + * Whether the downgrading is allowed, default value: true. + */ + isDowngradeAllowed: boolean; + downgradeAllowed?: boolean; }; diff --git a/src/xpanse-api/generated/models/Ocl.ts b/src/xpanse-api/generated/models/Ocl.ts index 191527c90..788645488 100644 --- a/src/xpanse-api/generated/models/Ocl.ts +++ b/src/xpanse-api/generated/models/Ocl.ts @@ -10,7 +10,7 @@ import type { Billing } from './Billing'; import type { CloudServiceProvider } from './CloudServiceProvider'; import type { Deployment } from './Deployment'; -import type { Flavors } from './Flavors'; +import type { FlavorsWithPrice } from './FlavorsWithPrice'; import type { ServiceProviderContactDetails } from './ServiceProviderContactDetails'; export type Ocl = { /** @@ -43,7 +43,7 @@ export type Ocl = { icon: string; cloudServiceProvider: CloudServiceProvider; deployment: Deployment; - flavors: Flavors; + flavors: FlavorsWithPrice; billing: Billing; /** * Defines which cloud service account is used for deploying cloud resources. diff --git a/src/xpanse-api/generated/models/Price.ts b/src/xpanse-api/generated/models/Price.ts new file mode 100644 index 000000000..8b3b046b9 --- /dev/null +++ b/src/xpanse-api/generated/models/Price.ts @@ -0,0 +1,46 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * SPDX-FileCopyrightText: Huawei Inc. + */ + +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +/** + * The listed price of the flavor of the manged service. + */ +export type Price = { + /** + * The value of the cost. + */ + cost: number; + /** + * The currency of the cost. + */ + currency: Price.currency; + /** + * The period of the cost. + */ + period: Price.period; +}; +export namespace Price { + /** + * The currency of the cost. + */ + export enum currency { + USD = 'USD', + EUR = 'EUR', + CNY = 'CNY', + } + /** + * The period of the cost. + */ + export enum period { + YEARLY = 'yearly', + MONTHLY = 'monthly', + DAILY = 'daily', + HOURLY = 'hourly', + ONE_TIME = 'oneTime', + } +} diff --git a/src/xpanse-api/generated/models/RatingMode.ts b/src/xpanse-api/generated/models/RatingMode.ts new file mode 100644 index 000000000..a58af33f1 --- /dev/null +++ b/src/xpanse-api/generated/models/RatingMode.ts @@ -0,0 +1,22 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * SPDX-FileCopyrightText: Huawei Inc. + */ + +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { Price } from './Price'; +import type { ResourceUsage } from './ResourceUsage'; +/** + * The pricing of the flavor + */ +export type RatingMode = { + fixedPrice?: Price; + resourceUsage?: ResourceUsage; + /** + * Whether the price is only for management layer. Consumption of the workload resources will be billed additionally.. + */ + isPriceOnlyForManagementLayer: boolean; +}; diff --git a/src/xpanse-api/generated/models/Resource.ts b/src/xpanse-api/generated/models/Resource.ts new file mode 100644 index 000000000..6f8205911 --- /dev/null +++ b/src/xpanse-api/generated/models/Resource.ts @@ -0,0 +1,43 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * SPDX-FileCopyrightText: Huawei Inc. + */ + +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +/** + * The resources of the flavor of the manged service. + */ +export type Resource = { + /** + * The count of the same resource. + */ + count: number; + /** + * The kind of the same resource. + */ + deployResourceKind: Resource.deployResourceKind; + /** + * The properties of the same resource. + */ + properties?: Record; +}; +export namespace Resource { + /** + * The kind of the same resource. + */ + export enum deployResourceKind { + VM = 'vm', + CONTAINER = 'container', + PUBLIC_IP = 'publicIP', + VPC = 'vpc', + VOLUME = 'volume', + UNKNOWN = 'unknown', + SECURITY_GROUP = 'security_group', + SECURITY_GROUP_RULE = 'security_group_rule', + KEYPAIR = 'keypair', + SUBNET = 'subnet', + } +} diff --git a/src/xpanse-api/generated/models/ResourceUsage.ts b/src/xpanse-api/generated/models/ResourceUsage.ts new file mode 100644 index 000000000..970243dff --- /dev/null +++ b/src/xpanse-api/generated/models/ResourceUsage.ts @@ -0,0 +1,22 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * SPDX-FileCopyrightText: Huawei Inc. + */ + +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { Price } from './Price'; +import type { Resource } from './Resource'; +/** + * The resource usage of the flavor in the managed service. + */ +export type ResourceUsage = { + /** + * The resources of the flavor of the manged service. + */ + resources: Array; + licensePrice?: Price; + markUpPrice?: Price; +}; diff --git a/src/xpanse-api/generated/models/Response.ts b/src/xpanse-api/generated/models/Response.ts index fa995e8ae..2fef7ccab 100644 --- a/src/xpanse-api/generated/models/Response.ts +++ b/src/xpanse-api/generated/models/Response.ts @@ -50,6 +50,7 @@ export namespace Response { SERVICE_TEMPLATE_NOT_APPROVED = 'Service Template Not Approved', SERVICE_TEMPLATE_ALREADY_REVIEWED = 'Service Template Already Reviewed', INVALID_SERVICE_VERSION = 'Invalid Service Version', + INVALID_SERVICE_FLAVORS = 'Invalid Service Flavors', SERVICE_DEPLOYMENT_NOT_FOUND = 'Service Deployment Not Found', RESOURCE_NOT_FOUND = 'Resource Not Found', DEPLOYMENT_VARIABLE_INVALID = 'Deployment Variable Invalid', @@ -73,7 +74,8 @@ export namespace Response { SERVICE_MIGRATION_FAILED_EXCEPTION = 'Service Migration Failed Exception', SERVICE_MIGRATION_NOT_FOUND = 'Service Migration Not Found', SERVICE_LOCKED = 'Service Locked', - EULA_NOT_ACCEPTED = 'Eula not accepted', + EULA_NOT_ACCEPTED = 'Eula Not Accepted', + SERVICE_FLAVOR_DOWNGRADE_NOT_ALLOWED = 'Service Flavor Downgrade Not Allowed', INVALID_GIT_REPO_DETAILS = 'Invalid Git Repo Details', } } diff --git a/src/xpanse-api/generated/models/ServiceFlavor.ts b/src/xpanse-api/generated/models/ServiceFlavor.ts index 05f62eb96..6e83161ca 100644 --- a/src/xpanse-api/generated/models/ServiceFlavor.ts +++ b/src/xpanse-api/generated/models/ServiceFlavor.ts @@ -8,19 +8,23 @@ /* tslint:disable */ /* eslint-disable */ /** - * The flavors of the managed service. + * The flavors of the orderable service. */ export type ServiceFlavor = { /** * The flavor name */ name: string; - /** - * The price of the flavor - */ - fixedPrice: number; /** * The properties of the flavor */ properties: Record; + /** + * The priority of the flavor. The larger value means lower priority. + */ + priority: number; + /** + * Important features and differentiators of the flavor. + */ + features?: Array; }; diff --git a/src/xpanse-api/generated/models/ServiceFlavorWithPrice.ts b/src/xpanse-api/generated/models/ServiceFlavorWithPrice.ts new file mode 100644 index 000000000..78f091766 --- /dev/null +++ b/src/xpanse-api/generated/models/ServiceFlavorWithPrice.ts @@ -0,0 +1,32 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * SPDX-FileCopyrightText: Huawei Inc. + */ + +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { RatingMode } from './RatingMode'; +/** + * The flavors of the managed service. + */ +export type ServiceFlavorWithPrice = { + /** + * The flavor name + */ + name: string; + /** + * The properties of the flavor + */ + properties: Record; + /** + * The priority of the flavor. The larger value means lower priority. + */ + priority: number; + /** + * Important features and differentiators of the flavor. + */ + features?: Array; + pricing: RatingMode; +}; diff --git a/src/xpanse-api/generated/models/ServiceTemplateDetailVo.ts b/src/xpanse-api/generated/models/ServiceTemplateDetailVo.ts index bbb2edb5b..abcd31b95 100644 --- a/src/xpanse-api/generated/models/ServiceTemplateDetailVo.ts +++ b/src/xpanse-api/generated/models/ServiceTemplateDetailVo.ts @@ -10,7 +10,7 @@ import type { Billing } from './Billing'; import type { Deployment } from './Deployment'; import type { DeployVariable } from './DeployVariable'; -import type { Flavors } from './Flavors'; +import type { FlavorsWithPrice } from './FlavorsWithPrice'; import type { Link } from './Link'; import type { Region } from './Region'; import type { ServiceProviderContactDetails } from './ServiceProviderContactDetails'; @@ -56,7 +56,7 @@ export type ServiceTemplateDetailVo = { * The variables for the deployment, which will be passed to the deployer. */ variables: Array; - flavors: Flavors; + flavors: FlavorsWithPrice; billing: Billing; /** * Defines which cloud service account is used for deploying cloud resources.