Esempio n. 1
0
  /**
   * Inserts an add cable modem command into the batch.
   *
   * @param ownerID Customer/Account ID for this cable modem
   * @param macAddress MAC address of the cable modem
   * @param classOfService The class of service to assign to this modem
   */
  public void addCableModem(
      String ownerID, String macAddress, String classOfService, String dhcpCriteria) {
    if (batch != null) {

      if (ownerID.equals("null")) {
        ownerID = null;
      }

      if (classOfService.equals("null")) {
        classOfService = null;
      }

      if (dhcpCriteria.equals("null")) {
        dhcpCriteria = null;
      }

      List devIds = new ArrayList();
      devIds.add(new MACAddress(macAddress));
      batch.add(
          DeviceType.DOCSIS,
          devIds,
          // macAddress,
          null,
          null,
          ownerID,
          classOfService,
          dhcpCriteria,
          null);
    }
  }
Esempio n. 2
0
  public void addPacketCableMTA(
      String ownerID, String macAddress, String classOfService, String dhcpCriteria) {
    if (batch != null) {

      if (ownerID.equals("null")) {
        ownerID = null;
      }

      if (classOfService.equals("null")) {
        classOfService = null;
      }

      if (dhcpCriteria.equals("null")) {
        dhcpCriteria = null;
      }

      String hostname = macAddress.replace(':', '-');
      hostname = hostname.replace(',', '-');

      String domainName = "duovoip.loc";

      if (dhcpCriteria != null && dhcpCriteria.equals("provisioned-packet-cable")) {
        dhcpCriteria = "provisioned-packet-cable-mta";
      }

      List devIds = new ArrayList();
      devIds.add(new MACAddress(macAddress));
      batch.add(
          DeviceType.PACKET_CABLE_MTA,
          devIds,
          // macAddress,
          hostname,
          domainName,
          ownerID,
          classOfService,
          dhcpCriteria,
          null);
    }
  }