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
andvolt-synchronzier
are running
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.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
This service integrates closely with the R-CORD
and vOLT
services, directly manipulating models (RCORDSubscriber
, ONUDevice
) in those services.
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.
Topic | Event | Actions | ONU State | Subscriber State | Message |
---|---|---|---|---|---|
onu.events | status: activated | Validate against whitelist (successful) | enabled | enabled | ONU has been validated |
onu.events | status: activated | Validate against whitelist (failed, missing) | disabled | awaiting-auth | ONU not found in whitelist |
onu.events | status: activated | Validate against whitelist (failed, location) | disabled | awaiting-auth | ONU activated in wrong location |
onu.events | status: disabled | Mark ONU as disabled and revoke subscriber authentication | disabled | awaiting-auth | ONU has been disabled, revoked subscriber authentication |
dhcp.events | -- | Update subscriber ip and mac address | enabled | enabled | DHCP information added |
This model policy is responsible for reacting to state changes that are caused by various event steps, implementing the state machine described above.
Listens on dhcp.events
and updates the dhcp_state
, ip_address
, and mac_address
fields of TtWorkflowDriverServiceInstance
.
Listens on onu.events
and updates the onu_state
of TtWorkflowDriverServiceInstance
. Automatically creates TtWorkflowDriverServiceInstance
as necessary.
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.
{ "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 }
{ "deviceId" : "of:000000000a5a0072", "portNumber" : "16", "macAddress" : "90:e2:ba:82:fa:81", "ipAddress" : "10.11.1.1" }