- GetPmOutputBuilder pmOutputBuilder = new GetPmOutputBuilder();
- if (openRoadmVersion.getIntValue() == 1) {
- pmOutputBuilder = OlmUtils121.pmFetch(input, deviceTransactionManager);
- } else {
- pmOutputBuilder = OlmUtils22.pmFetch(input, deviceTransactionManager);
+ GetPmOutputBuilder pmOutputBuilder;
+ switch (openRoadmVersion.getIntValue()) {
+ case 1:
+ pmOutputBuilder = OlmUtils121.pmFetch(input, deviceTransactionManager);
+ break;
+ case 2:
+ pmOutputBuilder = OlmUtils221.pmFetch(input, deviceTransactionManager);
+ break;
+ case 3:
+ pmOutputBuilder = OlmUtils710.pmFetch(input, deviceTransactionManager);
+ break;
+ default:
+ LOG.error("Unrecognized OpenRoadm version");
+ pmOutputBuilder = new GetPmOutputBuilder();