diff --git a/dsms-engine-application/src/main/java/com/dsms/modules/filesystem/controller/FileSystemController.java b/dsms-engine-application/src/main/java/com/dsms/modules/filesystem/controller/FileSystemController.java new file mode 100644 index 0000000000000000000000000000000000000000..b9665dd5a5b26e8a3cec13ab165852b3e98a891d --- /dev/null +++ b/dsms-engine-application/src/main/java/com/dsms/modules/filesystem/controller/FileSystemController.java @@ -0,0 +1,28 @@ +/* + * Copyright 2022 The DSMS Authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.dsms.modules.filesystem.controller; + +import io.swagger.annotations.Api; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +@RestController +@RequestMapping("/api/cephfs") +@Api(tags = "文件系统模块") +public class FileSystemController { + +} diff --git a/dsms-engine-application/src/main/java/com/dsms/modules/filesystem/service/impl/FileSystemServiceImpl.java b/dsms-engine-application/src/main/java/com/dsms/modules/filesystem/service/impl/FileSystemServiceImpl.java new file mode 100644 index 0000000000000000000000000000000000000000..76d63a03d7752ec1fcf8839bf08c43ae1c884a37 --- /dev/null +++ b/dsms-engine-application/src/main/java/com/dsms/modules/filesystem/service/impl/FileSystemServiceImpl.java @@ -0,0 +1,24 @@ +/* + * Copyright 2022 The DSMS Authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.dsms.modules.filesystem.service.impl; + +import com.dsms.dfsbroker.filesystem.service.IFileSystemService; +import org.springframework.stereotype.Service; + +@Service +public class FileSystemServiceImpl implements IFileSystemService { +} diff --git a/dsms-engine-common/src/main/java/com/dsms/common/constant/FileSystemStatusEnum.java b/dsms-engine-common/src/main/java/com/dsms/common/constant/FileSystemStatusEnum.java new file mode 100644 index 0000000000000000000000000000000000000000..6bd30b92a0eb1e322c2fe6d4e4d0dc6064ec7f9c --- /dev/null +++ b/dsms-engine-common/src/main/java/com/dsms/common/constant/FileSystemStatusEnum.java @@ -0,0 +1,36 @@ +/* + * Copyright 2022 The DSMS Authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.dsms.common.constant; + +import lombok.AllArgsConstructor; +import lombok.Getter; + +@Getter +@AllArgsConstructor +public enum FileSystemStatusEnum { + /** + * file system is stopped + */ + DOWN(0, "停用"), + /** + * file system is running + */ + ACTIVE(1, "运行"); + + private final int status; + private final String message; +} diff --git a/dsms-engine-dfsbroker/src/main/java/com/dsms/dfsbroker/filesystem/FileSystem.java b/dsms-engine-dfsbroker/src/main/java/com/dsms/dfsbroker/filesystem/FileSystem.java new file mode 100644 index 0000000000000000000000000000000000000000..af2cd3aa3576bcd9c39e228c0e847e646cd4b9ea --- /dev/null +++ b/dsms-engine-dfsbroker/src/main/java/com/dsms/dfsbroker/filesystem/FileSystem.java @@ -0,0 +1,46 @@ +/* + * Copyright 2022 The DSMS Authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.dsms.dfsbroker.filesystem; + + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +@Data +@ApiModel(value = "FileSystem对象", description = "文件系统") +public class FileSystem { + private static final long serialVersionUID = 1L; + + @ApiModelProperty(name = "文件系统名称") + private String fsName; + + @ApiModelProperty(name = "元数据存储池") + private String metadataPoolName; + + @ApiModelProperty(name = "数据存储池") + private String dataPoolName; + + @ApiModelProperty(name = "文件系统用量") + private String dataPoolUsedSize; + + @ApiModelProperty(name = "文件系统容量") + private String dataPoolTotalSize; + + @ApiModelProperty(name = "文件系统状态(0-停用,1-运行") + private Integer status; +} diff --git a/dsms-engine-dfsbroker/src/main/java/com/dsms/dfsbroker/filesystem/service/IFileSystemService.java b/dsms-engine-dfsbroker/src/main/java/com/dsms/dfsbroker/filesystem/service/IFileSystemService.java new file mode 100644 index 0000000000000000000000000000000000000000..5c73e4eaf3e80406620fbccf2a2a1a22942484cc --- /dev/null +++ b/dsms-engine-dfsbroker/src/main/java/com/dsms/dfsbroker/filesystem/service/IFileSystemService.java @@ -0,0 +1,22 @@ +/* + * Copyright 2022 The DSMS Authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.dsms.dfsbroker.filesystem.service; + +public interface IFileSystemService { + + +}