@Test public void getUsedYangModulesByDeviceA() throws Exception { executeLibCheckTest("get-deviceA-used-yang-modules-response.xml", document -> libInfoChecker.getUsedYangModulesPerDevice(document, DEVICE_A)); }
@Override public Element getUsedYangModulesPerDevice(Document responseDoc, String devName) { m_nsMap2UsedYangModule.clear(); NetConfResponse response = getAllConfigOfEachDevice(devName); Device device = getDeviceManager().getDevice(devName); collectAllCfgCorrespondingYangModules(response, device, null); DeviceAdapterId deviceAdapterId = getDevReferredAdapterId(device); Element devUsedYangModulesEl = responseDoc .createElementNS(LibraryConsultUtils.NAMESPACE, LibraryConsultUtils.DEVICE_USED_YANG_MODULES); Element relateAdapterEl = responseDoc.createElementNS(LibraryConsultUtils.NAMESPACE, LibraryConsultUtils.RELATED_ADAPTER); buildAdapterIdElement(responseDoc, deviceAdapterId, relateAdapterEl); devUsedYangModulesEl.appendChild(relateAdapterEl); devUsedYangModulesEl.appendChild(buildAllUsedYangModulesWithExtraEl(responseDoc, null)); return devUsedYangModulesEl; }
LibInfoCheckerImpl extends BaseLibConsult implements LibInfoChecker { @Override public Element getUsedYangModulesPerDevice(Document responseDoc, String devName) { m_nsMap2UsedYangModule.clear(); NetConfResponse response = getAllConfigOfEachDevice(devName); Device device = getDeviceManager().getDevice(devName); collectAllCfgCorrespondingYangModules(response, device, null); DeviceAdapterId deviceAdapterId = getDevReferredAdapterId(device); Element devUsedYangModulesEl = responseDoc .createElementNS(LibraryConsultUtils.NAMESPACE, LibraryConsultUtils.DEVICE_USED_YANG_MODULES); Element relateAdapterEl = responseDoc.createElementNS(LibraryConsultUtils.NAMESPACE, LibraryConsultUtils.RELATED_ADAPTER); buildAdapterIdElement(responseDoc, deviceAdapterId, relateAdapterEl); devUsedYangModulesEl.appendChild(relateAdapterEl); devUsedYangModulesEl.appendChild(buildAllUsedYangModulesWithExtraEl(responseDoc, null)); return devUsedYangModulesEl; } }
LibInfoCheckerImpl extends BaseLibConsult implements LibInfoChecker { @Override public Element getUsedYangModulesPerDevice(Document responseDoc, String devName) { m_nsMap2UsedYangModule.clear(); NetConfResponse response = getAllConfigOfEachDevice(devName); Device device = getDeviceManager().getDevice(devName); collectAllCfgCorrespondingYangModules(response, device, null); DeviceAdapterId deviceAdapterId = getDevReferredAdapterId(device); Element devUsedYangModulesEl = responseDoc .createElementNS(LibraryConsultUtils.NAMESPACE, LibraryConsultUtils.DEVICE_USED_YANG_MODULES); Element relateAdapterEl = responseDoc.createElementNS(LibraryConsultUtils.NAMESPACE, LibraryConsultUtils.RELATED_ADAPTER); buildAdapterIdElement(responseDoc, deviceAdapterId, relateAdapterEl); devUsedYangModulesEl.appendChild(relateAdapterEl); devUsedYangModulesEl.appendChild(buildAllUsedYangModulesWithExtraEl(responseDoc, null)); return devUsedYangModulesEl; } LibInfoCheckerImpl(AdapterManager adapterManager, DeviceManager deviceManager, PmaRegistry pmaRegistry); }
LibInfoCheckerImpl extends BaseLibConsult implements LibInfoChecker { @Override public Element getUsedYangModulesPerDevice(Document responseDoc, String devName) { m_nsMap2UsedYangModule.clear(); NetConfResponse response = getAllConfigOfEachDevice(devName); Device device = getDeviceManager().getDevice(devName); collectAllCfgCorrespondingYangModules(response, device, null); DeviceAdapterId deviceAdapterId = getDevReferredAdapterId(device); Element devUsedYangModulesEl = responseDoc .createElementNS(LibraryConsultUtils.NAMESPACE, LibraryConsultUtils.DEVICE_USED_YANG_MODULES); Element relateAdapterEl = responseDoc.createElementNS(LibraryConsultUtils.NAMESPACE, LibraryConsultUtils.RELATED_ADAPTER); buildAdapterIdElement(responseDoc, deviceAdapterId, relateAdapterEl); devUsedYangModulesEl.appendChild(relateAdapterEl); devUsedYangModulesEl.appendChild(buildAllUsedYangModulesWithExtraEl(responseDoc, null)); return devUsedYangModulesEl; } LibInfoCheckerImpl(AdapterManager adapterManager, DeviceManager deviceManager, PmaRegistry pmaRegistry); @Override Element getSpecificUsedYangModules(String moduleName, String revisionDate, Document responseDoc); @Override Element getAllUsedYangModules(Document responseDoc); @Override Element getUsedYangModulesPerDevice(Document responseDoc, String devName); }
LibInfoCheckerImpl extends BaseLibConsult implements LibInfoChecker { @Override public Element getUsedYangModulesPerDevice(Document responseDoc, String devName) { m_nsMap2UsedYangModule.clear(); NetConfResponse response = getAllConfigOfEachDevice(devName); Device device = getDeviceManager().getDevice(devName); collectAllCfgCorrespondingYangModules(response, device, null); DeviceAdapterId deviceAdapterId = getDevReferredAdapterId(device); Element devUsedYangModulesEl = responseDoc .createElementNS(LibraryConsultUtils.NAMESPACE, LibraryConsultUtils.DEVICE_USED_YANG_MODULES); Element relateAdapterEl = responseDoc.createElementNS(LibraryConsultUtils.NAMESPACE, LibraryConsultUtils.RELATED_ADAPTER); buildAdapterIdElement(responseDoc, deviceAdapterId, relateAdapterEl); devUsedYangModulesEl.appendChild(relateAdapterEl); devUsedYangModulesEl.appendChild(buildAllUsedYangModulesWithExtraEl(responseDoc, null)); return devUsedYangModulesEl; } LibInfoCheckerImpl(AdapterManager adapterManager, DeviceManager deviceManager, PmaRegistry pmaRegistry); @Override Element getSpecificUsedYangModules(String moduleName, String revisionDate, Document responseDoc); @Override Element getAllUsedYangModules(Document responseDoc); @Override Element getUsedYangModulesPerDevice(Document responseDoc, String devName);  }