tree: 3b76293ebcd4d1b2f15b356e50c2e1c8cbe88289 [path history] [tgz]
  1. README.md
docs/README.md

Turk Telekom Workflow Driver Service

This service implements the ONU and Subscriber management logic required by Turk Telekom.

NOTE: This service depends on models contained in the R-CORD and OLT Services, so make sure that the rcord-synchronizer and volt-synchronzier are running

Models

This service is composed of the following models:

  • TtWorkflowDriverServiceInstance. This model holds various state associated with the state machine for validating a subscriber's ONU.
    • serial_number. Serial number of ONU.
    • of_dpid.
    • uni_port_id.
    • onu_state. [AWAITING | ENABLED | DISABLED]. State of the ONU.
    • status_message.
    • dhcp_state. [AWAITING | DHCPDISCOVER | DHCPACK | DHCPREQUEST]. Current DHCP state.
    • ip_address. Subscriber ip address.
    • mac_address. Subscriber mac address.
  • TtWorkflowDriverWhiteListEntry. This model holds a whitelist authorizing an ONU with a specific serial number to be connected to a specific PON Port on a specific OLT.
    • owner. Relation to the TtWorkflowDriverService that owns this whitelist entry.
    • serial_number. Serial number of ONU.
    • pon_port_id. Pon port identifier.
    • device_id. OLT device identifier.

Example Tosca - Create a whitelist entry

tosca_definitions_version: tosca_simple_yaml_1_0
imports:
  - custom_types/ttworkflowdriverwhitelistentry.yaml
  - custom_types/ttworkflowdriverservice.yaml
description: Create an entry in the whitelist
topology_template:
  node_templates:

    service#tt:
      type: tosca.nodes.TtWorkflowDriverService
      properties:
        name: tt-workflow-driver
        must-exist: true

    whitelist:
      type: tosca.nodes.TtWorkflowDriverWhiteListEntry
      properties:
        serial_number: BRCM22222222
        pon_port_id: 536870912
        device_id: of:000000000a5a0072
      requirements:
        - owner:
            node: service#tt
            relationship: tosca.relationships.BelongsToOne

Integration with other Services

This service integrates closely with the R-CORD and vOLT services, directly manipulating models (RCORDSubscriber, ONUDevice) in those services.

Synchronizer Workflows

This synchronizer implements only event_steps and model_policies. It's job is to listen for events and execute a state machine associated with those events. Service Instances are created automatically when ONU events are received. As the state machine changes various states for authentication, etc., those changes will be propagated to the appropriate objects in the R-CORD and vOLT services.

The state machine is described below.

Service Instances State Machine

TopicEventActionsONU StateSubscriber StateMessage
onu.eventsstatus: activatedValidate against whitelist (successful)enabledenabledONU has been validated
onu.eventsstatus: activatedValidate against whitelist (failed, missing)disabledawaiting-authONU not found in whitelist
onu.eventsstatus: activatedValidate against whitelist (failed, location)disabledawaiting-authONU activated in wrong location
onu.eventsstatus: disabledMark ONU as disabled and revoke subscriber authenticationdisabledawaiting-authONU has been disabled, revoked subscriber authentication
dhcp.events--Update subscriber ip and mac addressenabledenabledDHCP information added

Model Policy: TtWorkflowDriverServiceInstancePolicy

This model policy is responsible for reacting to state changes that are caused by various event steps, implementing the state machine described above.

Event Step: SubscriberDhcpEventStep

Listens on dhcp.events and updates the dhcp_state, ip_address, and mac_address fields of TtWorkflowDriverServiceInstance.

Event Step: ONUEventStep

Listens on onu.events and updates the onu_state of TtWorkflowDriverServiceInstance. Automatically creates TtWorkflowDriverServiceInstance as necessary.

Events format

This events are generated by various applications running on top of ONOS and published on a Kafka bus. Here is the structure of the events and their topics.

onu.events

{
  "timestamp": "2018-09-11T01:00:49.506Z",
  "status": "activated", // or disabled
  "serialNumber": "ALPHe3d1cfde", // ONU serial number
  "portNumber": "16", // uni port
  "deviceId": "of:000000000a5a0072" // OLT OpenFlow Id
}

dhcp.events

{
  "deviceId" : "of:000000000a5a0072",
  "portNumber" : "16",
  "macAddress" : "90:e2:ba:82:fa:81",
  "ipAddress" : "10.11.1.1",
  "serialNumber": "ALPHe3d1cfde" // ONU serial number
}