Documentation
¶
Index ¶
- Constants
- func ConvertInfraModel(c echo.Context) error
- func ConvertObjectStorageModel(c echo.Context) error
- func ConvertRDBMSModel(c echo.Context) error
- func ConvertSoftwareModel(c echo.Context) error
- func CreateCloudModel(c echo.Context) error
- func CreateInfraModel(c echo.Context) error
- func CreateObjectStorageModel(c echo.Context) error
- func CreateOnPremModel(c echo.Context) error
- func CreateRDBMSModel(c echo.Context) error
- func CreateSoftwareModel(c echo.Context) error
- func CreateSourceSoftwareModel(c echo.Context) error
- func CreateTargetSoftwareModel(c echo.Context) error
- func DeleteCloudModel(c echo.Context) error
- func DeleteInfraModel(c echo.Context) error
- func DeleteObjectStorageModel(c echo.Context) error
- func DeleteOnPremModel(c echo.Context) error
- func DeleteRDBMSModel(c echo.Context) error
- func DeleteSoftwareModel(c echo.Context) error
- func DeleteSourceSoftwareModel(c echo.Context) error
- func DeleteTargetSoftwareModel(c echo.Context) error
- func GetCloudModel(c echo.Context) error
- func GetCloudModels(c echo.Context) error
- func GetImdlVersionSwaggerDoc(c echo.Context) error
- func GetInfraModel(c echo.Context) error
- func GetInfraModels(c echo.Context) error
- func GetModels(c echo.Context) error
- func GetModelsVersions(c echo.Context) error
- func GetObjectStorageModel(c echo.Context) error
- func GetObjectStorageModels(c echo.Context) error
- func GetOnPremModel(c echo.Context) error
- func GetOnPremModels(c echo.Context) error
- func GetRDBMSModel(c echo.Context) error
- func GetRDBMSModels(c echo.Context) error
- func GetSmdlVersionSwaggerDoc(c echo.Context) error
- func GetSoftwareModel(c echo.Context) error
- func GetSoftwareModels(c echo.Context) error
- func GetSourceSoftwareModel(c echo.Context) error
- func GetSourceSoftwareModels(c echo.Context) error
- func GetTargetSoftwareModel(c echo.Context) error
- func GetTargetSoftwareModels(c echo.Context) error
- func RestCheckHTTPVersion(c echo.Context) error
- func RestGetReadyz(c echo.Context) error
- func SwaggerUIHandler(c echo.Context) error
- func UpdateCloudModel(c echo.Context) error
- func UpdateInfraModel(c echo.Context) error
- func UpdateObjectStorageModel(c echo.Context) error
- func UpdateOnPremModel(c echo.Context) error
- func UpdateRDBMSModel(c echo.Context) error
- func UpdateSoftwareModel(c echo.Context) error
- func UpdateSourceSoftwareModel(c echo.Context) error
- func UpdateTargetSoftwareModel(c echo.Context) error
- type CloudModelReqInfo
- type CloudModelRespInfo
- type CreateCloudModelReq
- type CreateCloudModelResp
- type CreateInfraModelReq
- type CreateObjectStorageModelReq
- type CreateOnPremModelReq
- type CreateOnPremModelResp
- type CreateRDBMSModelReq
- type CreateSoftwareModelReq
- type CreateSourceSoftwareModelReq
- type CreateSourceSoftwareModelResp
- type CreateTargetSoftwareModelReq
- type CreateTargetSoftwareModelResp
- type GetCloudModelResp
- type GetCloudModelsResp
- type GetModelsVersionResp
- type GetOnPremModelResp
- type GetOnPremModelsResp
- type GetSourceSoftwareModelResp
- type GetSourceSoftwareModelsResp
- type GetTargetSoftwareModelResp
- type GetTargetSoftwareModelsResp
- type InfraModelConversion
- type ModelLineageReq
- type ModelStage
- type ModelsVersionRespInfo
- type ObjectStorageModelConversion
- type ObjectStorageModelRespInfo
- type OnPremModelReqInfo
- type OnPremModelRespInfo
- type RDBMSModelConversion
- type RDBMSModelRespInfo
- type ResHTTPVersion
- type ResReadyz
- type SoftwareModelConversion
- type SourceSoftwareModelReqInfo
- type SourceSoftwareModelRespInfo
- type TargetSoftwareModelReqInfo
- type TargetSoftwareModelRespInfo
- type UpdateCloudModelReq
- type UpdateCloudModelResp
- type UpdateOnPremModelReq
- type UpdateOnPremModelResp
- type UpdateSourceSoftwareModelReq
- type UpdateSourceSoftwareModelResp
- type UpdateTargetSoftwareModelReq
- type UpdateTargetSoftwareModelResp
Constants ¶
Variables ¶
This section is empty.
Functions ¶
func ConvertInfraModel ¶ added in v0.6.5
ConvertInfraModel godoc @ID ConvertInfraModel @Summary Convert a stored infra migration user model to a newer model version @Description Get a stored infra migration user model converted to the struct of the cm-beetle/imdl tagged version given by 'modelVersion'. The stored model is not changed. @Description Only the conversion to the same or a newer version is allowed. A cloud model cannot be converted to a version older than v0.1.2, and a model whose stored version is not a cm-beetle/imdl tag cannot be converted. @Description The response has the fields of 'GET /infra-model/{id}', with the model version and 'onpremiseInfraModel' (or 'cloudInfraModel') converted, and 'conversion' added: 'originVersion' (the stored version), 'currentVersion' (the version of the returned model), 'converted' (false if the stored version is already the requested version), 'droppedFields' (the paths of the fields removed because the requested version does not have them) and 'warnings' (what could not be converted as it was). @Description The values are not changed by the conversion unless a field's structure requires it. e.g. the disk sizes are kept as they are although their unit was changed from GiB to GB in the comments of v0.1.11. @Tags [API] Migration User Models @Accept json @Produce json @Param id path string true "Model ID" @Param modelType query string true "Type of infra model to convert" Enums(onprem, cloud) @Param modelVersion query string false "Model version to convert to (a cm-beetle 'imdl/vX.Y.Z' tag, e.g. v0.1.19). If empty, the latest tag is used. See 'GET /model/version' for available versions." @Success 200 {object} object "Successfully obtained the converted infra migration user model" @Failure 400 {object} model.Response "Invalid request parameter, or the model cannot be converted to the version" @Failure 404 {object} model.Response "Model Not Found" @Failure 500 {object} model.Response @Router /infra-model/{id}/convert [get]
func ConvertObjectStorageModel ¶ added in v0.6.5
ConvertObjectStorageModel godoc @ID ConvertObjectStorageModel @Summary Convert a stored object storage migration user model to a newer model version @Description Get a stored object storage migration user model converted to the struct of the cm-beetle/imdl tagged version given by 'objectStorageModelVersion'. The stored model is not changed. @Description Only the conversion to the same or a newer version is allowed, and a model whose stored version is not a cm-beetle/imdl tag with the object storage model (v0.1.3 or later) cannot be converted. @Description The response has the fields of 'GET /object-storage-model/{id}', with 'objectStorageModelVersion' and 'sourceObjectStorageModel' (or 'targetObjectStorageModel') converted, and 'conversion' added: 'originVersion' (the stored version), 'currentVersion' (the version of the returned model), 'converted' (false if the stored version is already the requested version), 'droppedFields' (the paths of the fields removed because the requested version does not have them) and 'warnings' (what could not be converted as it was). @Description [Migrations] v0.1.6: 'nameSeed' of 'targetObjectStorageModel' was removed (reported in 'droppedFields', and in 'warnings' if it has a value). v0.1.11: 'sourceObjectStorageModel', which described a single bucket, is converted to a group of buckets: the bucket fields are moved into 'sourceObjectStorages[0]'. @Description If a field of the stored model has a value which does not match the type of that field in the requested version, the model is not converted (400). @Tags [API] Migration User Models @Accept json @Produce json @Param id path string true "Model ID" @Param modelStage query string true "Stage of the object storage model" Enums(source, planning, target) @Param objectStorageModelVersion query string false "Model version to convert to (a cm-beetle 'imdl/vX.Y.Z' tag of v0.1.3 or later, e.g. v0.1.20). If empty, the latest tag is used. See 'GET /model/version' for available versions." @Success 200 {object} object "Successfully obtained the converted object storage migration user model" @Failure 400 {object} model.Response "Invalid request parameter, or the model cannot be converted to the version" @Failure 404 {object} model.Response "Model Not Found" @Failure 500 {object} model.Response @Router /object-storage-model/{id}/convert [get]
func ConvertRDBMSModel ¶ added in v0.6.5
ConvertRDBMSModel godoc @ID ConvertRDBMSModel @Summary Convert a stored RDBMS migration user model to a newer model version @Description Get a stored RDBMS migration user model converted to the struct of the cm-beetle/imdl tagged version given by 'rdbmsModelVersion'. The stored model is not changed. @Description Only the conversion to the same or a newer version is allowed, and a model whose stored version is not a cm-beetle/imdl tag with the RDBMS model (v0.1.13 or later) cannot be converted. @Description The response has the fields of 'GET /rdbms-model/{id}', with 'rdbmsModelVersion' and 'sourceRDBMSModel' (or 'targetRDBMSModel') converted, and 'conversion' added: 'originVersion' (the stored version), 'currentVersion' (the version of the returned model), 'converted' (false if the stored version is already the requested version), 'droppedFields' (the paths of the fields removed because the requested version does not have them) and 'warnings' (what could not be converted as it was). @Description [Migrations] v0.1.14: the instances of 'sourceRDBMSModel' were restructured into 'dbNode' and 'dbEngine' ('vcpu', 'memoryMb' and 'storageSizeGb' are converted as estimates and reported in 'warnings'). v0.1.18: 'characterSet' of the target databases is converted to 'charset'. @Description If a field of the stored model has a value which does not match the type of that field in the requested version, the model is not converted (400). @Tags [API] Migration User Models @Accept json @Produce json @Param id path string true "Model ID" @Param modelStage query string true "Stage of the RDBMS model" Enums(source, planning, target) @Param rdbmsModelVersion query string false "Model version to convert to (a cm-beetle 'imdl/vX.Y.Z' tag of v0.1.13 or later, e.g. v0.1.20). If empty, the latest tag is used. See 'GET /model/version' for available versions." @Success 200 {object} object "Successfully obtained the converted RDBMS migration user model" @Failure 400 {object} model.Response "Invalid request parameter, or the model cannot be converted to the version" @Failure 404 {object} model.Response "Model Not Found" @Failure 500 {object} model.Response @Router /rdbms-model/{id}/convert [get]
func ConvertSoftwareModel ¶ added in v0.6.5
ConvertSoftwareModel godoc @ID ConvertSoftwareModel @Summary Convert a stored software migration user model to a newer model version @Description Get a stored software migration user model converted to the struct of the cm-grasshopper/smdl tagged version given by 'modelVersion'. The stored model is not changed. @Description Only the conversion to the same or a newer version is allowed, and a model whose stored version is not a cm-grasshopper/smdl tag cannot be converted. @Description The response has the fields of 'GET /software-model/{id}', with 'softwareModelVersion' and 'sourceSoftwareModel' (or 'targetSoftwareModel') converted, and 'conversion' added: 'originVersion' (the stored version), 'currentVersion' (the version of the returned model), 'converted' (false if the stored version is already the requested version), 'droppedFields' (the paths of the fields removed because the requested version does not have them) and 'warnings' (what could not be converted as it was). @Description If a field of the stored model has a value which does not match the type of that field in the requested version (e.g. the free-form 'resources' of Kubernetes before v0.1.4), the model is not converted (400). @Tags [API] Migration User Models @Accept json @Produce json @Param id path string true "Model ID" @Param modelStage query string true "Stage of the software model" Enums(source, planning, target) @Param modelVersion query string false "Model version to convert to (a cm-grasshopper 'smdl/vX.Y.Z' tag, e.g. v0.1.4). If empty, the latest tag is used. See 'GET /model/version' for available versions." @Success 200 {object} object "Successfully obtained the converted software migration user model" @Failure 400 {object} model.Response "Invalid request parameter, or the model cannot be converted to the version" @Failure 404 {object} model.Response "Model Not Found" @Failure 500 {object} model.Response @Router /software-model/{id}/convert [get]
func CreateCloudModel ¶
CreateCloudModel godoc @ID CreateCloudModel @Summary Create a new cloud user model @Description Create a new cloud user model with the given information. @Tags [API] Cloud Migration User Models @Accept json @Produce json @Param Model body CreateCloudModelReq true "model information" @Success 201 {object} CreateCloudModelResp "Successfully Created the Cloud Migration User Model" @Failure 400 {object} object "Invalid Request" @Failure 404 {object} model.Response "Model Not Found" @Failure 500 {object} model.Response @Router /cloudmodel [post]
func CreateInfraModel ¶ added in v0.5.2
CreateInfraModel godoc @ID CreateInfraModel @Summary Create a new infra migration user model (on-premise or cloud) @Description Create a new infra migration user model. Use 'modelType' to select on-premise or cloud, and 'modelStage' to select the stage (source, planning or target) of the model. @Description The 'onpremiseInfraModel' (or 'cloudInfraModel') is validated against the 'OnpremInfra' (or 'RecommendedInfra') struct of the cm-beetle/imdl tagged version given by 'modelVersion', and is stored in that struct's form. @Description The former query parameters 'onpremModelVersion' and 'cloudModelVersion' are no longer accepted (400 Bad Request). Use 'modelVersion' instead. @Description (The body schema below shows the struct of the cm-beetle/imdl version built into cm-damselfly. To see the struct of another version, choose 'imdl/{version}/doc.json' in 'Select a definition' at the top of Swagger UI.) @Description [Lineage] 'parentId' is the ID of the infra model this model is derived from, which must be in the previous stage (source → planning → target): a source model for a planning model, and a planning model for a target model. The upstream fields of 'lineage' are derived from the parent. @Description 'lineage' can also be given explicitly (e.g. 'sourceGroupId'). The field of the model's own stage (e.g. 'planningModelId' of a planning model) is set to the ID of the created model by the server. @Tags [API] Migration User Models @Accept json @Produce json @Param modelType query string true "Type of infra model to create" Enums(onprem, cloud) @Param modelStage query string true "Stage of infra model to create" Enums(source, planning, target) @Param modelVersion query string false "Model version (a cm-beetle 'imdl/vX.Y.Z' tag, e.g. v0.1.15). If empty, the latest tag is used. See 'GET /model/version' for available versions." @Param Model body CreateInfraModelReq true "Infra model information" @Success 201 {object} object "Successfully created the infra migration user model" @Failure 400 {object} model.Response "Invalid request parameter" @Failure 404 {object} model.Response "Model Not Found" @Failure 500 {object} model.Response @Router /infra-model [post]
func CreateObjectStorageModel ¶ added in v0.6.5
CreateObjectStorageModel godoc @ID CreateObjectStorageModel @Summary Create a new object storage migration user model (source, planning or target) @Description Create a new object storage migration user model. Use 'modelStage' to select the stage (source, planning or target) of the model. @Description Provide 'sourceObjectStorageModel' for a source or planning model (modelStage=source or planning), or 'targetObjectStorageModel' for a target model (modelStage=target). @Description The 'sourceObjectStorageModel' (or 'targetObjectStorageModel') is validated against the 'SourceObjectStorage' (or 'RecommendedObjectStorage') struct of the cm-beetle/imdl tagged version given by 'objectStorageModelVersion', and is stored in that struct's form. @Description 'nodeId' is an optional identifier of the node the model is associated with. @Description [Lineage] 'parentId' is the ID of the object storage model this model is derived from, which must be in the previous stage (source → planning → target): a source model for a planning model, and a planning model for a target model. The upstream fields of 'lineage' are derived from the parent. @Description 'lineage' can also be given explicitly (e.g. 'sourceGroupId'). The field of the model's own stage (e.g. 'planningModelId' of a planning model) is set to the ID of the created model by the server. @Description (The body schema below shows the struct of the cm-beetle/imdl version built into cm-damselfly. To see the struct of another version, choose 'imdl/{version}/doc.json' in 'Select a definition' at the top of Swagger UI.) @Tags [API] Migration User Models @Accept json @Produce json @Param modelStage query string true "Stage of object storage model to create" Enums(source, planning, target) @Param objectStorageModelVersion query string false "Object storage model version (a cm-beetle 'imdl/vX.Y.Z' tag of v0.1.3 or later, e.g. v0.1.20). If empty, the latest tag is used. See 'GET /model/version' for available versions." @Param Model body CreateObjectStorageModelReq true "Object storage model information" @Success 201 {object} object "Successfully created the object storage migration user model" @Failure 400 {object} model.Response "Invalid request parameter" @Failure 404 {object} model.Response "Parent (or lineage) model Not Found" @Failure 500 {object} model.Response @Router /object-storage-model [post]
func CreateOnPremModel ¶
CreateOnPremModel godoc @ID CreateOnPremModel @Summary Create a new on-premise model @Description Create a new on-premise model with the given information. @Tags [API] On-Premise Migration User Models @Accept json @Produce json @Param Model body CreateOnPremModelReq true "model information" @Success 201 {object} CreateOnPremModelResp "Successfully Created the On-Premise Migration User Model" @Failure 400 {object} object "Invalid Request" @Failure 404 {object} model.Response "Model Not Found" @Failure 500 {object} model.Response @Router /onpremmodel [post]
func CreateRDBMSModel ¶ added in v0.6.5
CreateRDBMSModel godoc @ID CreateRDBMSModel @Summary Create a new RDBMS migration user model (source, planning or target) @Description Create a new RDBMS migration user model. Use 'modelStage' to select the stage (source, planning or target) of the model. @Description Provide 'sourceRDBMSModel' for a source or planning model (modelStage=source or planning), or 'targetRDBMSModel' for a target model (modelStage=target). @Description The 'sourceRDBMSModel' (or 'targetRDBMSModel') is validated against the 'SourceRDBMS' (or 'RecommendedRDBMS') struct of the cm-beetle/imdl tagged version given by 'rdbmsModelVersion', and is stored in that struct's form. @Description 'nodeId' is an optional identifier of the node the model is associated with. @Description [Lineage] 'parentId' is the ID of the RDBMS model this model is derived from, which must be in the previous stage (source → planning → target): a source model for a planning model, and a planning model for a target model. The upstream fields of 'lineage' are derived from the parent. @Description 'lineage' can also be given explicitly (e.g. 'sourceGroupId'). The field of the model's own stage (e.g. 'planningModelId' of a planning model) is set to the ID of the created model by the server. @Description (The body schema below shows the struct of the cm-beetle/imdl version built into cm-damselfly. To see the struct of another version, choose 'imdl/{version}/doc.json' in 'Select a definition' at the top of Swagger UI.) @Tags [API] Migration User Models @Accept json @Produce json @Param modelStage query string true "Stage of RDBMS model to create" Enums(source, planning, target) @Param rdbmsModelVersion query string false "RDBMS model version (a cm-beetle 'imdl/vX.Y.Z' tag of v0.1.13 or later, e.g. v0.1.20). If empty, the latest tag is used. See 'GET /model/version' for available versions." @Param Model body CreateRDBMSModelReq true "RDBMS model information" @Success 201 {object} object "Successfully created the RDBMS migration user model" @Failure 400 {object} model.Response "Invalid request parameter" @Failure 404 {object} model.Response "Parent (or lineage) model Not Found" @Failure 500 {object} model.Response @Router /rdbms-model [post]
func CreateSoftwareModel ¶ added in v0.3.2
CreateSoftwareModel godoc @ID CreateSoftwareModel @Summary Create a new software migration user model (source or target) @Description Create a new software migration user model. Use 'modelStage' to select the stage (source, planning or target) of the model. @Description Provide 'sourceSoftwareModel' for a source model (modelStage=source), or 'targetSoftwareModel' for a planning or target model (modelStage=planning or target). @Description The 'sourceSoftwareModel' (or 'targetSoftwareModel') is validated against the 'SourceGroupSoftwareProperty' (or 'TargetGroupSoftwareProperty') struct of the cm-grasshopper/smdl tagged version given by 'softwareModelVersion', and is stored in that struct's form. @Description 'nodeId' is an optional identifier of the node the model is associated with. @Description [Lineage] 'parentId' is the ID of the software model this model is derived from, which must be in the previous stage (source → planning → target): a source model for a planning model, and a planning model for a target model. The upstream fields of 'lineage' are derived from the parent. @Description 'lineage' can also be given explicitly (e.g. 'sourceGroupId'). The field of the model's own stage (e.g. 'planningModelId' of a planning model) is set to the ID of the created model by the server. @Description (The body schema below shows the struct of the cm-grasshopper/smdl version built into cm-damselfly. To see the struct of another version, choose 'smdl/{version}/doc.json' in 'Select a definition' at the top of Swagger UI.) @Tags [API] Migration User Models @Accept json @Produce json @Param modelStage query string true "Stage of software model to create" Enums(source, planning, target) @Param softwareModelVersion query string false "Software model version (a cm-grasshopper 'smdl/vX.Y.Z' tag, e.g. v0.1.3). If empty, the latest tag is used. See 'GET /model/version' for available versions." @Param Model body CreateSoftwareModelReq true "Software model information" @Success 201 {object} object "Successfully created the software migration user model" @Failure 400 {object} model.Response "Invalid request parameter" @Failure 404 {object} model.Response "Parent (or lineage) model Not Found" @Failure 500 {object} model.Response @Router /software-model [post]
func CreateSourceSoftwareModel ¶ added in v0.3.3
CreateSourceSoftwareModel godoc @ID CreateSourceSoftwareModel @Summary Create a new source software user model @Description Create a new source software user model with the given information. @Tags [API] Source Software Migration User Models @Accept json @Produce json @Param Model body CreateSourceSoftwareModelReq true "model information" @Success 201 {object} CreateSourceSoftwareModelResp "Successfully Created the Source Software Migration User Model" @Failure 400 {object} object "Invalid Request" @Router /softwaremodel/source [post]
func CreateTargetSoftwareModel ¶ added in v0.3.3
CreateTargetSoftwareModel godoc @ID CreateTargetSoftwareModel @Summary Create a new target software user model @Description Create a new target software user model with the given information. @Tags [API] Target Software Migration User Models @Accept json @Produce json @Param Model body CreateTargetSoftwareModelReq true "model information" @Success 201 {object} CreateTargetSoftwareModelResp "Successfully Created the Target Software Migration User Model" @Failure 400 {object} object "Invalid Request" @Router /softwaremodel/target [post]
func DeleteCloudModel ¶
DeleteCloudModel godoc @ID DeleteCloudModel @Summary Delete a cloud user model @Description Delete a cloud user model with the given information. @Tags [API] Cloud Migration User Models @Accept json @Produce json @Param id path string true "Model ID" @Success 200 {string} string "Successfully Deleted the Cloud Migration User Model" @Failure 400 {object} object "Invalid Request" @Failure 404 {object} model.Response "Model Not Found" @Failure 500 {object} model.Response @Router /cloudmodel/{id} [delete]
func DeleteInfraModel ¶ added in v0.5.2
DeleteInfraModel godoc @ID DeleteInfraModel @Summary Delete a specific infra migration user model (on-premise or cloud) @Description Delete a specific infra migration user model by ID. Works for both on-premise and cloud models without requiring the caller to specify the model type. @Description If the model is referred to by the lineage of other models, it is not deleted (409 Conflict with the referring models in 'list') unless 'force' is true. @Tags [API] Migration User Models @Accept json @Produce json @Param id path string true "Model ID" @Param force query boolean false "Delete the model even if it is referred to by the lineage of other models" default(false) @Success 200 {string} string "Successfully deleted the infra migration user model" @Failure 400 {object} model.Response "Invalid request parameter" @Failure 404 {object} model.Response "Model Not Found" @Failure 409 {object} model.Response "The model is referred to by the lineage of other models (listed in 'list')" @Failure 500 {object} model.Response @Router /infra-model/{id} [delete]
func DeleteObjectStorageModel ¶ added in v0.6.5
DeleteObjectStorageModel godoc @ID DeleteObjectStorageModel @Summary Delete a specific object storage migration user model (source, planning or target) @Description Delete a specific object storage migration user model by ID. Use 'modelStage' to specify the stage (source, planning or target) of the model. @Description If the model is referred to by the lineage of other models, it is not deleted (409 Conflict with the referring models in 'list') unless 'force' is true. @Tags [API] Migration User Models @Accept json @Produce json @Param id path string true "Model ID" @Param modelStage query string true "Stage of the object storage model" Enums(source, planning, target) @Param force query boolean false "Delete the model even if it is referred to by the lineage of other models" default(false) @Success 200 {string} string "Successfully deleted the object storage migration user model" @Failure 400 {object} model.Response "Invalid request parameter" @Failure 404 {object} model.Response "Model Not Found" @Failure 409 {object} model.Response "The model is referred to by the lineage of other models (listed in 'list')" @Failure 500 {object} model.Response @Router /object-storage-model/{id} [delete]
func DeleteOnPremModel ¶
DeleteOnPremModel godoc @ID DeleteOnPremModel @Summary Delete a on-premise model @Description Delete a on-premise model with the given information. @Tags [API] On-Premise Migration User Models @Accept json @Produce json @Param id path string true "Model ID" @Success 200 {string} string "Successfully Deleted the On-Premise Migration User Model" @Failure 400 {object} object "Invalid Request" @Failure 404 {object} model.Response "Model Not Found" @Failure 500 {object} model.Response @Router /onpremmodel/{id} [delete]
func DeleteRDBMSModel ¶ added in v0.6.5
DeleteRDBMSModel godoc @ID DeleteRDBMSModel @Summary Delete a specific RDBMS migration user model (source, planning or target) @Description Delete a specific RDBMS migration user model by ID. Use 'modelStage' to specify the stage (source, planning or target) of the model. @Description If the model is referred to by the lineage of other models, it is not deleted (409 Conflict with the referring models in 'list') unless 'force' is true. @Tags [API] Migration User Models @Accept json @Produce json @Param id path string true "Model ID" @Param modelStage query string true "Stage of the RDBMS model" Enums(source, planning, target) @Param force query boolean false "Delete the model even if it is referred to by the lineage of other models" default(false) @Success 200 {string} string "Successfully deleted the RDBMS migration user model" @Failure 400 {object} model.Response "Invalid request parameter" @Failure 404 {object} model.Response "Model Not Found" @Failure 409 {object} model.Response "The model is referred to by the lineage of other models (listed in 'list')" @Failure 500 {object} model.Response @Router /rdbms-model/{id} [delete]
func DeleteSoftwareModel ¶ added in v0.3.2
DeleteSoftwareModel godoc @ID DeleteSoftwareModel @Summary Delete a specific software migration user model (source or target) @Description Delete a specific software migration user model by ID. Use 'modelStage' to specify the stage (source, planning or target) of the model. @Description If the model is referred to by the lineage of other models, it is not deleted (409 Conflict with the referring models in 'list') unless 'force' is true. @Tags [API] Migration User Models @Accept json @Produce json @Param id path string true "Model ID" @Param modelStage query string true "Stage of the software model" Enums(source, planning, target) @Param force query boolean false "Delete the model even if it is referred to by the lineage of other models" default(false) @Success 200 {string} string "Successfully deleted the software migration user model" @Failure 400 {object} model.Response "Invalid request parameter" @Failure 404 {object} model.Response "Model Not Found" @Failure 409 {object} model.Response "The model is referred to by the lineage of other models (listed in 'list')" @Failure 500 {object} model.Response @Router /software-model/{id} [delete]
func DeleteSourceSoftwareModel ¶ added in v0.3.3
DeleteSourceSoftwareModel godoc @ID DeleteSourceSoftwareModel @Summary Delete a source software user model @Description Delete a source software user model with the given information. @Tags [API] Source Software Migration User Models @Accept json @Produce json @Param id path string true "Model ID" @Success 200 {string} string "Successfully Deleted the Source Software Migration User Model" @Failure 400 {object} object "Invalid Request" @Failure 404 {object} object "Model Not Found" @Failure 500 {object} model.Response @Router /softwaremodel/source/{id} [delete]
func DeleteTargetSoftwareModel ¶ added in v0.3.3
DeleteTargetSoftwareModel godoc @ID DeleteTargetSoftwareModel @Summary Delete a target software user model @Description Delete a target software user model with the given information. @Tags [API] Target Software Migration User Models @Accept json @Produce json @Param id path string true "Model ID" @Success 200 {string} string "Successfully Deleted the Target Software Migration User Model" @Failure 400 {object} object "Invalid Request" @Failure 404 {object} object "Model Not Found" @Failure 500 {object} model.Response @Router /softwaremodel/target/{id} [delete]
func GetCloudModel ¶
GetCloudModel godoc @ID GetCloudModel @Summary Get a specific cloud user model @Description Get a specific cloud user model. @Tags [API] Cloud Migration User Models @Accept json @Produce json @Param id path string true "Model ID" @Success 200 {object} GetCloudModelResp "Successfully Obtained the Cloud Migration User Model" @Failure 400 {object} object "Invalid Request" @Failure 404 {object} model.Response "Model Not Found" @Failure 500 {object} model.Response @Router /cloudmodel/{id} [get]
func GetCloudModels ¶
GetCloudModels godoc @ID GetCloudModels @Summary Get a list of cloud user models @Description Get a list of cloud user models. @Tags [API] Cloud Migration User Models @Accept json @Produce json @Success 200 {object} GetCloudModelsResp "Successfully Obtained Cloud Migration User Models" @Failure 400 {object} object "Invalid Request" @Failure 404 {object} model.Response "Model Not Found" @Failure 500 {object} model.Response @Router /cloudmodel [get]
func GetImdlVersionSwaggerDoc ¶ added in v0.6.4
GetImdlVersionSwaggerDoc serves the API definition (Swagger 2.0) of the given cm-beetle/imdl tagged version.
func GetInfraModel ¶ added in v0.5.2
GetInfraModel godoc @ID GetInfraModel @Summary Get a specific infra migration user model (on-premise or cloud) @Description Get a specific infra migration user model by ID. Use 'modelType' to specify whether it is an on-premise or cloud model. @Description The 'lineage' of the model refers to its upstream models and itself. @Tags [API] Migration User Models @Accept json @Produce json @Param id path string true "Model ID" @Param modelType query string true "Type of infra model to retrieve" Enums(onprem, cloud) @Success 200 {object} object "Successfully obtained the infra migration user model" @Failure 400 {object} model.Response "Invalid request parameter" @Failure 404 {object} model.Response "Model Not Found" @Failure 500 {object} model.Response @Router /infra-model/{id} [get]
func GetInfraModels ¶ added in v0.5.2
GetInfraModels godoc @ID GetInfraModels @Summary Get a list of infra migration user models (on-premise or cloud) @Description Get a list of infra migration user models filtered by model type and model stage. @Description The models can be further filtered by their 'lineage' (e.g. 'sourceModelId' to find the models derived from a source model). @Tags [API] Migration User Models @Accept json @Produce json @Param modelType query string true "Type of infra model to retrieve" Enums(onprem, cloud) @Param modelStage query string true "Stage of infra model to retrieve" Enums(source, planning, target) @Param sourceGroupId query string false "Filter by 'lineage.sourceGroupId'" @Param sourceModelId query string false "Filter by 'lineage.sourceModelId'" @Param planningModelId query string false "Filter by 'lineage.planningModelId'" @Param targetModelId query string false "Filter by 'lineage.targetModelId'" @Success 200 {array} map[string]interface{} "Successfully obtained infra migration user models" @Failure 400 {object} model.Response "Invalid request parameter" @Failure 404 {object} model.Response "Model Not Found" @Failure 500 {object} model.Response @Router /infra-model [get]
func GetModels ¶
GetModels godoc @ID GetModels @Summary Get a list of migration user models (infra, software, RDBMS and object storage) @Description Get a list of migration user models of all categories (infra, software, rdbms and objectStorage). @Description Use 'modelStage' to select the stage (source, planning or target) of the models, and 'category' to select the category. If omitted, the models of all stages (or all categories) are returned. @Description The models can be further filtered by their 'lineage' (e.g. 'sourceGroupId' to get all the models derived from a source group). @Tags [API] Migration User Models @Accept json @Produce json @Param modelStage query string false "Stage of models to retrieve. If empty, the models of all stages are returned." Enums(source, planning, target) @Param category query string false "Category of models to retrieve. If empty, the models of all categories are returned." Enums(infra, software, rdbms, objectStorage) @Param sourceGroupId query string false "Filter by 'lineage.sourceGroupId'" @Param sourceModelId query string false "Filter by 'lineage.sourceModelId'" @Param planningModelId query string false "Filter by 'lineage.planningModelId'" @Param targetModelId query string false "Filter by 'lineage.targetModelId'" @Success 200 {array} map[string]interface{} "Successfully obtained migration user models" @Failure 400 {object} model.Response "Invalid request parameter" @Failure 500 {object} model.Response @Router /model [get]
func GetModelsVersions ¶ added in v0.6.4
GetModelsVersions godoc @ID GetModelsVersions @Summary Get all tagged versions of the migration models @Description Get all tagged versions (in ascending order) of the migration models. 'onpremModelVersion' and 'cloudModelVersion' are the 'imdl/vX.Y.Z' tags of cm-beetle, 'softwareModelVersion' is the 'smdl/vX.Y.Z' tags of cm-grasshopper, 'rdbmsModelVersion' is the 'imdl/vX.Y.Z' tags of cm-beetle which have the RDBMS model (v0.1.13 or later), and 'objectStorageModelVersion' is the 'imdl/vX.Y.Z' tags of cm-beetle which have the object storage model (v0.1.3 or later). @Tags [API] Migration Models @Accept json @Produce json @Success 200 {object} GetModelsVersionResp "Tagged migration model versions" @Failure 404 {object} model.Response "Model Not Found" @Failure 500 {object} model.Response @Router /model/version [get]
func GetObjectStorageModel ¶ added in v0.6.5
GetObjectStorageModel godoc @ID GetObjectStorageModel @Summary Get a specific object storage migration user model (source, planning or target) @Description Get a specific object storage migration user model by ID. Use 'modelStage' to specify the stage (source, planning or target) of the model. @Description The 'lineage' of the model refers to its upstream models and itself. @Tags [API] Migration User Models @Accept json @Produce json @Param id path string true "Model ID" @Param modelStage query string true "Stage of the object storage model" Enums(source, planning, target) @Success 200 {object} object "Successfully obtained the object storage migration user model" @Failure 400 {object} model.Response "Invalid request parameter" @Failure 404 {object} model.Response "Model Not Found" @Failure 500 {object} model.Response @Router /object-storage-model/{id} [get]
func GetObjectStorageModels ¶ added in v0.6.5
GetObjectStorageModels godoc @ID GetObjectStorageModels @Summary Get a list of object storage migration user models (source, planning or target) @Description Get a list of object storage migration user models. Use 'modelStage' to select the stage (source, planning or target) of the models. @Description The models can be further filtered by their 'lineage' (e.g. 'sourceModelId' to find the models derived from a source model). @Tags [API] Migration User Models @Accept json @Produce json @Param modelStage query string true "Stage of object storage model to retrieve" Enums(source, planning, target) @Param sourceGroupId query string false "Filter by 'lineage.sourceGroupId'" @Param sourceModelId query string false "Filter by 'lineage.sourceModelId'" @Param planningModelId query string false "Filter by 'lineage.planningModelId'" @Param targetModelId query string false "Filter by 'lineage.targetModelId'" @Success 200 {array} map[string]interface{} "Successfully obtained object storage migration user models" @Failure 400 {object} model.Response "Invalid request parameter" @Failure 500 {object} model.Response @Router /object-storage-model [get]
func GetOnPremModel ¶
GetOnPremModel godoc @ID GetOnPremModel @Summary Get a specific on-premise model @Description Get a specific on-premise model. @Tags [API] On-Premise Migration User Models @Accept json @Produce json @Param id path string true "Model ID" @Success 200 {object} GetOnPremModelResp "Successfully Obtained the On-Premise Migration User Model" @Failure 400 {object} object "Invalid Request" @Failure 404 {object} model.Response "Model Not Found" @Failure 500 {object} model.Response @Router /onpremmodel/{id} [get]
func GetOnPremModels ¶
GetOnPremModels godoc @ID GetOnPremModels @Summary Get a list of on-premise models @Description Get a list of on-premise models. @Tags [API] On-Premise Migration User Models @Accept json @Produce json @Success 200 {object} GetOnPremModelsResp "Successfully Obtained On-Premise Migration User Models" @Failure 404 {object} model.Response "Model Not Found" @Failure 500 {object} model.Response @Router /onpremmodel [get]
func GetRDBMSModel ¶ added in v0.6.5
GetRDBMSModel godoc @ID GetRDBMSModel @Summary Get a specific RDBMS migration user model (source, planning or target) @Description Get a specific RDBMS migration user model by ID. Use 'modelStage' to specify the stage (source, planning or target) of the model. @Description The 'lineage' of the model refers to its upstream models and itself. @Tags [API] Migration User Models @Accept json @Produce json @Param id path string true "Model ID" @Param modelStage query string true "Stage of the RDBMS model" Enums(source, planning, target) @Success 200 {object} object "Successfully obtained the RDBMS migration user model" @Failure 400 {object} model.Response "Invalid request parameter" @Failure 404 {object} model.Response "Model Not Found" @Failure 500 {object} model.Response @Router /rdbms-model/{id} [get]
func GetRDBMSModels ¶ added in v0.6.5
GetRDBMSModels godoc @ID GetRDBMSModels @Summary Get a list of RDBMS migration user models (source, planning or target) @Description Get a list of RDBMS migration user models. Use 'modelStage' to select the stage (source, planning or target) of the models. @Description The models can be further filtered by their 'lineage' (e.g. 'sourceModelId' to find the models derived from a source model). @Tags [API] Migration User Models @Accept json @Produce json @Param modelStage query string true "Stage of RDBMS model to retrieve" Enums(source, planning, target) @Param sourceGroupId query string false "Filter by 'lineage.sourceGroupId'" @Param sourceModelId query string false "Filter by 'lineage.sourceModelId'" @Param planningModelId query string false "Filter by 'lineage.planningModelId'" @Param targetModelId query string false "Filter by 'lineage.targetModelId'" @Success 200 {array} map[string]interface{} "Successfully obtained RDBMS migration user models" @Failure 400 {object} model.Response "Invalid request parameter" @Failure 500 {object} model.Response @Router /rdbms-model [get]
func GetSmdlVersionSwaggerDoc ¶ added in v0.6.4
GetSmdlVersionSwaggerDoc serves the API definition (Swagger 2.0) of the given cm-grasshopper/smdl tagged version.
func GetSoftwareModel ¶ added in v0.3.2
GetSoftwareModel godoc @ID GetSoftwareModel @Summary Get a specific software migration user model (source or target) @Description Get a specific software migration user model by ID. Use 'modelStage' to specify the stage (source, planning or target) of the model. @Description The 'lineage' of the model refers to its upstream models and itself. @Tags [API] Migration User Models @Accept json @Produce json @Param id path string true "Model ID" @Param modelStage query string true "Stage of the software model" Enums(source, planning, target) @Success 200 {object} object "Successfully obtained the software migration user model" @Failure 400 {object} model.Response "Invalid request parameter" @Failure 404 {object} model.Response "Model Not Found" @Failure 500 {object} model.Response @Router /software-model/{id} [get]
func GetSoftwareModels ¶ added in v0.3.2
GetSoftwareModels godoc @ID GetSoftwareModels @Summary Get a list of software migration user models (source or target) @Description Get a list of software migration user models. Use 'modelStage' to select the stage (source, planning or target) of the models. @Description The models can be further filtered by their 'lineage' (e.g. 'sourceModelId' to find the models derived from a source model). @Tags [API] Migration User Models @Accept json @Produce json @Param modelStage query string true "Stage of software model to retrieve" Enums(source, planning, target) @Param sourceGroupId query string false "Filter by 'lineage.sourceGroupId'" @Param sourceModelId query string false "Filter by 'lineage.sourceModelId'" @Param planningModelId query string false "Filter by 'lineage.planningModelId'" @Param targetModelId query string false "Filter by 'lineage.targetModelId'" @Success 200 {array} map[string]interface{} "Successfully obtained software migration user models" @Failure 400 {object} model.Response "Invalid request parameter" @Failure 500 {object} model.Response @Router /software-model [get]
func GetSourceSoftwareModel ¶ added in v0.3.3
GetSourceSoftwareModel godoc @ID GetSourceSoftwareModel @Summary Get a specific source software user model @Description Get a specific source software user model. @Tags [API] Source Software Migration User Models @Accept json @Produce json @Param id path string true "Model ID" @Success 200 {object} GetSourceSoftwareModelResp "Successfully Obtained the Source Software Migration User Model" @Failure 400 {object} object "Invalid Request" @Failure 404 {object} object "Model Not Found" @Router /softwaremodel/source/{id} [get]
func GetSourceSoftwareModels ¶ added in v0.3.3
GetSourceSoftwareModels godoc @ID GetSourceSoftwareModels @Summary Get a list of source software user models @Description Get a list of source software user models. @Tags [API] Source Software Migration User Models @Accept json @Produce json @Success 200 {object} GetSourceSoftwareModelsResp "Successfully Obtained Source Software Migration User Models" @Failure 404 {object} model.Response @Router /softwaremodel/source [get]
func GetTargetSoftwareModel ¶ added in v0.3.3
GetTargetSoftwareModel godoc @ID GetTargetSoftwareModel @Summary Get a specific target software user model @Description Get a specific target software user model. @Tags [API] Target Software Migration User Models @Accept json @Produce json @Param id path string true "Model ID" @Success 200 {object} GetTargetSoftwareModelResp "Successfully Obtained the Target Software Migration User Model" @Failure 400 {object} object "Invalid Request" @Failure 404 {object} object "Model Not Found" @Router /softwaremodel/target/{id} [get]
func GetTargetSoftwareModels ¶ added in v0.3.3
GetTargetSoftwareModels godoc @ID GetTargetSoftwareModels @Summary Get a list of target software user models @Description Get a list of target software user models. @Tags [API] Target Software Migration User Models @Accept json @Produce json @Success 200 {object} GetTargetSoftwareModelsResp "Successfully Obtained Target Software Migration User Models" @Failure 404 {object} model.Response @Router /softwaremodel/target [get]
func RestCheckHTTPVersion ¶
RestCheckHTTPVersion godoc @ID RestCheckHTTPVersion @Summary Check HTTP version of incoming request @Description Checks and logs the HTTP version of the incoming request to the server console. @Tags [Admin] System management @Accept json @Produce json @Success 200 {object} ResHTTPVersion @Failure 404 {object} ResHTTPVersion @Failure 500 {object} ResHTTPVersion @Router /httpVersion [get]
func RestGetReadyz ¶
RestGetReadyz func check if CM-Damselfly server is ready or not. RestGetReadyz godoc @ID RestGetReadyz @Summary Check Damselfly is ready @Description Check Damselfly is ready @Tags [Admin] System management @Accept json @Produce json @Success 200 {object} ResReadyz @Failure 503 {object} ResReadyz @Router /readyz [get]
func SwaggerUIHandler ¶ added in v0.6.4
SwaggerUIHandler serves Swagger UI, listing the default API definition and one API definition per cm-beetle/imdl and cm-grasshopper/smdl tagged version (latest first) in the 'Select a definition' drop-down.
func UpdateCloudModel ¶
UpdateCloudModel godoc @ID UpdateCloudModel @Summary Update a cloud user model @Description Update a cloud user model with the given information. @Tags [API] Cloud Migration User Models @Accept json @Produce json @Param id path string true "Model ID" @Param Model body UpdateCloudModelReq true "Model information to update" @Success 201 {object} UpdateCloudModelResp "Successfully Updated the Cloud Migration User Model" @Failure 400 {object} object "Invalid Request" @Failure 404 {object} model.Response "Model Not Found" @Failure 500 {object} model.Response @Router /cloudmodel/{id} [put]
func UpdateInfraModel ¶ added in v0.5.2
UpdateInfraModel godoc @ID UpdateInfraModel @Summary Update a specific infra migration user model (on-premise or cloud) @Description Update a specific infra migration user model by ID. Use 'modelType' to specify whether it is an on-premise or cloud model. @Description The model stage is changed to 'modelStage' if it is given, and is preserved otherwise. @Description The model version is preserved, and 'onpremiseInfraModel' (or 'cloudInfraModel') is validated against the struct of that cm-beetle/imdl tagged version. @Description [Lineage] The stored 'lineage' is preserved if neither 'lineage' nor 'parentId' is given. If 'lineage' is given, it replaces the stored one. If 'parentId' is given, the upstream fields are derived from that model in the previous stage (source → planning → target). @Description The stage cannot be changed while the model is referred to by the lineage of other models (409 Conflict with the referring models in 'list'). @Tags [API] Migration User Models @Accept json @Produce json @Param id path string true "Model ID" @Param modelType query string true "Type of infra model to update" Enums(onprem, cloud) @Param modelStage query string false "Stage to change the infra model to. If empty, the stored stage is preserved." Enums(source, planning, target) @Param Model body CreateInfraModelReq true "Infra model information to update" @Success 200 {object} object "Successfully updated the infra migration user model" @Failure 400 {object} model.Response "Invalid request parameter" @Failure 404 {object} model.Response "Model Not Found" @Failure 409 {object} model.Response "The stage cannot be changed: the model is referred to by the lineage of other models" @Failure 500 {object} model.Response @Router /infra-model/{id} [put]
func UpdateObjectStorageModel ¶ added in v0.6.5
UpdateObjectStorageModel godoc @ID UpdateObjectStorageModel @Summary Update a specific object storage migration user model (source, planning or target) @Description Update a specific object storage migration user model by ID. @Description The model stage is changed to 'modelStage' if it is given, and is preserved otherwise. @Description Provide 'sourceObjectStorageModel' if the (resulting) stage is source or planning, or 'targetObjectStorageModel' if it is target. @Description 'createTime' and 'objectStorageModelVersion' of the stored model are preserved, and 'sourceObjectStorageModel' (or 'targetObjectStorageModel') is validated against the struct of that cm-beetle/imdl tagged version. @Description [Lineage] The stored 'lineage' is preserved if neither 'lineage' nor 'parentId' is given. If 'lineage' is given, it replaces the stored one. If 'parentId' is given, the upstream fields are derived from that object storage model in the previous stage (source → planning → target). @Description The stage cannot be changed while the model is referred to by the lineage of other models (409 Conflict with the referring models in 'list'). @Tags [API] Migration User Models @Accept json @Produce json @Param id path string true "Model ID" @Param modelStage query string false "Stage to change the object storage model to. If empty, the stored stage is preserved." Enums(source, planning, target) @Param Model body CreateObjectStorageModelReq true "Object storage model information to update" @Success 200 {object} object "Successfully updated the object storage migration user model" @Failure 400 {object} model.Response "Invalid request parameter" @Failure 404 {object} model.Response "Model Not Found" @Failure 409 {object} model.Response "The stage cannot be changed: the model is referred to by the lineage of other models" @Failure 500 {object} model.Response @Router /object-storage-model/{id} [put]
func UpdateOnPremModel ¶
UpdateOnPremModel godoc @ID UpdateOnPremModel @Summary Update a on-premise model @Description Update a on-premise model with the given information. @Tags [API] On-Premise Migration User Models @Accept json @Produce json @Param id path string true "Model ID" @Param Model body UpdateOnPremModelReq true "Model information to update" @Success 201 {object} UpdateOnPremModelResp "Successfully Updated the On-Premise Migration User Model" @Failure 404 {object} model.Response "Model Not Found" @Failure 500 {object} model.Response @Router /onpremmodel/{id} [put]
func UpdateRDBMSModel ¶ added in v0.6.5
UpdateRDBMSModel godoc @ID UpdateRDBMSModel @Summary Update a specific RDBMS migration user model (source, planning or target) @Description Update a specific RDBMS migration user model by ID. @Description The model stage is changed to 'modelStage' if it is given, and is preserved otherwise. @Description Provide 'sourceRDBMSModel' if the (resulting) stage is source or planning, or 'targetRDBMSModel' if it is target. @Description 'createTime' and 'rdbmsModelVersion' of the stored model are preserved, and 'sourceRDBMSModel' (or 'targetRDBMSModel') is validated against the struct of that cm-beetle/imdl tagged version. @Description [Lineage] The stored 'lineage' is preserved if neither 'lineage' nor 'parentId' is given. If 'lineage' is given, it replaces the stored one. If 'parentId' is given, the upstream fields are derived from that RDBMS model in the previous stage (source → planning → target). @Description The stage cannot be changed while the model is referred to by the lineage of other models (409 Conflict with the referring models in 'list'). @Tags [API] Migration User Models @Accept json @Produce json @Param id path string true "Model ID" @Param modelStage query string false "Stage to change the RDBMS model to. If empty, the stored stage is preserved." Enums(source, planning, target) @Param Model body CreateRDBMSModelReq true "RDBMS model information to update" @Success 200 {object} object "Successfully updated the RDBMS migration user model" @Failure 400 {object} model.Response "Invalid request parameter" @Failure 404 {object} model.Response "Model Not Found" @Failure 409 {object} model.Response "The stage cannot be changed: the model is referred to by the lineage of other models" @Failure 500 {object} model.Response @Router /rdbms-model/{id} [put]
func UpdateSoftwareModel ¶ added in v0.3.2
UpdateSoftwareModel godoc @ID UpdateSoftwareModel @Summary Update a specific software migration user model (source or target) @Description Update a specific software migration user model by ID. @Description The model stage is changed to 'modelStage' if it is given, and is preserved otherwise. @Description Provide 'sourceSoftwareModel' if the (resulting) stage is source, or 'targetSoftwareModel' if it is planning or target. @Description 'createTime' and 'softwareModelVersion' of the stored model are preserved, and 'sourceSoftwareModel' (or 'targetSoftwareModel') is validated against the struct of that cm-grasshopper/smdl tagged version. @Description [Lineage] The stored 'lineage' is preserved if neither 'lineage' nor 'parentId' is given. If 'lineage' is given, it replaces the stored one. If 'parentId' is given, the upstream fields are derived from that model in the previous stage (source → planning → target). @Description The stage cannot be changed while the model is referred to by the lineage of other models (409 Conflict with the referring models in 'list'). @Tags [API] Migration User Models @Accept json @Produce json @Param id path string true "Model ID" @Param modelStage query string false "Stage to change the software model to. If empty, the stored stage is preserved." Enums(source, planning, target) @Param Model body CreateSoftwareModelReq true "Software model information to update" @Success 200 {object} object "Successfully updated the software migration user model" @Failure 400 {object} model.Response "Invalid request parameter" @Failure 404 {object} model.Response "Model Not Found" @Failure 409 {object} model.Response "The stage cannot be changed: the model is referred to by the lineage of other models" @Failure 500 {object} model.Response @Router /software-model/{id} [put]
func UpdateSourceSoftwareModel ¶ added in v0.3.3
UpdateSourceSoftwareModel godoc @ID UpdateSourceSoftwareModel @Summary Update a source software user model @Description Update a source software user model with the given information. @Tags [API] Source Software Migration User Models @Accept json @Produce json @Param id path string true "Model ID" @Param Model body UpdateSourceSoftwareModelReq true "Model information to update" @Success 201 {object} UpdateSourceSoftwareModelResp "Successfully Updated the Source Software Migration User Model" @Failure 400 {object} object "Invalid Request" @Failure 404 {object} object "Model Not Found" @Failure 500 {object} model.Response @Router /softwaremodel/source/{id} [put]
func UpdateTargetSoftwareModel ¶ added in v0.3.3
UpdateTargetSoftwareModel godoc @ID UpdateTargetSoftwareModel @Summary Update a target software user model @Description Update a target software user model with the given information. @Tags [API] Target Software Migration User Models @Accept json @Produce json @Param id path string true "Model ID" @Param Model body UpdateTargetSoftwareModelReq true "Model information to update" @Success 201 {object} UpdateTargetSoftwareModelResp "Successfully Updated the Target Software Migration User Model" @Failure 400 {object} object "Invalid Request" @Failure 404 {object} object "Model Not Found" @Failure 500 {object} model.Response @Router /softwaremodel/target/{id} [put]
Types ¶
type CloudModelReqInfo ¶
type CloudModelReqInfo struct {
UserId string `json:"userId"`
IsTargetModel bool `json:"isTargetModel"`
IsInitUserModel bool `json:"isInitUserModel"`
UserModelName string `json:"userModelName"`
Description string `json:"description"`
UserModelVer string `json:"userModelVersion"`
CSP string `json:"csp"`
Region string `json:"region"`
Zone string `json:"zone"`
CloudInfraModel cloudmodel.RecommendedInfra `json:"cloudInfraModel" validate:"required"`
}
type CloudModelRespInfo ¶
type CloudModelRespInfo struct {
Id string `json:"id"`
UserId string `json:"userId"`
IsTargetModel bool `json:"isTargetModel"`
IsInitUserModel bool `json:"isInitUserModel"`
UserModelName string `json:"userModelName"`
Description string `json:"description"`
UserModelVer string `json:"userModelVersion"`
CreateTime string `json:"createTime"`
UpdateTime string `json:"updateTime"`
CSP string `json:"csp"`
Region string `json:"region"`
Zone string `json:"zone"`
IsCloudModel bool `json:"isCloudModel"`
CloudModelVer string `json:"cloudModelVersion"`
ModelType string `json:"modelType"`
CloudInfraModel cloudmodel.RecommendedInfra `json:"cloudInfraModel" validate:"required"`
}
type CreateCloudModelReq ¶
type CreateCloudModelReq struct {
CloudModelReqInfo
}
[Note] Struct Embedding is used to inherit the fields of CloudModel
type CreateCloudModelResp ¶
type CreateCloudModelResp struct {
CloudModelRespInfo
}
[Note] Struct Embedding is used to inherit the fields of CloudModel
type CreateInfraModelReq ¶ added in v0.5.2
type CreateInfraModelReq struct {
UserId string `json:"userId"`
IsInitUserModel bool `json:"isInitUserModel"`
UserModelName string `json:"userModelName"`
UserModelVer string `json:"userModelVersion"`
Description string `json:"description"`
CSP string `json:"csp,omitempty"`
Region string `json:"region,omitempty"`
Zone string `json:"zone,omitempty"`
ModelLineageReq
OnpremInfraModel onpremisemodel.OnpremInfra `json:"onpremiseInfraModel,omitempty"`
CloudInfraModel cloudmodel.RecommendedInfra `json:"cloudInfraModel,omitempty"`
}
[Note] CreateInfraModelReq is a unified request body for creating either an on-premise or a cloud infra migration user model. Only the field matching the selected 'modelType' needs to be provided (onpremiseInfraModel or cloudInfraModel).
type CreateObjectStorageModelReq ¶ added in v0.6.5
type CreateObjectStorageModelReq struct {
UserId string `json:"userId"`
NodeId string `json:"nodeId,omitempty"`
IsInitUserModel bool `json:"isInitUserModel"`
UserModelName string `json:"userModelName"`
UserModelVer string `json:"userModelVersion"`
Description string `json:"description"`
ModelLineageReq
SourceObjectStorageModel *storagemodel.SourceObjectStorage `json:"sourceObjectStorageModel,omitempty"`
TargetObjectStorageModel *storagemodel.RecommendedObjectStorage `json:"targetObjectStorageModel,omitempty"`
}
CreateObjectStorageModelReq is the request body for creating or updating an object storage migration user model. Only the field matching the 'modelStage' query parameter needs to be provided ('sourceObjectStorageModel' for source or planning, 'targetObjectStorageModel' for target).
type CreateOnPremModelReq ¶
type CreateOnPremModelReq struct {
OnPremModelReqInfo
}
[Note] Struct Embedding is used to inherit the fields of OnPremModel
type CreateOnPremModelResp ¶
type CreateOnPremModelResp struct {
OnPremModelRespInfo
}
[Note] Struct Embedding is used to inherit the fields of OnPremModel
type CreateRDBMSModelReq ¶ added in v0.6.5
type CreateRDBMSModelReq struct {
UserId string `json:"userId"`
NodeId string `json:"nodeId,omitempty"`
IsInitUserModel bool `json:"isInitUserModel"`
UserModelName string `json:"userModelName"`
UserModelVer string `json:"userModelVersion"`
Description string `json:"description"`
ModelLineageReq
SourceRDBMSModel *rdbmsmodel.SourceRDBMS `json:"sourceRDBMSModel,omitempty"`
TargetRDBMSModel *rdbmsmodel.RecommendedRDBMS `json:"targetRDBMSModel,omitempty"`
}
CreateRDBMSModelReq is the request body for creating or updating an RDBMS migration user model. Only the field matching the 'modelStage' query parameter needs to be provided ('sourceRDBMSModel' for source or planning, 'targetRDBMSModel' for target).
type CreateSoftwareModelReq ¶ added in v0.3.2
type CreateSoftwareModelReq struct {
UserId string `json:"userId"`
NodeId string `json:"nodeId,omitempty"`
IsInitUserModel bool `json:"isInitUserModel"`
UserModelName string `json:"userModelName"`
UserModelVer string `json:"userModelVersion"`
Description string `json:"description"`
ModelLineageReq
SourceSoftwareModel *softwaremodel.SourceGroupSoftwareProperty `json:"sourceSoftwareModel,omitempty"`
TargetSoftwareModel *softwaremodel.TargetGroupSoftwareProperty `json:"targetSoftwareModel,omitempty"`
}
[Note] CreateSoftwareModelReq is a unified request body for creating or updating either a source or a target software migration user model. Only the field matching the 'modelStage' query parameter needs to be provided ('sourceSoftwareModel' for source, 'targetSoftwareModel' for planning or target).
type CreateSourceSoftwareModelReq ¶ added in v0.3.3
type CreateSourceSoftwareModelReq struct {
SourceSoftwareModelReqInfo
}
[Note] Struct Embedding is used to inherit the fields of SoftwareModel
type CreateSourceSoftwareModelResp ¶ added in v0.3.3
type CreateSourceSoftwareModelResp struct {
SourceSoftwareModelRespInfo
}
[Note] Struct Embedding is used to inherit the fields of SoftwareModel
type CreateTargetSoftwareModelReq ¶ added in v0.3.3
type CreateTargetSoftwareModelReq struct {
TargetSoftwareModelReqInfo
}
[Note] Struct Embedding is used to inherit the fields of SoftwareModel
type CreateTargetSoftwareModelResp ¶ added in v0.3.3
type CreateTargetSoftwareModelResp struct {
TargetSoftwareModelRespInfo
}
[Note] Struct Embedding is used to inherit the fields of SoftwareModel
type GetCloudModelResp ¶
type GetCloudModelResp struct {
CloudModelRespInfo
}
type GetCloudModelsResp ¶
type GetCloudModelsResp struct {
Models []CloudModelRespInfo `json:"models"`
}
type GetModelsVersionResp ¶
type GetModelsVersionResp struct {
ModelsVersion ModelsVersionRespInfo `json:"modelsVersion"`
}
type GetOnPremModelResp ¶
type GetOnPremModelResp struct {
OnPremModelRespInfo
}
type GetOnPremModelsResp ¶
type GetOnPremModelsResp struct {
Models []OnPremModelRespInfo `json:"models"`
}
type GetSourceSoftwareModelResp ¶ added in v0.3.3
type GetSourceSoftwareModelResp struct {
SourceSoftwareModelRespInfo
}
type GetSourceSoftwareModelsResp ¶ added in v0.3.3
type GetSourceSoftwareModelsResp struct {
Models []SourceSoftwareModelRespInfo `json:"models"`
}
type GetTargetSoftwareModelResp ¶ added in v0.3.3
type GetTargetSoftwareModelResp struct {
TargetSoftwareModelRespInfo
}
type GetTargetSoftwareModelsResp ¶ added in v0.3.3
type GetTargetSoftwareModelsResp struct {
Models []TargetSoftwareModelRespInfo `json:"models"`
}
type InfraModelConversion ¶ added in v0.6.5
type InfraModelConversion struct {
OriginVersion string `json:"originVersion"`
CurrentVersion string `json:"currentVersion"`
Converted bool `json:"converted"`
DroppedFields []string `json:"droppedFields"`
Warnings []string `json:"warnings"`
}
InfraModelConversion describes the result of converting an infra model to another model version.
type ModelLineageReq ¶ added in v0.6.4
type ModelLineageReq struct {
// ParentId is the ID of the model this model is derived from. It must be a model of the same category
// (infra, software, rdbms or objectStorage) in the previous stage: a source model for a planning model, and a planning model for a target model.
ParentId string `json:"parentId,omitempty" example:"a4e3c3a6-7d2f-4a3e-9c1b-0f6f7a1d2e3b"`
// Lineage is given to set the lineage explicitly (e.g. 'sourceGroupId'). The field of the model's own stage is set by the server.
Lineage *lineage.MigrationLineage `json:"lineage,omitempty"`
}
ModelLineageReq holds the lineage fields of the request body for creating or updating a migration user model.
type ModelStage ¶ added in v0.6.4
type ModelStage string
ModelStage is the stage of a migration user model (infra, software, RDBMS or object storage) in the migration process.
const ( StageSource ModelStage = "source" StagePlanning ModelStage = "planning" StageTarget ModelStage = "target" )
type ModelsVersionRespInfo ¶
type ModelsVersionRespInfo struct {
OnPremModelVer []string `json:"onpremModelVersion"`
CloudModelVer []string `json:"cloudModelVersion"`
SoftwareModelVer []string `json:"softwareModelVersion"`
RDBMSModelVer []string `json:"rdbmsModelVersion"`
ObjectStorageModelVer []string `json:"objectStorageModelVersion"`
}
type ObjectStorageModelConversion ¶ added in v0.6.5
type ObjectStorageModelConversion struct {
OriginVersion string `json:"originVersion"`
CurrentVersion string `json:"currentVersion"`
Converted bool `json:"converted"`
DroppedFields []string `json:"droppedFields"`
Warnings []string `json:"warnings"`
}
ObjectStorageModelConversion describes the result of converting an object storage model to another model version.
type ObjectStorageModelRespInfo ¶ added in v0.6.5
type ObjectStorageModelRespInfo struct {
Id string `json:"id"`
UserId string `json:"userId"`
NodeId string `json:"nodeId,omitempty"`
IsInitUserModel bool `json:"isInitUserModel"`
UserModelName string `json:"userModelName"`
UserModelVer string `json:"userModelVersion"`
Description string `json:"description"`
ObjectStorageModelVer string `json:"objectStorageModelVersion"`
CreateTime string `json:"createTime"`
UpdateTime string `json:"updateTime"`
IsObjectStorageModel bool `json:"isObjectStorageModel"`
ModelType string `json:"modelType"`
ModelStage ModelStage `json:"modelStage"`
Lineage lineage.MigrationLineage `json:"lineage"`
}
ObjectStorageModelRespInfo holds the metadata of a stored object storage migration user model.
type OnPremModelReqInfo ¶
type OnPremModelReqInfo struct {
UserId string `json:"userId"`
IsInitUserModel bool `json:"isInitUserModel"`
UserModelName string `json:"userModelName"`
UserModelVer string `json:"userModelVersion"`
Description string `json:"description"`
OnpremInfraModel onpremisemodel.OnpremInfra `json:"onpremiseInfraModel" validate:"required"`
}
type OnPremModelRespInfo ¶
type OnPremModelRespInfo struct {
Id string `json:"id"`
UserId string `json:"userId"`
IsInitUserModel bool `json:"isInitUserModel"`
UserModelName string `json:"userModelName"`
UserModelVer string `json:"userModelVersion"`
Description string `json:"description"`
OnPremModelVer string `json:"onpremModelVersion"`
CreateTime string `json:"createTime"`
UpdateTime string `json:"updateTime"`
IsTargetModel bool `json:"isTargetModel"`
IsCloudModel bool `json:"isCloudModel"`
ModelType string `json:"modelType"`
OnpremInfraModel onpremisemodel.OnpremInfra `json:"onpremiseInfraModel" validate:"required"`
}
type RDBMSModelConversion ¶ added in v0.6.5
type RDBMSModelConversion struct {
OriginVersion string `json:"originVersion"`
CurrentVersion string `json:"currentVersion"`
Converted bool `json:"converted"`
DroppedFields []string `json:"droppedFields"`
Warnings []string `json:"warnings"`
}
RDBMSModelConversion describes the result of converting an RDBMS model to another model version.
type RDBMSModelRespInfo ¶ added in v0.6.5
type RDBMSModelRespInfo struct {
Id string `json:"id"`
UserId string `json:"userId"`
NodeId string `json:"nodeId,omitempty"`
IsInitUserModel bool `json:"isInitUserModel"`
UserModelName string `json:"userModelName"`
UserModelVer string `json:"userModelVersion"`
Description string `json:"description"`
RDBMSModelVer string `json:"rdbmsModelVersion"`
CreateTime string `json:"createTime"`
UpdateTime string `json:"updateTime"`
IsRDBMSModel bool `json:"isRDBMSModel"`
ModelType string `json:"modelType"`
ModelStage ModelStage `json:"modelStage"`
Lineage lineage.MigrationLineage `json:"lineage"`
}
RDBMSModelRespInfo holds the metadata of a stored RDBMS migration user model.
type ResHTTPVersion ¶
type ResHTTPVersion struct {
model.SimpleMessage
}
type ResReadyz ¶
type ResReadyz struct {
model.SimpleMessage
}
type SoftwareModelConversion ¶ added in v0.6.5
type SoftwareModelConversion struct {
OriginVersion string `json:"originVersion"`
CurrentVersion string `json:"currentVersion"`
Converted bool `json:"converted"`
DroppedFields []string `json:"droppedFields"`
Warnings []string `json:"warnings"`
}
SoftwareModelConversion describes the result of converting a software model to another model version.
type SourceSoftwareModelReqInfo ¶ added in v0.3.3
type SourceSoftwareModelReqInfo struct {
UserId string `json:"userId"`
IsInitUserModel bool `json:"isInitUserModel"`
UserModelName string `json:"userModelName"`
UserModelVer string `json:"userModelVersion"`
Description string `json:"description"`
SourceSoftwareModel softwaremodel.SourceGroupSoftwareProperty `json:"sourceSoftwareModel" validate:"required"`
}
type SourceSoftwareModelRespInfo ¶ added in v0.3.3
type SourceSoftwareModelRespInfo struct {
Id string `json:"id"`
UserId string `json:"userId"`
NodeId string `json:"nodeId,omitempty"`
IsInitUserModel bool `json:"isInitUserModel"`
UserModelName string `json:"userModelName"`
UserModelVer string `json:"userModelVersion"`
Description string `json:"description"`
SoftwareModelVer string `json:"softwareModelVersion"`
CreateTime string `json:"createTime"`
UpdateTime string `json:"updateTime"`
IsSoftwareModel bool `json:"isSoftwareModel"`
IsTargetModel bool `json:"isTargetModel"`
ModelType string `json:"modelType"`
SourceSoftwareModel softwaremodel.SourceGroupSoftwareProperty `json:"sourceSoftwareModel" validate:"required"`
}
type TargetSoftwareModelReqInfo ¶ added in v0.3.3
type TargetSoftwareModelReqInfo struct {
UserId string `json:"userId"`
IsInitUserModel bool `json:"isInitUserModel"`
UserModelName string `json:"userModelName"`
UserModelVer string `json:"userModelVersion"`
Description string `json:"description"`
TargetSoftwareModel softwaremodel.TargetGroupSoftwareProperty `json:"targetSoftwareModel" validate:"required"`
}
type TargetSoftwareModelRespInfo ¶ added in v0.3.3
type TargetSoftwareModelRespInfo struct {
Id string `json:"id"`
UserId string `json:"userId"`
NodeId string `json:"nodeId,omitempty"`
IsInitUserModel bool `json:"isInitUserModel"`
UserModelName string `json:"userModelName"`
UserModelVer string `json:"userModelVersion"`
Description string `json:"description"`
SoftwareModelVer string `json:"softwareModelVersion"`
CreateTime string `json:"createTime"`
UpdateTime string `json:"updateTime"`
IsSoftwareModel bool `json:"isSoftwareModel"`
IsTargetModel bool `json:"isTargetModel"`
ModelType string `json:"modelType"`
TargetSoftwareModel softwaremodel.TargetGroupSoftwareProperty `json:"targetSoftwareModel" validate:"required"`
}
type UpdateCloudModelReq ¶
type UpdateCloudModelReq struct {
CloudModelReqInfo
}
[Note] Struct Embedding is used to inherit the fields of CloudModel
type UpdateCloudModelResp ¶
type UpdateCloudModelResp struct {
CloudModelRespInfo
}
[Note] Struct Embedding is used to inherit the fields of CloudModel
type UpdateOnPremModelReq ¶
type UpdateOnPremModelReq struct {
OnPremModelReqInfo
}
[Note] Struct Embedding is used to inherit the fields of OnPremModel
type UpdateOnPremModelResp ¶
type UpdateOnPremModelResp struct {
OnPremModelRespInfo
}
[Note] Struct Embedding is used to inherit the fields of OnPremModel
type UpdateSourceSoftwareModelReq ¶ added in v0.3.3
type UpdateSourceSoftwareModelReq struct {
SourceSoftwareModelReqInfo
}
[Note] Struct Embedding is used to inherit the fields of SourceSoftwareModel
type UpdateSourceSoftwareModelResp ¶ added in v0.3.3
type UpdateSourceSoftwareModelResp struct {
SourceSoftwareModelRespInfo
}
[Note] Struct Embedding is used to inherit the fields of SourceSoftwareModel
type UpdateTargetSoftwareModelReq ¶ added in v0.3.3
type UpdateTargetSoftwareModelReq struct {
TargetSoftwareModelReqInfo
}
[Note] Struct Embedding is used to inherit the fields of TargetSoftwareModel
type UpdateTargetSoftwareModelResp ¶ added in v0.3.3
type UpdateTargetSoftwareModelResp struct {
TargetSoftwareModelRespInfo
}
[Note] Struct Embedding is used to inherit the fields of TargetSoftwareModel