Dflux
  • Welcome
  • 👍Getting-started
    • Architecture
    • Installing
    • FAQ
    • How to contribute?
    • Privacy
  • DFXE (ENF)
    • Architecture
    • Concepts
      • Flow
      • Envv
      • Config
      • Fsm
      • Messages
      • Testing
      • Settings
      • Templates
      • Report
    • API Reference
    • Examples
    • Observability
  • DFXP
    • Architecture
  • NF's
    • Gnb
    • Enb
    • Protocols
  • cli
    • dfxe
    • dfxt
    • dfxp
  • Release Notes
Powered by GitBook
On this page

Was this helpful?

  1. DFXE (ENF)
  2. Concepts

Templates

The template is a description of a resource in the system.

id: template-id                       # string
name: template-name                   # string
metadata:                             # map<string, string>
    key1: value1
    key2: value2
labels:                               # list of strings
    - label1
    - label2
    - label3
kind: template-kind                   # below template kinds

Kinds

Envv

id: envv-id      
name: envv-global
metadata:              
    description: global envv
labels:                     
    - enf.global
kind: envv
envv:
    - "df.myint:randomInt(1,2)"
    - "df.myseq:sequenceInt(10,100)"
    - "df.mystr:randomString(3,5)"
    - "df.mybool:randomBool()"
    - "df.myenum:randomList(ignore,success,fail)"
    - "df.randomTimeoutMs:randomInt(100,5000)"

Config

id: config-id      
name: config-global
metadata:              
    description: global config
labels:                     
    - enf.global
kind: config
config:
    - type: gnb
      params:
        AmfAddress: "192.168.1.227:38412"
        PerfCluster: "192.168.1.178:50052,192.168.1.180:50052"
        DefaultGnbParams: 'NGSetupMessageFormat'
    - type: enb
      params:
        MmeAddress: "192.168.1.227:36412"
        PerfCluster: "192.168.1.178:50052,192.168.1.180:50052"

FSM

id: fsm-id      
name: fsm-global
metadata:              
    description: global fsm
labels:                     
    - enf.global
kind: fsm
fsm:
    transitions:
        - state: state_state
          nextstate: final_state
          event: start
          timeout: 3s
          actions:
            - message.SENDHELLO
            - wait.300ms
            - message.SEND_HELLO_AGAIN
            - check.CHECK1
        - state: final_state
          event: RECEVIED_HELLO
          actions:
            - message.SEND_DONE
            - check.CHECK2

Messages

id: messages-id      
name: messages-global
metadata:              
    description: global messages
labels:                     
    - enf.global
kind: messages
messages:
    - name: message1
      type: message1type
      message: '{
        "hello": "world"
      }'
    - name: message2
      type: message2type
      message: '{
        "hello": "world2"
      }'

Checks

id: checks-id      
name: checks-global
metadata:              
    description: global checks
labels:                     
    - enf.global
kind: checks
checks:
    - name: NGSetupSuccess
      operations:
        - isEquals({{res.NGAPOutcome}},success)

Tests

id: tests-id      
name: tests-global
metadata:              
    description: global tests
labels:                     
    - enf.global
kind: tests
tests:
    - name: FlowSuccessfull
      operations:
        - isEquals({{total_flows}}, 10) 
        - isEquals({{total_flows_success}}, 10)
        - isEquals({{total_flows_timeout}}, 0)

Settings

id: settings-id      
name: settings-global
metadata:              
    description: global settings
labels:                     
    - enf.global
kind: settings
settings:
    repetitions: 10
    duration: 30s
    rate:
        repetitions: 1
        interval: 3s
    timeout: 1s

Flow

A Flow must contain all of the above templates kinds, can be either specifically configure each section or use template blocks, or both.

Flow Using Template Refs

id: flow-id      
name: flow-global
metadata:              
    description: global flow
labels:                     
    - enf.global
kind: flow
flow:
  refs:
    envv: envv-global
    config: config-global
    fsm: fsm-global
    messages: message-global
    checks: checks-global
    tests: tests-global
    settings: settings-global

Flow Statically Configured

id: flow-id      
name: flow-global
metadata:              
    description: global flow
labels:                     
    - enf.global
kind: flow
flow:
  envv:
      - "df.myint:randomInt(1,2)"
      - "df.myseq:sequenceInt(10,100)"
      - "df.mystr:randomString(3,5)"
      - "df.mybool:randomBool()"
      - "df.myenum:randomList(ignore,success,fail)"
      - "df.randomTimeoutMs:randomInt(100,5000)"
  config:
      - type: gnb
        params:
          AmfAddress: "192.168.1.227:38412"
          PerfCluster: "192.168.1.178:50052,192.168.1.180:50052"
          DefaultGnbParams: 'NGSetupMessageFormat'
      - type: enb
        params:
          MmeAddress: "192.168.1.227:36412"
          PerfCluster: "192.168.1.178:50052,192.168.1.180:50052"
  fsm:
      transitions:
          - state: state_state
            nextstate: final_state
            event: start
            timeout: 3s
            actions:
              - message.SENDHELLO
              - wait.300ms
              - message.SEND_HELLO_AGAIN
              - check.CHECK1
          - state: final_state
            event: RECEVIED_HELLO
            actions:
              - message.SEND_DONE
              - check.CHECK2
  messages:
      - name: message1
        type: message1type
        message: '{
          "hello": "{{df.myint}}"
        }'
      - name: message2
        type: message2type
        message: '{
          "hello": "{{df.myenum}}"
        }'
  checks:
      - name: CHECK1
        operations:
          - isEquals({{res.NGAPOutcome}},success)
      - name: CHECK2
        operations:
          - isEquals({{res.NGAPOutcome}},success)
  tests:
      - name: FlowSuccessfull
        operations:
          - isEquals({{total_flows}}, 10) 
          - isEquals({{total_flows_success}}, 10)
          - isEquals({{total_flows_timeout}}, 0)
  settings:
      repetitions: 10
      duration: 30s
      rate:
          repetitions: 1
          interval: 3s
      timeout: 1s

Flow Statically Configured Using Refs

A flow template can also use refs only on specific kinds and the rest as statically confiugred.

id: flow-id      
name: flow-global
metadata:              
    description: global flow
labels:                     
    - enf.global
kind: flow
flow:
  refs:
    envv: envv-global
    config: config-global
    fsm: fsm-global
    settings: settings-global
  messages:
      - name: message1
        type: message1type
        message: '{
          "hello": "{{df.myint}}"
        }'
      - name: message2
        type: message2type
        message: '{
          "hello": "{{df.myenum}}"
        }'
  checks:
      - name: CHECK1
        operations:
          - isEquals({{res.NGAPOutcome}},success)
      - name: CHECK2
        operations:
          - isEquals({{res.NGAPOutcome}},success)
  tests:
      - name: FlowSuccessfull
        operations:
          - isEquals({{total_flows}}, 10) 
          - isEquals({{total_flows_success}}, 10)
          - isEquals({{total_flows_timeout}}, 0)
PreviousSettingsNextReport

Last updated 2 years ago

Was this helpful?