import org.oran.smo.teiv.exception.TeivException;
import org.oran.smo.teiv.exception.YangModelException;
+import org.oran.smo.teiv.utils.yangparser.ExposureYangParser;
import org.oran.smo.yangtools.parser.data.YangData;
import org.oran.smo.yangtools.parser.findings.FindingSeverity;
import org.oran.smo.yangtools.parser.findings.ModuleAndFindingTypeAndSchemaNodePathFilterPredicate;
context.setIgnoreImportedProtocolAccessibleObjects(true);
context.setFailFast(false);
yangDeviceModel.parseIntoYangModels(context, yangModels);
+ ExposureYangParser.validateContext(findingsManager);
checkFindings(context.getFindingsManager(), severityCalculator);
assert inputYangModel != null;
import java.util.concurrent.CopyOnWriteArrayList;
import org.oran.smo.teiv.exception.YangException;
+import org.oran.smo.yangtools.parser.findings.FindingsManager;
import org.springframework.web.multipart.MultipartFile;
import org.oran.smo.yangtools.parser.ParserExecutionContext;
return resultMap;
}
+ public static void validateContext(FindingsManager findingsManager) {
+ YangFindingsManager.handleExposureFindings(findingsManager);
+ }
+
}
body('''{
"status": "BAD_REQUEST",
"message": "Invalid file input",
- "details": "Invalid file input: Module 'o-ran-smo-teiv-ran' multiple times in the input, with both conformance types IMPLEMENT and IMPORT."
+ "details": "Invalid file input: Module 'o-ran-smo-teiv-ran' has multiple revisions in the input, but desired exact revision not specified in the 'import' statement."
}''')
}
},
body('''{
"status": "BAD_REQUEST",
"message": "Invalid file input",
- "details": "Invalid file input: Missing content at the beginning of the document."
+ "details": "Invalid file input: Expected single statement ('module' or 'submodule')."
}''')
}
},