Package jnipap

Examples of jnipap.Pool


   * @param id Pool ID to search for
   * @return Pool with ID 'id'
   */
  public static OPool getPool(OConnection conn, int id) throws JnipapException {

    Pool p = Pool.get((Connection)conn, new Integer(id));
    return toSQLObj(p);

  }
View Full Code Here


   * Test adding and getting a pool
   */
  @Test
  public void addGetPool() {

    Pool pool1, pool2;

    pool1 = new Pool();
    pool1.name = "Test pool #1";
    pool1.description = "A first test pool.";
    pool1.default_type = "assignment";
    pool1.ipv4_default_prefix_length = 28;
    pool1.ipv6_default_prefix_length = 64;

    try {
      pool1.save(this.connection);
      pool2 = Pool.get(this.connection, pool1.id);
    } catch (JnipapException e) {
      fail("Operation resulted in " + e.getClass().getName() + " with message \"" + e.getMessage() + "\"");
      return;
    }
View Full Code Here

TOP

Related Classes of jnipap.Pool

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.