Source:
private boolean registerNewHost(Guid vdsGroupId, boolean IsPending) { boolean returnValue = true; VdsStatic vds = new VdsStatic(getParameters().getVdsHostName(), "", getStrippedVdsUniqueId(), getParameters().getVdsPort(), getParameters().getSSHPort(), getParameters().getSSHUser(), vdsGroupId, Guid.Empty, getParameters().getVdsName(), Config.<Boolean> getValue(ConfigValues.SSLEnabled), VDSType.VDS, Guid.Empty); vds.setSshKeyFingerprint(getParameters().getSSHFingerprint()); log.debugFormat( "RegisterVdsQuery::Register - Will try now to add VDS from scratch; Name: {0}, Hostname: {1}, Unique: {2}, VdsPort: {3},Subnet mask: {4}, IsPending: {5} with force synchronize", getParameters().getVdsName(), getParameters().getVdsHostName(), getStrippedVdsUniqueId(), getParameters().getVdsPort(), IsPending); AddVdsActionParameters p = new AddVdsActionParameters(vds, ""); p.setAddPending(IsPending); VdcReturnValueBase ret = Backend.getInstance().runInternalAction(VdcActionType.AddVds, p); if (ret == null || !ret.getSucceeded()) { log.errorFormat( "RegisterVdsQuery::Register - Registration failed for VDS - Name: {0}, Hostname: {1}, UniqueID: {2}, Subnet mask: {3}", getParameters().getVdsName(), getParameters().getVdsHostName(), getStrippedVdsUniqueId()); CaptureCommandErrorsToLogger(ret, "RegisterVdsQuery::Register"); error = AuditLogType.VDS_REGISTER_FAILED; returnValue = false; } else { log.infoFormat( "RegisterVdsQuery::Register - Registered a new VDS {3} - Name: {0}, Hostname: {1}, UniqueID: {2}", getParameters().getVdsName(), getParameters().getVdsHostName(), getStrippedVdsUniqueId(), IsPending ? "pending approval" : "automatically approved"); } return returnValue; }

Target:
private boolean registerNewHost(Guid vdsGroupId, boolean IsPending) { boolean returnValue = true; VdsStatic vds = new VdsStatic(getParameters().getVdsHostName(), "", getStrippedVdsUniqueId(), getParameters().getVdsPort(), getParameters().getSSHPort(), getParameters().getSSHUser(), vdsGroupId, Guid.Empty, getParameters().getVdsName(), Config.<Boolean> getValue(ConfigValues.SSLEnabled), VDSType.VDS, null); vds.setSshKeyFingerprint(getParameters().getSSHFingerprint()); log.debugFormat( "RegisterVdsQuery::Register - Will try now to add VDS from scratch; Name: {0}, Hostname: {1}, Unique: {2}, VdsPort: {3},Subnet mask: {4}, IsPending: {5} with force synchronize", getParameters().getVdsName(), getParameters().getVdsHostName(), getStrippedVdsUniqueId(), getParameters().getVdsPort(), IsPending); AddVdsActionParameters p = new AddVdsActionParameters(vds, ""); p.setAddPending(IsPending); VdcReturnValueBase ret = Backend.getInstance().runInternalAction(VdcActionType.AddVds, p); if (ret == null || !ret.getSucceeded()) { log.errorFormat( "RegisterVdsQuery::Register - Registration failed for VDS - Name: {0}, Hostname: {1}, UniqueID: {2}, Subnet mask: {3}", getParameters().getVdsName(), getParameters().getVdsHostName(), getStrippedVdsUniqueId()); CaptureCommandErrorsToLogger(ret, "RegisterVdsQuery::Register"); error = AuditLogType.VDS_REGISTER_FAILED; returnValue = false; } else { log.infoFormat( "RegisterVdsQuery::Register - Registered a new VDS {3} - Name: {0}, Hostname: {1}, UniqueID: {2}", getParameters().getVdsName(), getParameters().getVdsHostName(), getStrippedVdsUniqueId(), IsPending ? "pending approval" : "automatically approved"); } return returnValue; }