Commit 177fee06 authored by canterburym's avatar canterburym
Browse files

Resolving merge conflict

parents 06e221ac f49d55af
Loading
Loading
Loading
Loading
Loading
+46 −2
Original line number Diff line number Diff line
@@ -283,7 +283,12 @@ XIRIEvent ::= CHOICE
    -- IMS events, see clause 7.12.4.2, continued from tag 107
    iMSDataChannelSetup                                 [162] IMSDataChannelSetup,
    iMSDataChannelModification                          [163] IMSDataChannelModification,
    iMSDataChannelTermination                           [164] IMSDataChannelTermination
    iMSDataChannelTermination                           [164] IMSDataChannelTermination,
    -- NEF events, see clause 7.7.X.1
    nEF5GVNGroupCreation                                [165] NEF5GVNGroupCreation,
    nEF5GVNGroupUpdate                                  [166] NEF5GVNGroupUpdate,
    nEF5GVNGroupDeletion                                [167] NEF5GVNGroupDeletion,
    nEF5GVNGroupQuery                                   [168] NEF5GVNGroupQuery
}

-- ==============
@@ -550,7 +555,13 @@ IRIEvent ::= CHOICE
    -- IMS events, see clause 7.12.7, continued from tag 107
    iMSDataChannelSetup                                 [162] IMSDataChannelSetup,
    iMSDataChannelModification                          [163] IMSDataChannelModification,
    iMSDataChannelTermination                           [164] IMSDataChannelTermination
    iMSDataChannelTermination                           [164] IMSDataChannelTermination,

    -- NEF events, see clause 7.7.X.2
    nEF5GVNGroupCreation                                [165] NEF5GVNGroupCreation,
    nEF5GVNGroupUpdate                                  [166] NEF5GVNGroupUpdate,
    nEF5GVNGroupDeletion                                [167] NEF5GVNGroupDeletion,
    nEF5GVNGroupQuery                                   [168] NEF5GVNGroupQuery
}

IRITargetIdentifier ::= SEQUENCE
@@ -828,6 +839,39 @@ NEFAFSessionWithQoSNotification ::= SEQUENCE
    aForASSessionWithQoSResponseCode     [4] AForASSessionWithQoSResponseCode
}

-- See clause 7.7.X.1.2 for details of this structure
NEF5GVNGroupCreation ::= SEQUENCE
{
    aFID                        [1] AFID,
    gPSI                        [2] GPSI,
    fiveGLanParametersProvision [3] SBIType
}

-- See clause 7.7.X.1.3 for details of this structure
NEF5GVNGroupUpdate ::= SEQUENCE
{
    aFID                             [1] AFID,
    gPSI                             [2] GPSI,
    fiveGLanParametersProvision      [3] SBIType OPTIONAL,
    fiveGLanParametersProvisionPatch [4] SBIType OPTIONAL
}

-- See clause 7.7.X.1.4 for details of this structure
NEF5GVNGroupDeletion ::= SEQUENCE
{
    aFID            [1] AFID,
    gPSI            [2] GPSI,
    externalGroupID [3] OCTET STRING
}

-- See clause 7.7.X.1.5 for details of this structure
NEF5GVNGroupQuery ::= SEQUENCE
{
    aFID                        [1] AFID,
    gPSI                        [2] GPSI,
    fiveGLanParametersProvision [3] SBIType
}

-- ==========================
-- Common SCEF/NEF parameters
-- ==========================
+28 −5
Original line number Diff line number Diff line
@@ -6,6 +6,8 @@ from shutil import which

from pycrate_asn1c.asnproc import *

import lint_asn1

def reconstrainInteger (filename):
    Path('temp.asn').write_text(Path(filename).read_text().replace("18446744073709551615", "65536"))
    return 'temp.asn'
@@ -170,7 +172,10 @@ def processResults (results, stageName):
    return errorCount


if __name__ == '__main__':
if __name__ == "__main__":
    loglevel = os.environ.get("LOGLEVEL", "WARNING").upper()
    logging.basicConfig(level=loglevel)

    logging.info ('Searching for ASN1C')
    asn1c_path = which("asn1c")
    if asn1c_path is None:
@@ -180,8 +185,7 @@ if __name__ == '__main__':
        logging.info (f"asn1c is a batch file, so assume path separators need to be changed")
        change_path_to_unix = True


    logging.info('Searching for ASN.1 files')
    logging.info("Searching for ASN.1 files")
    fileList = list(Path(".").rglob("*.asn1")) + list(Path(".").rglob("*.asn"))
    logging.info(f'{len(fileList)} ASN.1 files found')
    for file in fileList:
@@ -220,6 +224,25 @@ if __name__ == '__main__':

    compileResults = compileAllTargets(compileTargets)
    if processResults(compileResults, "Compiling") > 0:
        exit(-1)
        exit(1)

    logging.info("Linting files")
    ignoreLintingList = Path("testing/asn_ignore_lint.txt").read_text().splitlines()
    ignoredFiles = []
    for ignore in ignoreLintingList:
        logging.debug(f"Ignoring pattern {ignore} for linting")
        for file in fileList:
            if ignore in str(file):
                ignoredFiles.append(file)
                logging.debug(f" Ignoring {str(file)} for linting as contains {ignore}")
    ignoredFiles = list(set(ignoredFiles))
    logging.info(f"{len(ignoredFiles)} files ignored for linting")
    for file in ignoredFiles:
        logging.debug(f"  {file}")
    fileList = [file for file in fileList if file not in ignoredFiles]
    lintExceptions = json.loads(Path("testing/asn_lint_exceptions.json").read_text())
    lintResults = lint_asn1.lintASN1Files(fileList, lintExceptions)
    if processResults(lintResults, "Linting") > 0:
        exit(1)

    exit(0)