+ public void setIdManager(IdManagerService idManager) {
+ this.idManager = idManager;
+ }
+
+ private void createIdPool() {
+ CreateIdPoolInput createPool = new CreateIdPoolInputBuilder()
+ .setPoolName(VpnConstants.VPN_IDPOOL_NAME)
+ .setIdStart(VpnConstants.VPN_IDPOOL_START)
+ .setPoolSize(new BigInteger(VpnConstants.VPN_IDPOOL_SIZE))
+ .build();
+ try {
+ Future<RpcResult<Void>> result = idManager.createIdPool(createPool);
+ if ((result != null) && (result.get().isSuccessful())) {
+ LOG.debug("Created IdPool for VPN Service");
+ }
+ } catch (InterruptedException | ExecutionException e) {
+ LOG.error("Failed to create idPool for VPN Service",e);
+ }
+ }
+