- private static Set<NetconfOperation> getAllNetconfOperations(Set<NetconfOperation> defaultNetconfOperations,
- NetconfOperationServiceSnapshot netconfOperationServiceSnapshot) {
- Set<NetconfOperation> result = new HashSet<>();
- result.addAll(defaultNetconfOperations);
-
- for (NetconfOperationService netconfOperationService : netconfOperationServiceSnapshot.getServices()) {
- final Set<NetconfOperation> netOpsFromService = netconfOperationService.getNetconfOperations();
- for (NetconfOperation netconfOperation : netOpsFromService) {
- Preconditions.checkState(!result.contains(netconfOperation),
- "Netconf operation %s already present", netconfOperation);
- result.add(netconfOperation);
- }
- }
- return Collections.unmodifiableSet(result);