- LOG.debug("poolName: %s ,idKey: %s", poolName, idKey);
-
- InstanceIdentifier.InstanceIdentifierBuilder<IdPool> idBuilder =
- InstanceIdentifier.builder(Pools.class).child(IdPool.class, new IdPoolKey(poolName));
- InstanceIdentifier<IdPool> id = idBuilder.build();
- Optional<IdPool> globalPool = read(LogicalDatastoreType.OPERATIONAL, id);
- Long newIdValue = null;
- GeneratedIds newGenId = null;
- if (globalPool.isPresent()) {
- IdPool pool = globalPool.get();
- List<GeneratedIds> generatedIds = pool.getGeneratedIds();
-
- if (!generatedIds.isEmpty()) {
- for (GeneratedIds gen_id : generatedIds) {
- if (gen_id.getIdKey().equals(idKey)) {
- newIdValue = gen_id.getIdValue();
- LOG.debug("Existing id for the key %s ", idKey);
- }
+ LOG.debug("poolName: {} ,idKey: {}", poolName, idKey);
+ RpcResultBuilder<GetUniqueIdOutput> rpcResultBuilder;