+
+ if(lastException instanceof NotEnoughCapabilitiesException) {
+ LOG.error("Unable to push configuration due to missing yang models." +
+ " Yang models that are missing, but required by the configuration: {}." +
+ " For each mentioned model check: " +
+ " 1. that the mentioned yang model namespace/name/revision is identical to those in the yang model itself" +
+ " 2. the yang file is present in the system" +
+ " 3. the bundle with that yang file is present in the system and active" +
+ " 4. the yang parser did not fail while attempting to parse that model",
+ ((NotEnoughCapabilitiesException) lastException).getMissingCaps());
+ throw new IllegalStateException("Unable to push configuration due to missing yang models." +
+ " Required yang models that are missing: "
+ + ((NotEnoughCapabilitiesException) lastException).getMissingCaps(), lastException);
+ } else {
+ final String msg = "Unable to push configuration due to missing netconf service";
+ LOG.error(msg, lastException);
+ throw new IllegalStateException(msg, lastException);
+ }