From 911402f9b1a15622be990c054c8f0c1099720fdc Mon Sep 17 00:00:00 2001 From: WangLiNaruto Date: Thu, 5 Dec 2024 19:58:13 +0800 Subject: [PATCH] Changes to ISV view in UI to show current status of the service template --- .../catalog/services/delete/DeleteService.tsx | 12 +- .../services/details/AvailableInCatalog.tsx | 41 + .../services/details/ServiceDetail.tsx | 13 +- .../services/details/ServiceProvider.tsx | 14 +- .../re-register/ReRegisterService.tsx | 14 +- .../services/unregister/UnregisterService.tsx | 10 +- .../catalog/services/update/UpdateService.tsx | 31 +- src/styles/register.module.css | 8 +- src/xpanse-api/api.json | 2031 +++++++++-------- src/xpanse-api/generated/sdk.gen.ts | 30 + src/xpanse-api/generated/types.gen.ts | 14 +- 11 files changed, 1202 insertions(+), 1016 deletions(-) create mode 100644 src/components/content/catalog/services/details/AvailableInCatalog.tsx diff --git a/src/components/content/catalog/services/delete/DeleteService.tsx b/src/components/content/catalog/services/delete/DeleteService.tsx index a9cab8fed..09d32036b 100644 --- a/src/components/content/catalog/services/delete/DeleteService.tsx +++ b/src/components/content/catalog/services/delete/DeleteService.tsx @@ -7,21 +7,19 @@ import { CloseCircleOutlined } from '@ant-design/icons'; import { Button, Popconfirm } from 'antd'; import React from 'react'; import catalogStyles from '../../../../../styles/catalog.module.css'; -import { serviceTemplateRegistrationState } from '../../../../../xpanse-api/generated'; -import { useGetReRegisterMutationState } from '../re-register/ReRegisterMutation'; +import { ServiceTemplateDetailVo } from '../../../../../xpanse-api/generated'; import { useDeleteRequest } from './DeleteServiceMutation'; function DeleteService({ id, setIsViewDisabled, - serviceRegistrationStatus, + activeServiceDetail, }: { id: string; setIsViewDisabled: (isViewDisabled: boolean) => void; - serviceRegistrationStatus: serviceTemplateRegistrationState; + activeServiceDetail: ServiceTemplateDetailVo; }): React.JSX.Element { const deleteRequest = useDeleteRequest(id); - const reRegisterState = useGetReRegisterMutationState(id); const deleteService = () => { setIsViewDisabled(true); @@ -45,8 +43,8 @@ function DeleteService({ className={catalogStyles.catalogManageBtnClass} disabled={ deleteRequest.isSuccess || - (reRegisterState.length > 0 && reRegisterState[0].status === 'success') || - serviceRegistrationStatus !== serviceTemplateRegistrationState.IN_REVIEW + activeServiceDetail.availableInCatalog || + activeServiceDetail.serviceTemplateRegistrationState === 'approved' } > Delete diff --git a/src/components/content/catalog/services/details/AvailableInCatalog.tsx b/src/components/content/catalog/services/details/AvailableInCatalog.tsx new file mode 100644 index 000000000..88e0e8a0d --- /dev/null +++ b/src/components/content/catalog/services/details/AvailableInCatalog.tsx @@ -0,0 +1,41 @@ +import { CheckCircleOutlined, CloseCircleOutlined, StopOutlined } from '@ant-design/icons'; +import { Descriptions, Tag } from 'antd'; +import React from 'react'; +import { ServiceTemplateDetailVo } from '../../../../../xpanse-api/generated'; + +const AvailableInCatalog: React.FC<{ serviceDetails: ServiceTemplateDetailVo }> = ({ serviceDetails }) => { + return ( + + {(serviceDetails.serviceTemplateRegistrationState === 'in-review' || + serviceDetails.serviceTemplateRegistrationState === 'approved') && + !serviceDetails.availableInCatalog ? ( + } color='#e67300'> + false(review inProgress) + + ) : serviceDetails.serviceTemplateRegistrationState === 'approved' && serviceDetails.availableInCatalog ? ( + } color='#87d068'> + true + + ) : serviceDetails.serviceTemplateRegistrationState === 'approved' && + !serviceDetails.availableInCatalog && + !serviceDetails.isUpdatePending ? ( + } color='#cd201f'> + false + + ) : serviceDetails.serviceTemplateRegistrationState === 'rejected' && + !serviceDetails.availableInCatalog && + serviceDetails.isUpdatePending ? ( + } color='#e67300'> + false(review inProgress) + + ) : serviceDetails.serviceTemplateRegistrationState === 'approved' && + serviceDetails.availableInCatalog && + serviceDetails.isUpdatePending ? ( + } color='#87d068'> + true + + ) : null} + + ); +}; +export default AvailableInCatalog; diff --git a/src/components/content/catalog/services/details/ServiceDetail.tsx b/src/components/content/catalog/services/details/ServiceDetail.tsx index 8a800ff1c..a642501e2 100644 --- a/src/components/content/catalog/services/details/ServiceDetail.tsx +++ b/src/components/content/catalog/services/details/ServiceDetail.tsx @@ -15,11 +15,9 @@ import { DeployedService, serviceDeploymentState, ServiceTemplateDetailVo, - serviceTemplateRegistrationState, } from '../../../../../xpanse-api/generated'; import { useCurrentUserRoleStore } from '../../../../layouts/header/useCurrentRoleStore'; import { reportsRoute } from '../../../../utils/constants'; -import { ServiceTemplateRegisterStatus } from '../../../common/catalog/ServiceTemplateRegisterStatus.tsx'; import { ApiDoc } from '../../../common/doc/ApiDoc'; import { AgreementText } from '../../../common/ocl/AgreementText'; import { BillingText } from '../../../common/ocl/BillingText'; @@ -30,6 +28,7 @@ import { RegionText } from '../../../common/ocl/RegionText.tsx'; import useDeployedServicesByIsvQuery from '../../../deployedServices/myServices/query/useDeployedServiceByIsvQuery'; import DeploymentManagement from '../../../deployment/DeploymentManagement'; import ServiceConfigManagement from '../../../serviceConfigurationManage/ServiceConfigManagement'; +import AvailableInCatalog from './AvailableInCatalog'; import { ShowIcon } from './ShowIcon'; function ServiceDetail({ serviceDetails }: { serviceDetails: ServiceTemplateDetailVo }): React.JSX.Element { @@ -113,6 +112,9 @@ function ServiceDetail({ serviceDetails }: { serviceDetails: ServiceTemplateDeta {serviceDetails.category} {serviceDetails.version} + + + {serviceDetails.namespace} @@ -121,13 +123,6 @@ function ServiceDetail({ serviceDetails }: { serviceDetails: ServiceTemplateDeta {serviceDetails.createTime} {serviceDetails.lastModifiedTime} - - - {serviceDetails.deployment.credentialType} diff --git a/src/components/content/catalog/services/details/ServiceProvider.tsx b/src/components/content/catalog/services/details/ServiceProvider.tsx index 2b6e0a4bd..c3c60ae59 100644 --- a/src/components/content/catalog/services/details/ServiceProvider.tsx +++ b/src/components/content/catalog/services/details/ServiceProvider.tsx @@ -209,28 +209,22 @@ function ServiceProvider({ id={activeServiceDetail.serviceTemplateId} category={category} isViewDisabled={isViewDisabled} + activeServiceDetail={activeServiceDetail} />

diff --git a/src/components/content/catalog/services/re-register/ReRegisterService.tsx b/src/components/content/catalog/services/re-register/ReRegisterService.tsx index 8f0076934..46936581b 100644 --- a/src/components/content/catalog/services/re-register/ReRegisterService.tsx +++ b/src/components/content/catalog/services/re-register/ReRegisterService.tsx @@ -8,21 +8,17 @@ import { UseMutationResult } from '@tanstack/react-query'; import { Button, Popconfirm } from 'antd'; import React from 'react'; import catalogStyles from '../../../../../styles/catalog.module.css'; -import { ServiceTemplateDetailVo, serviceTemplateRegistrationState } from '../../../../../xpanse-api/generated'; -import { useGetDeleteMutationState } from '../delete/DeleteServiceMutation'; +import { ServiceTemplateDetailVo } from '../../../../../xpanse-api/generated'; function ReRegisterService({ - id, setIsViewDisabled, reRegisterRequest, - serviceRegistrationStatus, + activeServiceDetail, }: { - id: string; setIsViewDisabled: (isViewDisabled: boolean) => void; reRegisterRequest: UseMutationResult; - serviceRegistrationStatus: serviceTemplateRegistrationState; + activeServiceDetail: ServiceTemplateDetailVo; }): React.JSX.Element { - const deleteState = useGetDeleteMutationState(id); const reRegister = () => { setIsViewDisabled(true); reRegisterRequest.mutate(); @@ -45,8 +41,8 @@ function ReRegisterService({ className={catalogStyles.catalogManageBtnClass} disabled={ reRegisterRequest.isSuccess || - (deleteState.length > 0 && deleteState[0].status === 'success') || - serviceRegistrationStatus !== serviceTemplateRegistrationState.IN_REVIEW + activeServiceDetail.availableInCatalog || + activeServiceDetail.serviceTemplateRegistrationState !== 'approved' } > Re-register diff --git a/src/components/content/catalog/services/unregister/UnregisterService.tsx b/src/components/content/catalog/services/unregister/UnregisterService.tsx index fb1005ab5..1212db280 100644 --- a/src/components/content/catalog/services/unregister/UnregisterService.tsx +++ b/src/components/content/catalog/services/unregister/UnregisterService.tsx @@ -7,17 +7,16 @@ import { MinusCircleOutlined } from '@ant-design/icons'; import { Button, Popconfirm } from 'antd'; import React from 'react'; import catalogStyles from '../../../../../styles/catalog.module.css'; -import { serviceTemplateRegistrationState } from '../../../../../xpanse-api/generated'; import { useUnregisterRequest } from './UnregisterMutation'; function UnregisterService({ id, setIsViewDisabled, - serviceRegistrationStatus, + availableInCatalog, }: { id: string; setIsViewDisabled: (isViewDisabled: boolean) => void; - serviceRegistrationStatus: serviceTemplateRegistrationState; + availableInCatalog: boolean; }): React.JSX.Element { const unregisterRequest = useUnregisterRequest(id); @@ -41,10 +40,7 @@ function UnregisterService({ icon={} type='primary' className={catalogStyles.catalogManageBtnClass} - disabled={ - unregisterRequest.isSuccess || - serviceRegistrationStatus === serviceTemplateRegistrationState.IN_REVIEW - } + disabled={unregisterRequest.isSuccess || !availableInCatalog} > Unregister diff --git a/src/components/content/catalog/services/update/UpdateService.tsx b/src/components/content/catalog/services/update/UpdateService.tsx index ee0bccc9a..68402ef86 100644 --- a/src/components/content/catalog/services/update/UpdateService.tsx +++ b/src/components/content/catalog/services/update/UpdateService.tsx @@ -5,7 +5,8 @@ import { AppstoreAddOutlined, CloudUploadOutlined, EditOutlined, UploadOutlined } from '@ant-design/icons'; import { useMutation, useQueryClient } from '@tanstack/react-query'; -import { Button, Col, Modal, Row, Upload, UploadFile } from 'antd'; +import { Button, Checkbox, Col, Form, Modal, Row, Space, Upload, UploadFile } from 'antd'; +import { CheckboxChangeEvent } from 'antd/es/checkbox'; import { RcFile } from 'antd/es/upload'; import React, { useRef, useState } from 'react'; import appStyles from '../../../../../styles/app.module.css'; @@ -19,6 +20,7 @@ import { ErrorResponse, Ocl, ServiceTemplateChangeInfo, + ServiceTemplateDetailVo, serviceTemplateRegistrationState, update, type UpdateData, @@ -35,10 +37,12 @@ function UpdateService({ id, category, isViewDisabled, + activeServiceDetail, }: { id: string; category: category; isViewDisabled: boolean; + activeServiceDetail: ServiceTemplateDetailVo; }): React.JSX.Element { const ocl = useRef(undefined); const files = useRef([]); @@ -51,12 +55,13 @@ function UpdateService({ const [yamlSyntaxValidationStatus, setYamlSyntaxValidationStatus] = useState('notStarted'); const [oclValidationStatus, setOclValidationStatus] = useState('notStarted'); const [isModalOpen, setIsModalOpen] = useState(false); + const [isRemoveServiceTemplateUntilApproved, setIsRemoveServiceTemplateUntilApproved] = useState(true); const queryClient = useQueryClient(); const updateServiceRequest = useMutation({ mutationFn: (ocl: Ocl) => { const data: UpdateData = { id: id, - isRemoveServiceTemplateUntilApproved: true, + isRemoveServiceTemplateUntilApproved: isRemoveServiceTemplateUntilApproved, requestBody: ocl, }; return update(data); @@ -165,6 +170,10 @@ function UpdateService({ return false; }; + const onChange = (e: CheckboxChangeEvent) => { + setIsRemoveServiceTemplateUntilApproved(e.target.checked); + }; + return (
@@ -202,6 +211,22 @@ function UpdateService({ retryRequest={retryRequest} /> ) : null} +
+ + + + + + + +
Required role: admin or user
", - "operationId": "getComputeResourceInventoryOfService", + "description": "Get service template details by service id.
Required role: admin or isv or user
", + "operationId": "getOrderableServiceDetailsByServiceId", "parameters": [ { "name": "serviceId", "in": "path", - "description": "Id of the deployed service", + "description": "The id of deployed service.", "required": true, "schema": { "type": "string" @@ -4737,6 +4737,26 @@ } } }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "422": { + "description": "Unprocessable Entity", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, "502": { "description": "Bad Gateway", "content": { @@ -4747,6 +4767,16 @@ } } }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, "401": { "description": "Unauthorized", "content": { @@ -4757,6 +4787,56 @@ } } }, + "408": { + "description": "Request Timeout", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserOrderableServiceVo" + } + } + } + } + } + } + }, + "/xpanse/services/{serviceId}/resources/compute": { + "get": { + "tags": ["Service"], + "description": "List compute resources of the service.
Required role: admin or user
", + "operationId": "getComputeResourceInventoryOfService", + "parameters": [ + { + "name": "serviceId", + "in": "path", + "description": "Id of the deployed service", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "500": { + "description": "Internal Server Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, "400": { "description": "Bad Request", "content": { @@ -4777,6 +4857,16 @@ } } }, + "502": { + "description": "Bad Gateway", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, "403": { "description": "Forbidden", "content": { @@ -4787,6 +4877,16 @@ } } }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, "408": { "description": "Request Timeout", "content": { @@ -4874,8 +4974,8 @@ } } }, - "502": { - "description": "Bad Gateway", + "400": { + "description": "Bad Request", "content": { "application/json": { "schema": { @@ -4884,8 +4984,8 @@ } } }, - "401": { - "description": "Unauthorized", + "422": { + "description": "Unprocessable Entity", "content": { "application/json": { "schema": { @@ -4894,8 +4994,8 @@ } } }, - "400": { - "description": "Bad Request", + "502": { + "description": "Bad Gateway", "content": { "application/json": { "schema": { @@ -4904,8 +5004,8 @@ } } }, - "422": { - "description": "Unprocessable Entity", + "403": { + "description": "Forbidden", "content": { "application/json": { "schema": { @@ -4914,8 +5014,8 @@ } } }, - "403": { - "description": "Forbidden", + "401": { + "description": "Unauthorized", "content": { "application/json": { "schema": { @@ -4975,8 +5075,8 @@ } } }, - "502": { - "description": "Bad Gateway", + "400": { + "description": "Bad Request", "content": { "application/json": { "schema": { @@ -4985,8 +5085,8 @@ } } }, - "401": { - "description": "Unauthorized", + "422": { + "description": "Unprocessable Entity", "content": { "application/json": { "schema": { @@ -4995,8 +5095,8 @@ } } }, - "400": { - "description": "Bad Request", + "502": { + "description": "Bad Gateway", "content": { "application/json": { "schema": { @@ -5005,8 +5105,8 @@ } } }, - "422": { - "description": "Unprocessable Entity", + "403": { + "description": "Forbidden", "content": { "application/json": { "schema": { @@ -5015,8 +5115,8 @@ } } }, - "403": { - "description": "Forbidden", + "401": { + "description": "Unauthorized", "content": { "application/json": { "schema": { @@ -5090,8 +5190,8 @@ } } }, - "502": { - "description": "Bad Gateway", + "400": { + "description": "Bad Request", "content": { "application/json": { "schema": { @@ -5100,8 +5200,8 @@ } } }, - "401": { - "description": "Unauthorized", + "422": { + "description": "Unprocessable Entity", "content": { "application/json": { "schema": { @@ -5110,8 +5210,8 @@ } } }, - "400": { - "description": "Bad Request", + "502": { + "description": "Bad Gateway", "content": { "application/json": { "schema": { @@ -5120,8 +5220,8 @@ } } }, - "422": { - "description": "Unprocessable Entity", + "403": { + "description": "Forbidden", "content": { "application/json": { "schema": { @@ -5130,8 +5230,8 @@ } } }, - "403": { - "description": "Forbidden", + "401": { + "description": "Unauthorized", "content": { "application/json": { "schema": { @@ -5190,8 +5290,8 @@ } } }, - "502": { - "description": "Bad Gateway", + "400": { + "description": "Bad Request", "content": { "application/json": { "schema": { @@ -5200,8 +5300,8 @@ } } }, - "401": { - "description": "Unauthorized", + "422": { + "description": "Unprocessable Entity", "content": { "application/json": { "schema": { @@ -5210,8 +5310,8 @@ } } }, - "400": { - "description": "Bad Request", + "502": { + "description": "Bad Gateway", "content": { "application/json": { "schema": { @@ -5220,8 +5320,8 @@ } } }, - "422": { - "description": "Unprocessable Entity", + "403": { + "description": "Forbidden", "content": { "application/json": { "schema": { @@ -5230,8 +5330,8 @@ } } }, - "403": { - "description": "Forbidden", + "401": { + "description": "Unauthorized", "content": { "application/json": { "schema": { @@ -5288,8 +5388,8 @@ } } }, - "502": { - "description": "Bad Gateway", + "400": { + "description": "Bad Request", "content": { "application/json": { "schema": { @@ -5298,8 +5398,8 @@ } } }, - "401": { - "description": "Unauthorized", + "422": { + "description": "Unprocessable Entity", "content": { "application/json": { "schema": { @@ -5308,8 +5408,8 @@ } } }, - "400": { - "description": "Bad Request", + "502": { + "description": "Bad Gateway", "content": { "application/json": { "schema": { @@ -5318,8 +5418,8 @@ } } }, - "422": { - "description": "Unprocessable Entity", + "403": { + "description": "Forbidden", "content": { "application/json": { "schema": { @@ -5328,8 +5428,8 @@ } } }, - "403": { - "description": "Forbidden", + "401": { + "description": "Unauthorized", "content": { "application/json": { "schema": { @@ -5391,8 +5491,8 @@ } } }, - "502": { - "description": "Bad Gateway", + "400": { + "description": "Bad Request", "content": { "application/json": { "schema": { @@ -5401,8 +5501,8 @@ } } }, - "401": { - "description": "Unauthorized", + "422": { + "description": "Unprocessable Entity", "content": { "application/json": { "schema": { @@ -5411,8 +5511,8 @@ } } }, - "400": { - "description": "Bad Request", + "502": { + "description": "Bad Gateway", "content": { "application/json": { "schema": { @@ -5421,8 +5521,8 @@ } } }, - "422": { - "description": "Unprocessable Entity", + "403": { + "description": "Forbidden", "content": { "application/json": { "schema": { @@ -5431,8 +5531,8 @@ } } }, - "403": { - "description": "Forbidden", + "401": { + "description": "Unauthorized", "content": { "application/json": { "schema": { @@ -5563,8 +5663,8 @@ } } }, - "502": { - "description": "Bad Gateway", + "400": { + "description": "Bad Request", "content": { "application/json": { "schema": { @@ -5573,8 +5673,8 @@ } } }, - "401": { - "description": "Unauthorized", + "422": { + "description": "Unprocessable Entity", "content": { "application/json": { "schema": { @@ -5583,8 +5683,8 @@ } } }, - "400": { - "description": "Bad Request", + "502": { + "description": "Bad Gateway", "content": { "application/json": { "schema": { @@ -5593,8 +5693,8 @@ } } }, - "422": { - "description": "Unprocessable Entity", + "403": { + "description": "Forbidden", "content": { "application/json": { "schema": { @@ -5603,8 +5703,8 @@ } } }, - "403": { - "description": "Forbidden", + "401": { + "description": "Unauthorized", "content": { "application/json": { "schema": { @@ -5666,8 +5766,8 @@ } } }, - "502": { - "description": "Bad Gateway", + "400": { + "description": "Bad Request", "content": { "application/json": { "schema": { @@ -5676,8 +5776,8 @@ } } }, - "401": { - "description": "Unauthorized", + "422": { + "description": "Unprocessable Entity", "content": { "application/json": { "schema": { @@ -5686,8 +5786,8 @@ } } }, - "400": { - "description": "Bad Request", + "502": { + "description": "Bad Gateway", "content": { "application/json": { "schema": { @@ -5696,8 +5796,8 @@ } } }, - "422": { - "description": "Unprocessable Entity", + "403": { + "description": "Forbidden", "content": { "application/json": { "schema": { @@ -5706,8 +5806,8 @@ } } }, - "403": { - "description": "Forbidden", + "401": { + "description": "Unauthorized", "content": { "application/json": { "schema": { @@ -5838,8 +5938,8 @@ } } }, - "502": { - "description": "Bad Gateway", + "400": { + "description": "Bad Request", "content": { "application/json": { "schema": { @@ -5848,8 +5948,8 @@ } } }, - "401": { - "description": "Unauthorized", + "422": { + "description": "Unprocessable Entity", "content": { "application/json": { "schema": { @@ -5858,8 +5958,8 @@ } } }, - "400": { - "description": "Bad Request", + "502": { + "description": "Bad Gateway", "content": { "application/json": { "schema": { @@ -5868,8 +5968,8 @@ } } }, - "422": { - "description": "Unprocessable Entity", + "403": { + "description": "Forbidden", "content": { "application/json": { "schema": { @@ -5878,8 +5978,8 @@ } } }, - "403": { - "description": "Forbidden", + "401": { + "description": "Unauthorized", "content": { "application/json": { "schema": { @@ -5941,8 +6041,8 @@ } } }, - "502": { - "description": "Bad Gateway", + "400": { + "description": "Bad Request", "content": { "application/json": { "schema": { @@ -5951,8 +6051,8 @@ } } }, - "401": { - "description": "Unauthorized", + "422": { + "description": "Unprocessable Entity", "content": { "application/json": { "schema": { @@ -5961,8 +6061,8 @@ } } }, - "400": { - "description": "Bad Request", + "502": { + "description": "Bad Gateway", "content": { "application/json": { "schema": { @@ -5971,8 +6071,8 @@ } } }, - "422": { - "description": "Unprocessable Entity", + "403": { + "description": "Forbidden", "content": { "application/json": { "schema": { @@ -5981,8 +6081,8 @@ } } }, - "403": { - "description": "Forbidden", + "401": { + "description": "Unauthorized", "content": { "application/json": { "schema": { @@ -6041,8 +6141,8 @@ } } }, - "502": { - "description": "Bad Gateway", + "400": { + "description": "Bad Request", "content": { "application/json": { "schema": { @@ -6051,8 +6151,8 @@ } } }, - "401": { - "description": "Unauthorized", + "422": { + "description": "Unprocessable Entity", "content": { "application/json": { "schema": { @@ -6061,8 +6161,8 @@ } } }, - "400": { - "description": "Bad Request", + "502": { + "description": "Bad Gateway", "content": { "application/json": { "schema": { @@ -6071,8 +6171,8 @@ } } }, - "422": { - "description": "Unprocessable Entity", + "403": { + "description": "Forbidden", "content": { "application/json": { "schema": { @@ -6081,8 +6181,8 @@ } } }, - "403": { - "description": "Forbidden", + "401": { + "description": "Unauthorized", "content": { "application/json": { "schema": { @@ -6178,8 +6278,8 @@ } } }, - "502": { - "description": "Bad Gateway", + "400": { + "description": "Bad Request", "content": { "application/json": { "schema": { @@ -6188,8 +6288,8 @@ } } }, - "401": { - "description": "Unauthorized", + "422": { + "description": "Unprocessable Entity", "content": { "application/json": { "schema": { @@ -6198,8 +6298,8 @@ } } }, - "400": { - "description": "Bad Request", + "502": { + "description": "Bad Gateway", "content": { "application/json": { "schema": { @@ -6208,8 +6308,8 @@ } } }, - "422": { - "description": "Unprocessable Entity", + "403": { + "description": "Forbidden", "content": { "application/json": { "schema": { @@ -6218,8 +6318,8 @@ } } }, - "403": { - "description": "Forbidden", + "401": { + "description": "Unauthorized", "content": { "application/json": { "schema": { @@ -6281,8 +6381,8 @@ } } }, - "502": { - "description": "Bad Gateway", + "400": { + "description": "Bad Request", "content": { "application/json": { "schema": { @@ -6291,8 +6391,8 @@ } } }, - "401": { - "description": "Unauthorized", + "422": { + "description": "Unprocessable Entity", "content": { "application/json": { "schema": { @@ -6301,8 +6401,8 @@ } } }, - "400": { - "description": "Bad Request", + "502": { + "description": "Bad Gateway", "content": { "application/json": { "schema": { @@ -6311,8 +6411,8 @@ } } }, - "422": { - "description": "Unprocessable Entity", + "403": { + "description": "Forbidden", "content": { "application/json": { "schema": { @@ -6321,8 +6421,8 @@ } } }, - "403": { - "description": "Forbidden", + "401": { + "description": "Unauthorized", "content": { "application/json": { "schema": { @@ -6418,8 +6518,8 @@ } } }, - "502": { - "description": "Bad Gateway", + "400": { + "description": "Bad Request", "content": { "application/json": { "schema": { @@ -6428,8 +6528,8 @@ } } }, - "401": { - "description": "Unauthorized", + "422": { + "description": "Unprocessable Entity", "content": { "application/json": { "schema": { @@ -6438,8 +6538,8 @@ } } }, - "400": { - "description": "Bad Request", + "502": { + "description": "Bad Gateway", "content": { "application/json": { "schema": { @@ -6448,8 +6548,8 @@ } } }, - "422": { - "description": "Unprocessable Entity", + "403": { + "description": "Forbidden", "content": { "application/json": { "schema": { @@ -6458,8 +6558,8 @@ } } }, - "403": { - "description": "Forbidden", + "401": { + "description": "Unauthorized", "content": { "application/json": { "schema": { @@ -6546,8 +6646,8 @@ } } }, - "502": { - "description": "Bad Gateway", + "400": { + "description": "Bad Request", "content": { "application/json": { "schema": { @@ -6556,8 +6656,8 @@ } } }, - "401": { - "description": "Unauthorized", + "422": { + "description": "Unprocessable Entity", "content": { "application/json": { "schema": { @@ -6566,8 +6666,8 @@ } } }, - "400": { - "description": "Bad Request", + "502": { + "description": "Bad Gateway", "content": { "application/json": { "schema": { @@ -6576,8 +6676,8 @@ } } }, - "422": { - "description": "Unprocessable Entity", + "403": { + "description": "Forbidden", "content": { "application/json": { "schema": { @@ -6586,8 +6686,8 @@ } } }, - "403": { - "description": "Forbidden", + "401": { + "description": "Unauthorized", "content": { "application/json": { "schema": { @@ -6710,8 +6810,8 @@ } } }, - "502": { - "description": "Bad Gateway", + "400": { + "description": "Bad Request", "content": { "application/json": { "schema": { @@ -6720,8 +6820,8 @@ } } }, - "401": { - "description": "Unauthorized", + "422": { + "description": "Unprocessable Entity", "content": { "application/json": { "schema": { @@ -6730,8 +6830,8 @@ } } }, - "400": { - "description": "Bad Request", + "502": { + "description": "Bad Gateway", "content": { "application/json": { "schema": { @@ -6740,8 +6840,8 @@ } } }, - "422": { - "description": "Unprocessable Entity", + "403": { + "description": "Forbidden", "content": { "application/json": { "schema": { @@ -6750,8 +6850,8 @@ } } }, - "403": { - "description": "Forbidden", + "401": { + "description": "Unauthorized", "content": { "application/json": { "schema": { @@ -6802,8 +6902,8 @@ } } }, - "502": { - "description": "Bad Gateway", + "400": { + "description": "Bad Request", "content": { "application/json": { "schema": { @@ -6812,8 +6912,8 @@ } } }, - "401": { - "description": "Unauthorized", + "422": { + "description": "Unprocessable Entity", "content": { "application/json": { "schema": { @@ -6822,8 +6922,8 @@ } } }, - "400": { - "description": "Bad Request", + "502": { + "description": "Bad Gateway", "content": { "application/json": { "schema": { @@ -6832,8 +6932,8 @@ } } }, - "422": { - "description": "Unprocessable Entity", + "403": { + "description": "Forbidden", "content": { "application/json": { "schema": { @@ -6842,8 +6942,8 @@ } } }, - "403": { - "description": "Forbidden", + "401": { + "description": "Unauthorized", "content": { "application/json": { "schema": { @@ -6913,8 +7013,8 @@ } } }, - "502": { - "description": "Bad Gateway", + "400": { + "description": "Bad Request", "content": { "application/json": { "schema": { @@ -6923,8 +7023,8 @@ } } }, - "401": { - "description": "Unauthorized", + "422": { + "description": "Unprocessable Entity", "content": { "application/json": { "schema": { @@ -6933,8 +7033,8 @@ } } }, - "400": { - "description": "Bad Request", + "502": { + "description": "Bad Gateway", "content": { "application/json": { "schema": { @@ -6943,8 +7043,8 @@ } } }, - "422": { - "description": "Unprocessable Entity", + "403": { + "description": "Forbidden", "content": { "application/json": { "schema": { @@ -6953,8 +7053,8 @@ } } }, - "403": { - "description": "Forbidden", + "401": { + "description": "Unauthorized", "content": { "application/json": { "schema": { @@ -7005,8 +7105,8 @@ } } }, - "502": { - "description": "Bad Gateway", + "400": { + "description": "Bad Request", "content": { "application/json": { "schema": { @@ -7015,8 +7115,8 @@ } } }, - "401": { - "description": "Unauthorized", + "422": { + "description": "Unprocessable Entity", "content": { "application/json": { "schema": { @@ -7025,8 +7125,8 @@ } } }, - "400": { - "description": "Bad Request", + "502": { + "description": "Bad Gateway", "content": { "application/json": { "schema": { @@ -7035,8 +7135,8 @@ } } }, - "422": { - "description": "Unprocessable Entity", + "403": { + "description": "Forbidden", "content": { "application/json": { "schema": { @@ -7045,8 +7145,8 @@ } } }, - "403": { - "description": "Forbidden", + "401": { + "description": "Unauthorized", "content": { "application/json": { "schema": { @@ -7188,8 +7288,8 @@ } } }, - "502": { - "description": "Bad Gateway", + "400": { + "description": "Bad Request", "content": { "application/json": { "schema": { @@ -7198,8 +7298,8 @@ } } }, - "401": { - "description": "Unauthorized", + "422": { + "description": "Unprocessable Entity", "content": { "application/json": { "schema": { @@ -7208,8 +7308,8 @@ } } }, - "400": { - "description": "Bad Request", + "502": { + "description": "Bad Gateway", "content": { "application/json": { "schema": { @@ -7218,8 +7318,8 @@ } } }, - "422": { - "description": "Unprocessable Entity", + "403": { + "description": "Forbidden", "content": { "application/json": { "schema": { @@ -7228,8 +7328,8 @@ } } }, - "403": { - "description": "Forbidden", + "401": { + "description": "Unauthorized", "content": { "application/json": { "schema": { @@ -7291,8 +7391,8 @@ } } }, - "502": { - "description": "Bad Gateway", + "400": { + "description": "Bad Request", "content": { "application/json": { "schema": { @@ -7301,8 +7401,8 @@ } } }, - "401": { - "description": "Unauthorized", + "422": { + "description": "Unprocessable Entity", "content": { "application/json": { "schema": { @@ -7311,8 +7411,8 @@ } } }, - "400": { - "description": "Bad Request", + "502": { + "description": "Bad Gateway", "content": { "application/json": { "schema": { @@ -7321,8 +7421,8 @@ } } }, - "422": { - "description": "Unprocessable Entity", + "403": { + "description": "Forbidden", "content": { "application/json": { "schema": { @@ -7331,8 +7431,8 @@ } } }, - "403": { - "description": "Forbidden", + "401": { + "description": "Unauthorized", "content": { "application/json": { "schema": { @@ -7450,8 +7550,8 @@ } } }, - "502": { - "description": "Bad Gateway", + "400": { + "description": "Bad Request", "content": { "application/json": { "schema": { @@ -7460,8 +7560,8 @@ } } }, - "401": { - "description": "Unauthorized", + "422": { + "description": "Unprocessable Entity", "content": { "application/json": { "schema": { @@ -7470,8 +7570,8 @@ } } }, - "400": { - "description": "Bad Request", + "502": { + "description": "Bad Gateway", "content": { "application/json": { "schema": { @@ -7480,8 +7580,8 @@ } } }, - "422": { - "description": "Unprocessable Entity", + "403": { + "description": "Forbidden", "content": { "application/json": { "schema": { @@ -7490,8 +7590,8 @@ } } }, - "403": { - "description": "Forbidden", + "401": { + "description": "Unauthorized", "content": { "application/json": { "schema": { @@ -7591,8 +7691,8 @@ } } }, - "502": { - "description": "Bad Gateway", + "400": { + "description": "Bad Request", "content": { "application/json": { "schema": { @@ -7601,8 +7701,8 @@ } } }, - "401": { - "description": "Unauthorized", + "422": { + "description": "Unprocessable Entity", "content": { "application/json": { "schema": { @@ -7611,8 +7711,8 @@ } } }, - "400": { - "description": "Bad Request", + "502": { + "description": "Bad Gateway", "content": { "application/json": { "schema": { @@ -7621,8 +7721,8 @@ } } }, - "422": { - "description": "Unprocessable Entity", + "403": { + "description": "Forbidden", "content": { "application/json": { "schema": { @@ -7631,8 +7731,8 @@ } } }, - "403": { - "description": "Forbidden", + "401": { + "description": "Unauthorized", "content": { "application/json": { "schema": { @@ -7715,8 +7815,8 @@ } } }, - "502": { - "description": "Bad Gateway", + "400": { + "description": "Bad Request", "content": { "application/json": { "schema": { @@ -7725,8 +7825,8 @@ } } }, - "401": { - "description": "Unauthorized", + "422": { + "description": "Unprocessable Entity", "content": { "application/json": { "schema": { @@ -7735,8 +7835,8 @@ } } }, - "400": { - "description": "Bad Request", + "502": { + "description": "Bad Gateway", "content": { "application/json": { "schema": { @@ -7745,8 +7845,8 @@ } } }, - "422": { - "description": "Unprocessable Entity", + "403": { + "description": "Forbidden", "content": { "application/json": { "schema": { @@ -7755,8 +7855,8 @@ } } }, - "403": { - "description": "Forbidden", + "401": { + "description": "Unauthorized", "content": { "application/json": { "schema": { @@ -7845,8 +7945,8 @@ } } }, - "502": { - "description": "Bad Gateway", + "400": { + "description": "Bad Request", "content": { "application/json": { "schema": { @@ -7855,8 +7955,8 @@ } } }, - "401": { - "description": "Unauthorized", + "422": { + "description": "Unprocessable Entity", "content": { "application/json": { "schema": { @@ -7865,8 +7965,8 @@ } } }, - "400": { - "description": "Bad Request", + "502": { + "description": "Bad Gateway", "content": { "application/json": { "schema": { @@ -7875,8 +7975,8 @@ } } }, - "422": { - "description": "Unprocessable Entity", + "403": { + "description": "Forbidden", "content": { "application/json": { "schema": { @@ -7885,8 +7985,8 @@ } } }, - "403": { - "description": "Forbidden", + "401": { + "description": "Unauthorized", "content": { "application/json": { "schema": { @@ -7959,8 +8059,8 @@ } } }, - "502": { - "description": "Bad Gateway", + "400": { + "description": "Bad Request", "content": { "application/json": { "schema": { @@ -7969,8 +8069,8 @@ } } }, - "401": { - "description": "Unauthorized", + "422": { + "description": "Unprocessable Entity", "content": { "application/json": { "schema": { @@ -7979,8 +8079,8 @@ } } }, - "400": { - "description": "Bad Request", + "502": { + "description": "Bad Gateway", "content": { "application/json": { "schema": { @@ -7989,8 +8089,8 @@ } } }, - "422": { - "description": "Unprocessable Entity", + "403": { + "description": "Forbidden", "content": { "application/json": { "schema": { @@ -7999,8 +8099,8 @@ } } }, - "403": { - "description": "Forbidden", + "401": { + "description": "Unauthorized", "content": { "application/json": { "schema": { @@ -8124,8 +8224,8 @@ } } }, - "502": { - "description": "Bad Gateway", + "400": { + "description": "Bad Request", "content": { "application/json": { "schema": { @@ -8134,8 +8234,8 @@ } } }, - "401": { - "description": "Unauthorized", + "422": { + "description": "Unprocessable Entity", "content": { "application/json": { "schema": { @@ -8144,8 +8244,8 @@ } } }, - "400": { - "description": "Bad Request", + "502": { + "description": "Bad Gateway", "content": { "application/json": { "schema": { @@ -8154,8 +8254,8 @@ } } }, - "422": { - "description": "Unprocessable Entity", + "403": { + "description": "Forbidden", "content": { "application/json": { "schema": { @@ -8164,8 +8264,8 @@ } } }, - "403": { - "description": "Forbidden", + "401": { + "description": "Unauthorized", "content": { "application/json": { "schema": { @@ -8235,8 +8335,8 @@ } } }, - "502": { - "description": "Bad Gateway", + "400": { + "description": "Bad Request", "content": { "application/json": { "schema": { @@ -8245,8 +8345,8 @@ } } }, - "401": { - "description": "Unauthorized", + "422": { + "description": "Unprocessable Entity", "content": { "application/json": { "schema": { @@ -8255,8 +8355,8 @@ } } }, - "400": { - "description": "Bad Request", + "502": { + "description": "Bad Gateway", "content": { "application/json": { "schema": { @@ -8265,8 +8365,8 @@ } } }, - "422": { - "description": "Unprocessable Entity", + "403": { + "description": "Forbidden", "content": { "application/json": { "schema": { @@ -8275,8 +8375,8 @@ } } }, - "403": { - "description": "Forbidden", + "401": { + "description": "Unauthorized", "content": { "application/json": { "schema": { @@ -8334,8 +8434,8 @@ } } }, - "502": { - "description": "Bad Gateway", + "400": { + "description": "Bad Request", "content": { "application/json": { "schema": { @@ -8344,8 +8444,8 @@ } } }, - "401": { - "description": "Unauthorized", + "422": { + "description": "Unprocessable Entity", "content": { "application/json": { "schema": { @@ -8354,8 +8454,8 @@ } } }, - "400": { - "description": "Bad Request", + "502": { + "description": "Bad Gateway", "content": { "application/json": { "schema": { @@ -8364,8 +8464,8 @@ } } }, - "422": { - "description": "Unprocessable Entity", + "403": { + "description": "Forbidden", "content": { "application/json": { "schema": { @@ -8374,8 +8474,8 @@ } } }, - "403": { - "description": "Forbidden", + "401": { + "description": "Unauthorized", "content": { "application/json": { "schema": { @@ -8443,8 +8543,8 @@ } } }, - "502": { - "description": "Bad Gateway", + "400": { + "description": "Bad Request", "content": { "application/json": { "schema": { @@ -8453,8 +8553,8 @@ } } }, - "401": { - "description": "Unauthorized", + "422": { + "description": "Unprocessable Entity", "content": { "application/json": { "schema": { @@ -8463,8 +8563,8 @@ } } }, - "400": { - "description": "Bad Request", + "502": { + "description": "Bad Gateway", "content": { "application/json": { "schema": { @@ -8473,8 +8573,8 @@ } } }, - "422": { - "description": "Unprocessable Entity", + "403": { + "description": "Forbidden", "content": { "application/json": { "schema": { @@ -8483,8 +8583,8 @@ } } }, - "403": { - "description": "Forbidden", + "401": { + "description": "Unauthorized", "content": { "application/json": { "schema": { @@ -8555,8 +8655,8 @@ } } }, - "502": { - "description": "Bad Gateway", + "400": { + "description": "Bad Request", "content": { "application/json": { "schema": { @@ -8565,8 +8665,8 @@ } } }, - "401": { - "description": "Unauthorized", + "422": { + "description": "Unprocessable Entity", "content": { "application/json": { "schema": { @@ -8575,8 +8675,8 @@ } } }, - "400": { - "description": "Bad Request", + "502": { + "description": "Bad Gateway", "content": { "application/json": { "schema": { @@ -8585,8 +8685,8 @@ } } }, - "422": { - "description": "Unprocessable Entity", + "403": { + "description": "Forbidden", "content": { "application/json": { "schema": { @@ -8595,8 +8695,8 @@ } } }, - "403": { - "description": "Forbidden", + "401": { + "description": "Unauthorized", "content": { "application/json": { "schema": { @@ -8644,8 +8744,8 @@ } } }, - "502": { - "description": "Bad Gateway", + "400": { + "description": "Bad Request", "content": { "application/json": { "schema": { @@ -8654,8 +8754,8 @@ } } }, - "401": { - "description": "Unauthorized", + "422": { + "description": "Unprocessable Entity", "content": { "application/json": { "schema": { @@ -8664,8 +8764,8 @@ } } }, - "400": { - "description": "Bad Request", + "502": { + "description": "Bad Gateway", "content": { "application/json": { "schema": { @@ -8674,8 +8774,8 @@ } } }, - "422": { - "description": "Unprocessable Entity", + "403": { + "description": "Forbidden", "content": { "application/json": { "schema": { @@ -8684,8 +8784,8 @@ } } }, - "403": { - "description": "Forbidden", + "401": { + "description": "Unauthorized", "content": { "application/json": { "schema": { @@ -8737,7 +8837,7 @@ } } }, - "502": { + "400": { "description": "", "content": { "application/json": { @@ -8747,7 +8847,7 @@ } } }, - "401": { + "422": { "description": "", "content": { "application/json": { @@ -8757,7 +8857,7 @@ } } }, - "400": { + "502": { "description": "", "content": { "application/json": { @@ -8767,7 +8867,7 @@ } } }, - "422": { + "403": { "description": "", "content": { "application/json": { @@ -8777,7 +8877,7 @@ } } }, - "403": { + "401": { "description": "", "content": { "application/json": { @@ -8837,7 +8937,7 @@ } } }, - "502": { + "400": { "description": "", "content": { "application/json": { @@ -8847,7 +8947,7 @@ } } }, - "401": { + "422": { "description": "", "content": { "application/json": { @@ -8857,7 +8957,7 @@ } } }, - "400": { + "502": { "description": "", "content": { "application/json": { @@ -8867,7 +8967,7 @@ } } }, - "422": { + "403": { "description": "", "content": { "application/json": { @@ -8877,7 +8977,7 @@ } } }, - "403": { + "401": { "description": "", "content": { "application/json": { @@ -10938,6 +11038,220 @@ }, "description": "Details of the service configuration." }, + "EndUserFlavors": { + "required": [ + "isDowngradeAllowed", + "modificationImpact", + "name", + "priority", + "properties", + "serviceFlavors" + ], + "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." + } + }, + "serviceFlavors": { + "type": "array", + "description": "The flavors of the orderable service.", + "items": { + "$ref": "#/components/schemas/ServiceFlavor" + } + }, + "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 orderable service." + }, + "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", + "category", + "csp", + "description", + "flavors", + "icon", + "name", + "regions", + "serviceHostingType", + "serviceProviderContactDetails", + "serviceTemplateId", + "variables", + "version" + ], + "type": "object", + "properties": { + "serviceTemplateId": { + "type": "string", + "description": "The id of the orderable service.", + "format": "uuid" + }, + "category": { + "type": "string", + "description": "The category of the orderable service.", + "enum": [ + "ai", + "compute", + "container", + "storage", + "network", + "database", + "mediaService", + "security", + "middleware", + "others" + ] + }, + "name": { + "type": "string", + "description": "The name of the orderable service." + }, + "version": { + "type": "string", + "description": "The version of the orderable service." + }, + "csp": { + "type": "string", + "description": "The Cloud Service Provider of the orderable service.", + "enum": [ + "HuaweiCloud", + "FlexibleEngine", + "OpenstackTestlab", + "PlusServer", + "RegioCloud", + "AlibabaCloud", + "aws", + "azure", + "GoogleCloudPlatform" + ] + }, + "regions": { + "type": "array", + "description": "The regions of the Cloud Service Provider.", + "items": { + "$ref": "#/components/schemas/Region" + } + }, + "description": { + "type": "string", + "description": "The description of the orderable service." + }, + "icon": { + "type": "string", + "description": "The icon of the orderable service." + }, + "variables": { + "type": "array", + "description": "The variables for the deployment, which will be passed to the deployer.", + "items": { + "$ref": "#/components/schemas/DeployVariable" + } + }, + "flavors": { + "$ref": "#/components/schemas/EndUserFlavors" + }, + "billing": { + "$ref": "#/components/schemas/Billing" + }, + "serviceHostingType": { + "type": "string", + "description": "Defines which cloud service account is used for deploying cloud resources.", + "enum": ["self", "service-vendor"] + }, + "serviceProviderContactDetails": { + "$ref": "#/components/schemas/ServiceProviderContactDetails" + }, + "serviceAvailabilityConfig": { + "type": "array", + "description": "The list of availability zone configuration of the service.", + "items": { + "$ref": "#/components/schemas/AvailabilityZoneConfig" + } + }, + "eula": { + "type": "string", + "description": "End user license agreement content of the service." + }, + "configurationParameters": { + "type": "array", + "description": "The collection of service configuration parameters.", + "items": { + "$ref": "#/components/schemas/ServiceConfigurationParameter" + } + }, + "links": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Link" + } + } + } + }, "DeployResource": { "required": ["groupName", "groupType", "properties", "resourceId", "resourceKind", "resourceName"], "type": "object", @@ -11036,9 +11350,8 @@ "type": "string", "description": "The id of the workflow." }, - "errorMsg": { - "type": "string", - "description": "The error message if the service order task failed." + "errorResponse": { + "$ref": "#/components/schemas/ErrorResponse" }, "userId": { "type": "string", @@ -11669,220 +11982,6 @@ } } }, - "EndUserFlavors": { - "required": [ - "isDowngradeAllowed", - "modificationImpact", - "name", - "priority", - "properties", - "serviceFlavors" - ], - "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." - } - }, - "serviceFlavors": { - "type": "array", - "description": "The flavors of the orderable service.", - "items": { - "$ref": "#/components/schemas/ServiceFlavor" - } - }, - "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 orderable service." - }, - "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", - "category", - "csp", - "description", - "flavors", - "icon", - "name", - "regions", - "serviceHostingType", - "serviceProviderContactDetails", - "serviceTemplateId", - "variables", - "version" - ], - "type": "object", - "properties": { - "serviceTemplateId": { - "type": "string", - "description": "The id of the orderable service.", - "format": "uuid" - }, - "category": { - "type": "string", - "description": "The category of the orderable service.", - "enum": [ - "ai", - "compute", - "container", - "storage", - "network", - "database", - "mediaService", - "security", - "middleware", - "others" - ] - }, - "name": { - "type": "string", - "description": "The name of the orderable service." - }, - "version": { - "type": "string", - "description": "The version of the orderable service." - }, - "csp": { - "type": "string", - "description": "The Cloud Service Provider of the orderable service.", - "enum": [ - "HuaweiCloud", - "FlexibleEngine", - "OpenstackTestlab", - "PlusServer", - "RegioCloud", - "AlibabaCloud", - "aws", - "azure", - "GoogleCloudPlatform" - ] - }, - "regions": { - "type": "array", - "description": "The regions of the Cloud Service Provider.", - "items": { - "$ref": "#/components/schemas/Region" - } - }, - "description": { - "type": "string", - "description": "The description of the orderable service." - }, - "icon": { - "type": "string", - "description": "The icon of the orderable service." - }, - "variables": { - "type": "array", - "description": "The variables for the deployment, which will be passed to the deployer.", - "items": { - "$ref": "#/components/schemas/DeployVariable" - } - }, - "flavors": { - "$ref": "#/components/schemas/EndUserFlavors" - }, - "billing": { - "$ref": "#/components/schemas/Billing" - }, - "serviceHostingType": { - "type": "string", - "description": "Defines which cloud service account is used for deploying cloud resources.", - "enum": ["self", "service-vendor"] - }, - "serviceProviderContactDetails": { - "$ref": "#/components/schemas/ServiceProviderContactDetails" - }, - "serviceAvailabilityConfig": { - "type": "array", - "description": "The list of availability zone configuration of the service.", - "items": { - "$ref": "#/components/schemas/AvailabilityZoneConfig" - } - }, - "eula": { - "type": "string", - "description": "End user license agreement content of the service." - }, - "configurationParameters": { - "type": "array", - "description": "The collection of service configuration parameters.", - "items": { - "$ref": "#/components/schemas/ServiceConfigurationParameter" - } - }, - "links": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Link" - } - } - } - }, "ServiceConfigurationChangeRequest": { "type": "object", "properties": { diff --git a/src/xpanse-api/generated/sdk.gen.ts b/src/xpanse-api/generated/sdk.gen.ts index 6d2ec8d21..325d9bd59 100644 --- a/src/xpanse-api/generated/sdk.gen.ts +++ b/src/xpanse-api/generated/sdk.gen.ts @@ -81,6 +81,8 @@ import type { GetMetricsResponse, GetOrderableServiceDetailsByIdData, GetOrderableServiceDetailsByIdResponse, + GetOrderableServiceDetailsByServiceIdData, + GetOrderableServiceDetailsByServiceIdResponse, GetOrderableServicesData, GetOrderableServicesResponse, GetOrderDetailsByOrderIdData, @@ -1388,6 +1390,34 @@ export const queryTasks = (data: QueryTasksData = {}): CancelablePromise Required role: admin or isv or user
+ * @param data The data for the request. + * @param data.serviceId The id of deployed service. + * @returns UserOrderableServiceVo OK + * @throws ApiError + */ +export const getOrderableServiceDetailsByServiceId = ( + data: GetOrderableServiceDetailsByServiceIdData +): CancelablePromise => { + return __request(OpenAPI, { + method: 'GET', + url: '/xpanse/services/{serviceId}/service_template', + path: { + serviceId: data.serviceId, + }, + errors: { + 400: 'Bad Request', + 401: 'Unauthorized', + 403: 'Forbidden', + 408: 'Request Timeout', + 422: 'Unprocessable Entity', + 500: 'Internal Server Error', + 502: 'Bad Gateway', + }, + }); +}; + /** * List compute resources of the service.
Required role: admin or user
* @param data The data for the request. diff --git a/src/xpanse-api/generated/types.gen.ts b/src/xpanse-api/generated/types.gen.ts index 2af272818..0b71d406b 100644 --- a/src/xpanse-api/generated/types.gen.ts +++ b/src/xpanse-api/generated/types.gen.ts @@ -2066,10 +2066,7 @@ export type ServiceOrderDetails = { * The id of the workflow. */ workflowId?: string; - /** - * The error message if the service order task failed. - */ - errorMsg?: string; + errorResponse?: ErrorResponse; /** * The id of the user who created the service order. */ @@ -3246,6 +3243,15 @@ export type QueryTasksData = { export type QueryTasksResponse = Array; +export type GetOrderableServiceDetailsByServiceIdData = { + /** + * The id of deployed service. + */ + serviceId: string; +}; + +export type GetOrderableServiceDetailsByServiceIdResponse = UserOrderableServiceVo; + export type GetComputeResourceInventoryOfServiceData = { /** * Id of the deployed service