Skip to content

Commit 9d2c79b

Browse files
jeongda-youngDajeong-Park
authored andcommitted
vhba 수정3
1 parent 92e88a2 commit 9d2c79b

File tree

5 files changed

+7
-12
lines changed

5 files changed

+7
-12
lines changed

core/src/main/java/com/cloud/resource/ServerResourceBase.java

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@
5959
import org.apache.commons.lang3.StringUtils;
6060
import org.apache.logging.log4j.LogManager;
6161
import org.apache.logging.log4j.Logger;
62+
import org.json.JSONArray;
63+
import org.json.JSONObject;
6264
import javax.naming.ConfigurationException;
6365

6466
public abstract class ServerResourceBase implements ServerResource {
@@ -358,16 +360,9 @@ protected Answer listHostHbaDevices(Command command) {
358360
return new ListHostHbaDeviceAnswer(true, hostDevicesNames, hostDevicesText);
359361
}
360362

361-
protected Answer createHostVHbaDevices(Command command) {
363+
public Answer createHostVHbaDevice(Command command, String parentHbaName, String wwnn, String wwpn, String vhbaName, String xmlContent) {
362364
try {
363365
CreateVhbaDeviceCommand cmd = (CreateVhbaDeviceCommand) command;
364-
String parentHbaName = cmd.getParentHbaName();
365-
String wwnn = cmd.getWwnn();
366-
String wwpn = cmd.getWwpn();
367-
String vhbaName = cmd.getVhbaName();
368-
String xmlContent = cmd.getXmlContent();
369-
370-
// Vue에서 받은 XML을 임시 파일로 저장
371366
String xmlFilePath = "/tmp/" + vhbaName + ".xml";
372367
try (FileWriter writer = new FileWriter(xmlFilePath)) {
373368
writer.write(xmlContent);

plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/wrapper/LibvirtlistHostDevicesCommandWrapper.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
import com.cloud.agent.api.ListHostDeviceCommand;
2727

2828
@ResourceWrapper(handles = ListHostDeviceCommand.class)
29-
public final class LibvirtListHostDevicesCommandWrapper
29+
public final class LibvirtlistHostDevicesCommandWrapper
3030
extends CommandWrapper<ListHostDeviceCommand, Answer, LibvirtComputingResource> {
3131
@Override
3232
public Answer execute(final ListHostDeviceCommand command,

plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/wrapper/LibvirtlistHostHbaDevicesCommandWrapper.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
import com.cloud.resource.ResourceWrapper;
2727

2828
@ResourceWrapper(handles = ListHostHbaDeviceCommand.class)
29-
public final class LibvirtListHostHbaDevicesCommandWrapper
29+
public final class LibvirtlistHostHbaDevicesCommandWrapper
3030
extends CommandWrapper<ListHostHbaDeviceCommand, Answer, LibvirtComputingResource> {
3131
@Override
3232
public Answer execute(final ListHostHbaDeviceCommand command,

plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/wrapper/LibvirtlistHostLunDevicesCommandWrapper.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
import com.cloud.resource.ResourceWrapper;
2727

2828
@ResourceWrapper(handles = ListHostLunDeviceCommand.class)
29-
public final class LibvirtListHostLunDevicesCommandWrapper
29+
public final class LibvirtlistHostLunDevicesCommandWrapper
3030
extends CommandWrapper<ListHostLunDeviceCommand, Answer, LibvirtComputingResource> {
3131
@Override
3232
public Answer execute(final ListHostLunDeviceCommand command,

plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/wrapper/LibvirtlistHostUsbDevicesCommandWrapper.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
import com.cloud.resource.ResourceWrapper;
2727

2828
@ResourceWrapper(handles = ListHostUsbDeviceCommand.class)
29-
public final class LibvirtListHostUsbDevicesCommandWrapper
29+
public final class LibvirtlistHostUsbDevicesCommandWrapper
3030
extends CommandWrapper<ListHostUsbDeviceCommand, Answer, LibvirtComputingResource> {
3131
@Override
3232
public Answer execute(final ListHostUsbDeviceCommand command,

0 commit comments

Comments
 (0)