Commit e762b619 authored by Mark Canterbury's avatar Mark Canterbury
Browse files

Merge branch 'meeting/LI69' into 'main'

Output of LI#69

See merge request !212
parents 8080aefc 53cd94a2
Loading
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
# top-most EditorConfig file
root = true

# Unix-style newlines with a newline ending every file
[**]
end_of_line = lf
insert_final_newline = true

# ASN.1, XML: 4 space indents
[**.{asn,asn1,xml,xsd}]
indent_style = space
indent_size = 4
trim_trailing_whitespace = true

[**.json]
indent_style = space
indent_size = 2
trim_trailing_whitespace = true
+2 −0
Original line number Diff line number Diff line
@@ -2,6 +2,8 @@
.vscode/
.idea/

testing/dockerfiles/build.log

# Vagrant
.vagrant/

+96 −8
Original line number Diff line number Diff line
@@ -7,9 +7,14 @@ workflow:

stages:
  - preflight
  - check
  - compile
  - lint
  - build


# -----------------------------------------------------------
# Preflight

preflight:
  image: "forge.etsi.org:5050/li/schemas-definitions/forgelib"
  stage: preflight
@@ -19,19 +24,102 @@ preflight:
  script:
    - forgelib-preflight https://$CI_SERVER_HOST $CI_PROJECT_ID $CI_MERGE_REQUEST_IID

process_asn:

# -----------------------------------------------------------
# Compile

compile_asn:
  image: "forge.etsi.org:5050/li/schemas-definitions/asn1test:latest"
  stage: check
  stage: compile
  interruptible: true
  script:
    - python3 testing/asn_process.py
    - python3 testing/asn/asn_process.py

process_xsd:
  image: "forge.etsi.org:5050/li/schemas-definitions/xsdtest:latest"
  stage: check
compile_xsd:
  image: "forge.etsi.org:5050/li/schemas-definitions/forgeschema:latest"
  stage: compile
  interruptible: true
  script:
    - python3 testing/xsd_process.py
    - export PYCHARM_HOSTED=1
    - |
      check_count=0
      fail_count=0
      while IFS= read -r -d '' file; do
        let "check_count=check_count+1"      
        if ! forgeschema -c "$file"; then
          echo "❌ failed schema checks for $file"
          let "fail_count=fail_count+1"
        fi
        echo ""
        echo "..."
        echo ""
      done < <(find ./testing/xml -type f -name "*.json" -print0)
      if [ "$fail_count" -gt 0 ]; then
        echo "┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅"
        echo "❌ Failed schema checks for $fail_count of $check_count files"
        echo "┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅"
        exit 1
      fi
      echo "┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅"
      echo "✅ XSD validation OK ($check_count files checked)"  
      echo "┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅"
      echo "✅ XSD validation OK for $file"

compile_json:
  image: "forge.etsi.org:5050/li/schemas-definitions/forgeschema:latest"
  stage: compile
  interruptible: true
  script:
    - export PYCHARM_HOSTED=1
    - |
      check_count=0
      fail_count=0
      while IFS= read -r -d '' file; do
        let "check_count=check_count+1"
        if ! forgeschema -c "$file"; then
          echo "❌ failed schema checks for $file"
          let "fail_count=fail_count+1"
        fi
        echo ""
        echo "..."
        echo ""
      done < <(find ./testing/json -type f -name "*.json" -print0)
      if [ "$fail_count" -gt 0 ]; then
        echo "┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅"
        echo "❌ Failed schema checks for $fail_count of $check_count files"
        echo "┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅"
        exit 1
      fi
      echo "┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅"
      echo "✅ JSON validation OK ($check_count files checked)"  
      echo "┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅"
    - forgeschema -s 103120/schema/json/ts_103120_Core.schema.json -u 103120/schema/json -u 103120/dictionaries/ts_103120_Dictionaries.schema.json -u 103280/TS_103_280.schema.json -i 103120/examples/json


# -----------------------------------------------------------
# Lint

lint_xml:
  image: "forge.etsi.org:5050/li/schemas-definitions/forgeschema:latest"
  stage: lint
  interruptible: true
  allow_failure: true
  script:
    - export PYCHARM_HOSTED=1
    - python testing/xml/lint_xml.py

lint_json:
  image: "forge.etsi.org:5050/li/schemas-definitions/forgeschema:latest"
  stage: lint
  interruptible: true
  allow_failure: true
  script:
    - export PYCHARM_HOSTED=1
    - python testing/json/lint_json.py


# -----------------------------------------------------------
# Build

generate_artefacts:
  image: "forge.etsi.org:5050/li/schemas-definitions/forgelib"
+4 −4
Original line number Diff line number Diff line
LI-PS-PDU
{itu-t(0) identified-organization(4) etsi(0) securityDomain(2) lawfulIntercept(2) li-ps(5) genHeader(1) version39(39)}
{itu-t(0) identified-organization(4) etsi(0) securityDomain(2) lawfulIntercept(2) li-ps(5) genHeader(1) version40(40)}

DEFINITIONS IMPLICIT TAGS ::=

@@ -43,14 +43,14 @@ IMPORTS
    IPIRIOnly,
    IPIRIPacketReport
        FROM IPAccessPDU
        {itu-t(0) identified-organization(4) etsi(0) securityDomain(2) lawfulIntercept(2) li-ps(5) iPAccess(3) version19(19)}
        {itu-t(0) identified-organization(4) etsi(0) securityDomain(2) lawfulIntercept(2) li-ps(5) iPAccess(3) version20(20)}

    -- from ETSI TS 102 232-4 [32]
    L2CC,
    L2IRI,
    L2IRIOnly
        FROM L2AccessPDU
        {itu-t(0) identified-organization(4) etsi(0) securityDomain(2) lawfulIntercept(2) li-ps(5) l2Access(4) version9(9)}
        {itu-t(0) identified-organization(4) etsi(0) securityDomain(2) lawfulIntercept(2) li-ps(5) l2Access(4) version10(10)}

    -- from ETSI TS 102 232-5 [37]
    IPMMCC,
@@ -207,7 +207,7 @@ IMPORTS

lawfulInterceptDomainId OBJECT IDENTIFIER ::= {itu-t(0) identified-organization(4) etsi(0) securityDomain(2) lawfulIntercept(2)}

li-psDomainId OBJECT IDENTIFIER ::= {lawfulInterceptDomainId li-ps(5) genHeader(1) version39(39)}
li-psDomainId OBJECT IDENTIFIER ::= {lawfulInterceptDomainId li-ps(5) genHeader(1) version40(40)}

-- ====================
-- Top-level definition
+10 −4
Original line number Diff line number Diff line
IPAccessPDU
{itu-t(0) identified-organization(4) etsi(0) securityDomain(2) lawfulIntercept(2) li-ps(5) iPAccess(3) version19(19)}
{itu-t(0) identified-organization(4) etsi(0) securityDomain(2) lawfulIntercept(2) li-ps(5) iPAccess(3) version20(20)}

DEFINITIONS IMPLICIT TAGS ::=
BEGIN
@@ -9,14 +9,14 @@ IMPORTS
    IPAddress,
    Location
        FROM LI-PS-PDU
        {itu-t(0) identified-organization(4) etsi(0) securityDomain(2) lawfulIntercept(2) li-ps(5) genHeader(1) version39(39)};
        {itu-t(0) identified-organization(4) etsi(0) securityDomain(2) lawfulIntercept(2) li-ps(5) genHeader(1) version40(40)};


-- ============================
-- Object Identifier Definition
-- ============================

iPAccessPDUObjId RELATIVE-OID               ::= {li-ps(5) iPAccess(3) version19(19)}
iPAccessPDUObjId RELATIVE-OID               ::= {li-ps(5) iPAccess(3) version20(20)}
iPIRIObjId RELATIVE-OID                     ::= {iPAccessPDUObjId iRI(1)}
iPCCObjId RELATIVE-OID                      ::= {iPAccessPDUObjId cC(2)}
iPIRIOnlyObjId RELATIVE-OID                 ::= {iPAccessPDUObjId iRIOnly(3)}
@@ -152,7 +152,13 @@ AccessEventType ::= ENUMERATED
        -- A target stops using the IAS, the session ends
    endOfInterceptionWithSessionActive(9),
        -- LI is ended on a target who still has an active session
    unknown(10)
    unknown(10),
    startOfInterceptionWithoutNetworkSession(11),
        -- Start of LI session without a network session
    endOfInterceptionWithoutNetworkSession(12),
        -- End of LI session without a network session
    sessionExpired(13)
        -- LI session terminated due to expiry by MF
}

InternetAccessType ::= ENUMERATED
Loading