Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
4f8e768
rack 기능 추가
stardom3645 Jun 12, 2025
8ce65cc
Rack 시각화 localhost -> listcapabilitiesresponse.capability.host 값으로 변경
stardom3645 Jul 14, 2025
2a0cc92
Merge branch 'ablestack-diplo' into ablestack-diplo-rack
stardom3645 Jul 14, 2025
2320ce7
Merge branch 'ablestack-diplo' into ablestack-diplo-rack
stardom3645 Jan 5, 2026
b6d4645
Merge branch 'ablecloud-team:ablestack-diplo' into ablestack-diplo-rack
stardom3645 Feb 24, 2026
777ce1c
Merge branch 'ablecloud-team:ablestack-diplo' into ablestack-diplo-rack
stardom3645 Feb 25, 2026
9146ff3
[랙 시각화] 1. Rack 시각화 기능 생성
stardom3645 Mar 19, 2026
761b17d
롤백
stardom3645 Mar 19, 2026
f1a7a85
Merge branch 'ablestack-diplo-rack' into ablestack-diplo
stardom3645 Apr 30, 2026
29fa458
Merge pull request #64 from stardom3645/ablestack-diplo
stardom3645 Apr 30, 2026
434fbe1
[랙 시각화] 드래그로 장치이동하도록 변경. 장치마다 커스텀 링크 추가 가능. 호스트의 경우 운영장비와 매칭할 수 있도록 기…
stardom3645 May 6, 2026
f6aec26
[랙 시각화] 드래그로 장치이동하도록 변경. 장치마다 커스텀 링크 추가 가능. 호스트의 경우 운영장비와 매칭할 수 있도록 기…
stardom3645 May 6, 2026
77ea1b6
[랙 시각화] (1)다국어 수정 (2)VM목록 클릭시 이동 기능
stardom3645 May 8, 2026
718f570
[랙 시각화] antdesign 적용하여 화이트 톤으로 변경하고 랙 리스트를 만들어 단계별로 랙을 하나씩 확인할 수 있도록 …
stardom3645 May 14, 2026
eed7ef1
[랙 시각화] (1)gen_toc 추가
stardom3645 May 22, 2026
50eecbd
[랙 시각화] (1)gen_toc 추가
stardom3645 May 22, 2026
0f04d9f
[랙 시각화] 랙리스트 카드 아이콘 파일 추가
stardom3645 May 26, 2026
82ad013
[Mold][랙 시각화] 랙 리스트 마우스 오버 로직 변경
stardom3645 May 28, 2026
1954e44
[Mold][랙 시각화] 2차 변경
stardom3645 Jun 8, 2026
8dc5c45
[Mold][랙 시각화] 랙 리스트 카드형, 목록형으로 변경
stardom3645 Jun 29, 2026
b5523aa
[Mold][랙 시각화] 다크테마 수정, 정규성 추가
stardom3645 Jul 3, 2026
ae55984
[Mold][랙 시각화] 백앤드 검증
stardom3645 Jul 3, 2026
44af06a
[Mold][랙 시각화] 샘플 가상머신 모드 false
stardom3645 Jul 3, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -647,6 +647,11 @@
<artifactId>cloud-plugin-integrations-wall-alerts</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.cloudstack</groupId>
<artifactId>cloud-plugin-integrations-rack-management</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.cloudstack</groupId>
<artifactId>cloud-plugin-shutdown</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,20 @@ INSERT IGNORE INTO `cloud`.`vbmc_port` (id, port) VALUES (19, 6248);
INSERT IGNORE INTO `cloud`.`vbmc_port` (id, port) VALUES (20, 6249);
INSERT IGNORE INTO `cloud`.`vbmc_port` (id, port) VALUES (21, 6250);


-- BEGIN TABLE rackml_config
CREATE TABLE IF NOT EXISTS `rackml_config` (
`id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT 'primary key',
`zone_id` bigint unsigned NOT NULL COMMENT 'foreign key to data_center.id',
`name` varchar(100) NOT NULL COMMENT 'config name (e.g. default)',
`content` text NOT NULL COMMENT 'RackML content',
`updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'last update time',
PRIMARY KEY (`id`),
UNIQUE KEY `uc_rackml_zone_name` (`zone_id`, `name`),
CONSTRAINT `fk_rackml__zone` FOREIGN KEY (`zone_id`) REFERENCES `data_center` (`id`)
ON DELETE RESTRICT
ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb3;
CALL `cloud`.`IDEMPOTENT_ADD_COLUMN`('cloud.host', 'migration_ip', 'VARCHAR(45)');

-- backup offering table update
Expand Down
140 changes: 140 additions & 0 deletions plugins/integrations/rack-management/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,140 @@
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you 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.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd">

<modelVersion>4.0.0</modelVersion>
<artifactId>cloud-plugin-integrations-rack-management</artifactId>
<name>Apache CloudStack Plugin - Rack Management</name>
<parent>
<groupId>org.apache.cloudstack</groupId>
<artifactId>cloudstack-plugins</artifactId>
<version>4.21.0.0-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<dependencies>
<dependency>
<groupId>org.apache.cloudstack</groupId>
<artifactId>cloud-core</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.cloudstack</groupId>
<artifactId>cloud-framework-db</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.cloudstack</groupId>
<artifactId>cloud-framework-ca</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.cloudstack</groupId>
<artifactId>cloud-framework-security</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.cloudstack</groupId>
<artifactId>cloud-engine-schema</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.cloudstack</groupId>
<artifactId>cloud-engine-api</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.cloudstack</groupId>
<artifactId>cloud-engine-components-api</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.cloudstack</groupId>
<artifactId>cloud-framework-managed-context</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.eclipse.persistence</groupId>
<artifactId>javax.persistence</artifactId>
<version>${cs.jpa.version}</version>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>${cs.gson.version}</version>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>${cs.guava.version}</version>
</dependency>
<dependency>
<groupId>ch.qos.reload4j</groupId>
<artifactId>reload4j</artifactId>
<version>${cs.reload4j.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>${org.springframework.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-aop</artifactId>
<version>${org.springframework.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
<version>${org.springframework.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
<version>${org.springframework.version}</version>
</dependency>
<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
<version>${cs.codec.version}</version>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-library</artifactId>
<version>${cs.hamcrest.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcprov-jdk15on</artifactId>
<version>${cs.bcprov.version}</version>
</dependency>
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bctls-jdk15on</artifactId>
<version>${cs.bcprov.version}</version>
</dependency>
<dependency>
<groupId>joda-time</groupId>
<artifactId>joda-time</artifactId>
<version>${cs.joda-time.version}</version>
</dependency>
</dependencies>
</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you 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.cloud.rack;

import com.cloud.utils.db.GenericDao;

public interface RackLayoutDao extends GenericDao<RackLayoutVO, Long> {
RackLayoutVO findByZoneAndName(Long zoneId, String name);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you 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.cloud.rack;

import org.springframework.stereotype.Component;

import com.cloud.utils.db.GenericDaoBase;
import com.cloud.utils.db.SearchBuilder;
import com.cloud.utils.db.SearchCriteria;

@Component
public class RackLayoutDaoImpl extends GenericDaoBase<RackLayoutVO, Long> implements RackLayoutDao {

private final SearchBuilder<RackLayoutVO> ZoneNameSearch;

public RackLayoutDaoImpl() {
ZoneNameSearch = createSearchBuilder();
ZoneNameSearch.and("zoneId", ZoneNameSearch.entity().getZoneId(), SearchCriteria.Op.EQ);
ZoneNameSearch.and("name", ZoneNameSearch.entity().getName(), SearchCriteria.Op.EQ);
ZoneNameSearch.done();
}

@Override
public RackLayoutVO findByZoneAndName(Long zoneId, String name) {
SearchCriteria<RackLayoutVO> sc = ZoneNameSearch.create();
sc.setParameters("zoneId", zoneId);
sc.setParameters("name", name);
return findOneBy(sc);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you 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.cloud.rack;

import java.util.ArrayList;
import java.util.List;
import javax.inject.Inject;

import org.apache.log4j.Logger;
import org.springframework.stereotype.Component;

import org.apache.cloudstack.api.command.admin.rack.ListRackLayoutsCmd;
import org.apache.cloudstack.api.command.admin.rack.UpdateRackLayoutCmd;
import org.apache.cloudstack.api.response.ListResponse;
import org.apache.cloudstack.api.response.RackLayoutResponse;
import com.cloud.dc.DataCenterVO;
import com.cloud.dc.dao.DataCenterDao;
import com.cloud.utils.component.ManagerBase;

@Component
public class RackLayoutManagerImpl extends ManagerBase implements RackLayoutService {
private static final Logger s_logger = Logger.getLogger(RackLayoutManagerImpl.class);

@Inject
private RackLayoutDao rackLayoutDao;

@Inject
private DataCenterDao dataCenterDao;

@Override
public ListResponse<RackLayoutResponse> listRackLayouts(ListRackLayoutsCmd cmd) {
Long zoneId = cmd.getZoneId();
String name = cmd.getName();

RackLayoutVO vo = rackLayoutDao.findByZoneAndName(zoneId, name);
List<RackLayoutResponse> responses = new ArrayList<>();

if (vo != null) {
responses.add(createRackLayoutResponse(vo));
}

ListResponse<RackLayoutResponse> listResponse = new ListResponse<>();
listResponse.setResponses(responses);
return listResponse;
}

@Override
public RackLayoutResponse updateRackLayout(UpdateRackLayoutCmd cmd) {
Long zoneId = cmd.getZoneId();
String name = cmd.getName();
String content = cmd.getContent();

RackLayoutVO vo = rackLayoutDao.findByZoneAndName(zoneId, name);

if (vo == null) {
// (INSERT)
vo = new RackLayoutVO(zoneId, name, content);
rackLayoutDao.persist(vo);
s_logger.debug("Created new rack layout for zone: " + zoneId + ", name: " + name);
} else {
// (UPDATE)
vo.setContent(content);
rackLayoutDao.update(vo.getId(), vo);
s_logger.debug("Updated existing rack layout for zone: " + zoneId + ", name: " + name);
}

return createRackLayoutResponse(vo);
}

// VO 객체를 API Response 포맷으로 예쁘게 변환해 주는 헬퍼 메서드
private RackLayoutResponse createRackLayoutResponse(RackLayoutVO vo) {
RackLayoutResponse response = new RackLayoutResponse();
response.setId(String.valueOf(vo.getId()));
response.setName(vo.getName());
response.setContent(vo.getContent());

// 프론트엔드가 사용할 수 있도록 Zone ID를 UUID 포맷으로 변환하여 반환
DataCenterVO zone = dataCenterDao.findById(vo.getZoneId());
if (zone != null) {
response.setZoneId(zone.getUuid());
}

response.setObjectName("racklayout");
return response;
}

@Override
public List<Class<?>> getCommands() {
List<Class<?>> cmdList = new ArrayList<>();
cmdList.add(ListRackLayoutsCmd.class);
cmdList.add(UpdateRackLayoutCmd.class);
return cmdList;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you 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.cloud.rack;

import org.apache.cloudstack.api.command.admin.rack.ListRackLayoutsCmd;
import org.apache.cloudstack.api.command.admin.rack.UpdateRackLayoutCmd;
import org.apache.cloudstack.api.response.ListResponse;
import org.apache.cloudstack.api.response.RackLayoutResponse;

import com.cloud.utils.component.PluggableService;

public interface RackLayoutService extends PluggableService {
ListResponse<RackLayoutResponse> listRackLayouts(ListRackLayoutsCmd cmd);
RackLayoutResponse updateRackLayout(UpdateRackLayoutCmd cmd);
}
Loading
Loading