protected T getMethod() {
    if (method == null) {
      VdsStatic vdsStatic = getAndSetVdsStatic();

      Pair<String, URL> urlInfo =
          XmlRpcUtils.getConnectionUrl(
              vdsStatic.getHostName(),
              vdsStatic.getPort(),
              "",
              Config.<Boolean>getValue(ConfigValues.EncryptHostCommunication));

      method = concreteCreateMethod(urlInfo.getFirst());
    }

    return method;
  }
  @Override
  protected void executeQueryCommand() {
    VdsStatic host = getDbFacade().getVdsStaticDao().get(getParameters().getId());
    if (host == null) {
      failWith(EngineMessage.ACTION_TYPE_FAILED_HOST_NOT_EXIST);
      return;
    }

    Provider<?> provider = getHostProvider(host);
    if (provider == null) {
      failWith(EngineMessage.NO_FOREMAN_PROVIDER_FOR_HOST);
      return;
    }

    HostProviderProxy proxy = getHostProviderProxy(provider);
    ErrataData errataForHost =
        proxy.getErrataForHost(host.getHostName(), getParameters().getErrataFilter());
    setReturnValue(errataForHost.getErrataCounts());
  }
 private MapSqlParameterSource getInsertOrUpdateParams(final VdsStatic vds) {
   return getCustomMapSqlParameterSource()
       .addValue("host_name", vds.getHostName())
       .addValue("free_text_comment", vds.getComment())
       .addValue("ip", vds.getManagementIp())
       .addValue("vds_unique_id", vds.getUniqueID())
       .addValue("port", vds.getPort())
       .addValue("protocol", vds.getProtocol())
       .addValue("vds_group_id", vds.getVdsGroupId())
       .addValue("vds_id", vds.getId())
       .addValue("vds_name", vds.getName())
       .addValue("server_SSL_enabled", vds.isServerSslEnabled())
       .addValue("vds_type", vds.getVdsType())
       .addValue("vds_strength", vds.getVdsStrength())
       .addValue("pm_type", vds.getPmType())
       .addValue("pm_user", vds.getPmUser())
       .addValue("pm_password", DbFacadeUtils.encryptPassword(vds.getPmPassword()))
       .addValue("pm_port", vds.getPmPort())
       .addValue("pm_options", vds.getPmOptions())
       .addValue("pm_enabled", vds.isPmEnabled())
       .addValue("pm_proxy_preferences", vds.getPmProxyPreferences())
       .addValue("pm_secondary_ip", vds.getPmSecondaryIp())
       .addValue("pm_secondary_type", vds.getPmSecondaryType())
       .addValue("pm_secondary_user", vds.getPmSecondaryUser())
       .addValue(
           "pm_secondary_password", DbFacadeUtils.encryptPassword(vds.getPmSecondaryPassword()))
       .addValue("pm_secondary_port", vds.getPmSecondaryPort())
       .addValue("pm_secondary_options", vds.getPmSecondaryOptions())
       .addValue("pm_secondary_concurrent", vds.isPmSecondaryConcurrent())
       .addValue("pm_detect_kdump", vds.isPmKdumpDetection())
       .addValue("otp_validity", vds.getOtpValidity())
       .addValue("vds_spm_priority", vds.getVdsSpmPriority())
       .addValue("console_address", vds.getConsoleAddress())
       .addValue("sshKeyFingerprint", vds.getSshKeyFingerprint())
       .addValue("ssh_port", vds.getSshPort())
       .addValue("ssh_username", vds.getSshUsername())
       .addValue("disable_auto_pm", vds.isDisablePowerManagementPolicy());
 }