remove hostIpaddress from startNbdCommand

This commit is contained in:
Abhisar Sinha 2026-02-27 13:29:06 +05:30 committed by Abhishek Kumar
parent 0dadbadb52
commit b68e541b31
3 changed files with 2 additions and 17 deletions

View File

@ -21,7 +21,6 @@ import com.cloud.agent.api.Command;
public class StartNBDServerCommand extends Command {
private String transferId;
private String hostIpAddress;
private String exportName;
private String volumePath;
private String socket;
@ -30,19 +29,14 @@ public class StartNBDServerCommand extends Command {
public StartNBDServerCommand() {
}
protected StartNBDServerCommand(String transferId, String hostIpAddress, String exportName, String volumePath, String direction) {
protected StartNBDServerCommand(String transferId, String exportName, String volumePath, String socket, String direction) {
this.transferId = transferId;
this.hostIpAddress = hostIpAddress;
this.socket = socket;
this.exportName = exportName;
this.volumePath = volumePath;
this.direction = direction;
}
public StartNBDServerCommand(String transferId, String hostIpAddress, String exportName, String volumePath, String socket, String direction) {
this(transferId, hostIpAddress, exportName, volumePath, direction);
this.socket = socket;
}
public String getExportName() {
return exportName;
}
@ -51,10 +45,6 @@ public class StartNBDServerCommand extends Command {
return socket;
}
public String getHostIpAddress() {
return hostIpAddress;
}
public String getTransferId() {
return transferId;
}

View File

@ -39,7 +39,6 @@ public class LibvirtStartNBDServerCommandWrapper extends CommandWrapper<StartNBD
public Answer execute(StartNBDServerCommand cmd, LibvirtComputingResource resource) {
String volumePath = cmd.getVolumePath();
String socket = cmd.getSocket();
String hostIpAddress = cmd.getHostIpAddress();
String exportName = cmd.getExportName();
String transferId = cmd.getTransferId();
@ -49,9 +48,6 @@ public class LibvirtStartNBDServerCommandWrapper extends CommandWrapper<StartNBD
if (StringUtils.isBlank(exportName)) {
return new StartNBDServerAnswer(cmd, false, "Export name is required for the nbd server");
}
if (StringUtils.isBlank(hostIpAddress)) {
return new StartNBDServerAnswer(cmd, false, "Host IP address is required for the nbd server");
}
if (StringUtils.isBlank(socket)) {
return new StartNBDServerAnswer(cmd, false, "Socket is required for the nbd server");
}

View File

@ -395,7 +395,6 @@ public class IncrementalBackupServiceImpl extends ManagerBase implements Increme
}
StartNBDServerCommand nbdServerCmd = new StartNBDServerCommand(
transferId,
host.getPublicIpAddress(),
exportName,
volumePath,
transferId,