SEBA-386 Update R-CORD service documentation
Change-Id: I191a8bc77b925af2afaf32b83d89cbda72813658
diff --git a/VERSION b/VERSION
index b0f3d96..66c4c22 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-1.0.8
+1.0.9
diff --git a/docs/README.md b/docs/README.md
index bbda4e2..0a8cd02 100644
--- a/docs/README.md
+++ b/docs/README.md
@@ -1,45 +1,81 @@
# R-CORD Service
-The RCORD Service represents the `Subscriber` in the service chain.
+The RCORD Service represents the `Subscriber` in the service chain. This service is always located at the beginning of a chain.
-This service expect to be located at the beginning of the chain.
+## Models
-## Service configurations
+The R-CORD service has the following three models:
-As now the only possible configuration is to define the kind of access service
-that sits next to it. The default (and the only one supported for now) is
-'VOLTHA'.
+- `RCORDService`. In addition to the standard Service model fields such as `name`, adds the following R-CORD-specific fields:
+ - `access`. Type of access service. Currently the only usable value is "voltha".
+- `RCORDSubscriber`. This model extends `ServiceInstance` and holds several subscriber-related fields:
+ - `creator`. The user that created the subscriber. Data plane services that implement compute resources may be able to leverage the `creator` field to account for ownership of those compute resources.
+ - `status`. [`enabled` | `disabled` | `pre-provisioned` | `awaiting-auth` | `auth-failed`]. The status of the subscriber, often determined by the workflow driver.
+ - `c_tag`, `s_tag`. VLAN tags associated with this subscriber.
+ - `onu_device`. Serial number of subscriber's ONU. Must match an ONU Device in an access service.
+ - `mac_address`. MAC address of subscriber.
+ - `nas_port_id`.
+ - `circuit_id`.
+ - `remote_id`.
+- `RCORDIpAddress`. Holds an IP address that is associated with a subscriber. These are typically created by the workflow driver, when it handles DHCP messages.
+ - `subscriber`. Relation to the subscriber that this IP address applies to.
+ - `ip`. IP Address.
+ - `description`. A short description of the IP Address.
-If the R-CORD Service is configured with `access=voltha` it expect that:
-- it has only one `provider_service`
-- the `provider_service` exposes an API called `has_access_device(onu_serial_number)`
- that returns a boolean (this is used to validate that the ONU the subscriber
- is pointing to really exists)
-## RCORDSubscriber
+## Example Tosca - Create a Subscriber
-The `RCORDSubscriber` model is the `ServiceInstance` of the `RCORDService`.
-This is an example TOSCA you can use to create one:
+The following TOSCA recipe creates an `RCORDSubscriber`:
```yaml
tosca_definitions_version: tosca_simple_yaml_1_0
imports:
- custom_types/rcordsubscriber.yaml
-description: Create a test subscriber
+
+description: Pre-provsion a subscriber
+
topology_template:
node_templates:
- #Activate the subscriber
- my_house:
+
+ # Pre-provision the subscriber
+ onf_subscriber_1:
type: tosca.nodes.RCORDSubscriber
properties:
- name: My House
- onu_device: BRCM1234
- mac_address: 90:E2:BA:82:FA:81
- ip_address: 192.168.0.1
+ name: Sub_BRCM22222222
+ status: pre-provisioned
+ c_tag: 111
+ s_tag: 111
+ onu_device: BRCM22222222
+ nas_port_id : "PON 1/1/03/1:1.1.1"
+ circuit_id: foo1
+ remote_id: bar1
```
-> NOTE: an `onu_device` with the provided serial number must exists in the system.
+> NOTE: an `onu_device` with the provided serial number must exist in the system.
> For more informations about ONU Devices, please refer to the
> [vOLTService](../olt-service/README.md) guide.
+## Integration with other Services
+
+The R-CORD Service has no western neighbors, as it is always the root of a subscriber service chain. It will have a westbound neighbor, which is typically an access service.
+
+If the R-CORD Service is configured with `access=voltha`, the following requirements apply:
+
+- There is only one `provider_service` linked to the R-CORD Servioce.
+- The `provider_service` exposes an API called `has_access_device(onu_serial_number)`
+ that returns a boolean. This is used to validate that the ONU the subscriber
+ is pointing to really exists.
+
+## Synchronizer workflow
+
+The R-CORD Service synchronizer implements no sync steps as it does not directly interact with any external components. It does implement one model policy.
+
+### RCORDSubscriberPolicy
+
+The policy manages the service chain associated with the subscriber. If the subscriber is in `pre-provisioned` status, then no work is done. Otherwise the policy attempts to bring the service chain into compliance with the status field. Statuses of `enabled` are allocated a service chain. Statuses of `awaiting-auth`, `auth-failed`, or `disabled` are prevented from having a service chain.
+
+The service chain typically proceeds eastbound from the RCORDSubscriber to an access service instance, such as VOLTServiceInstance.
+
+
+