コード例 #1
0
    @Override
    public VdsStatic mapRow(ResultSet rs, int rowNum) throws SQLException {
      VdsStatic entity = new VdsStatic();
      entity.setHostName(rs.getString("host_name"));
      entity.setComment(rs.getString("free_text_comment"));
      entity.setManagementIp(rs.getString("ip"));
      entity.setUniqueID(rs.getString("vds_unique_id"));
      entity.setPort(rs.getInt("port"));
      entity.setProtocol(VdsProtocol.fromValue(rs.getInt("protocol")));
      entity.setVdsGroupId(getGuidDefaultEmpty(rs, "vds_group_id"));
      entity.setId(getGuidDefaultEmpty(rs, "vds_id"));
      entity.setSshPort(rs.getInt("ssh_port"));
      entity.setSshUsername(rs.getString("ssh_username"));
      entity.setVdsGroupId(Guid.createGuidFromStringDefaultEmpty(rs.getString("vds_group_id")));
      entity.setId(Guid.createGuidFromStringDefaultEmpty(rs.getString("vds_id")));
      entity.setVdsName(rs.getString("vds_name"));
      entity.setServerSslEnabled(rs.getBoolean("server_SSL_enabled"));
      entity.setVdsType(VDSType.forValue(rs.getInt("vds_type")));
      entity.setVdsStrength(rs.getInt("vds_strength"));
      entity.setPmType(rs.getString("pm_type"));
      entity.setPmUser(rs.getString("pm_user"));
      entity.setPmPassword(DbFacadeUtils.decryptPassword(rs.getString("pm_password")));
      entity.setPmPort((Integer) rs.getObject("pm_port"));
      entity.setPmOptions(rs.getString("pm_options"));
      entity.setPmEnabled(rs.getBoolean("pm_enabled"));
      entity.setPmProxyPreferences(rs.getString("pm_proxy_preferences"));
      entity.setPmSecondaryIp((rs.getString("pm_secondary_ip")));
      entity.setPmSecondaryType(rs.getString("pm_secondary_type"));
      entity.setPmSecondaryUser(rs.getString("pm_secondary_user"));
      entity.setPmSecondaryPassword(
          DbFacadeUtils.decryptPassword(rs.getString("pm_secondary_password")));
      entity.setPmSecondaryPort((Integer) rs.getObject("pm_secondary_port"));
      entity.setPmSecondaryOptions(rs.getString("pm_secondary_options"));
      entity.setPmSecondaryConcurrent(rs.getBoolean("pm_secondary_concurrent"));
      entity.setPmKdumpDetection(rs.getBoolean("pm_detect_kdump"));
      entity.setOtpValidity(rs.getLong("otp_validity"));
      entity.setSshKeyFingerprint(rs.getString("sshKeyFingerprint"));
      entity.setConsoleAddress(rs.getString("console_address"));
      entity.setDisablePowerManagementPolicy(rs.getBoolean("disable_auto_pm"));

      return entity;
    }
コード例 #2
0
  @Override
  public void setUp() throws Exception {
    super.setUp();

    dao = dbFacade.getVdsDynamicDao();
    staticDao = dbFacade.getVdsStaticDao();
    statisticsDao = dbFacade.getVdsStatisticsDao();
    existingVds = staticDao.get(FixturesTool.VDS_GLUSTER_SERVER2);

    newStaticVds = new VdsStatic();
    newStaticVds.setHostName("farkle.redhat.com");
    newStaticVds.setVdsGroupId(existingVds.getVdsGroupId());
    newStaticVds.setProtocol(VdsProtocol.STOMP);
    newDynamicVds = new VdsDynamic();
  }
コード例 #3
0
 private VdsStatic getVdsStatic() {
   VdsStatic vds = new VdsStatic();
   vds.setVdsGroupId(clusterId);
   vds.setHostName(serverName);
   return vds;
 }