1 == OCP Plugin Developer Guide
2 This document is intended for both OCP (ORI [Open Radio Interface] C&M [Control and Management]
3 Protocol) agent developers and OpenDaylight service/application developers.
4 It describes essential information needed to implement an OCP agent that is capable of interoperating
5 with the OCP plugin running in OpenDaylight, including the OCP connection establishment and
6 state machines used on both ends of the connection. It also provides a detailed description of the
7 northbound/southbound APIs that the OCP plugin exposes to allow automation and programmability.
10 OCP is an ETSI standard protocol for control and management of Remote Radio Head (RRH)
11 equipment. The OCP Project addresses the need for a southbound plugin that allows
12 applications and controller services to interact with RRHs using OCP. The OCP southbound
13 plugin will allow applications acting as a Radio Equipment Control (REC) to interact
14 with RRHs that support an OCP agent.
16 .OCP southbound plugin
17 image::ocpplugin/ocp-sb-plugin.jpg[OCP southbound plugin,width=500]
20 OCP is a vendor-neutral standard communications interface defined to enable control and management
21 between RE and REC of an ORI architecture. The OCP Plugin supports the implementation of the OCP
22 specification; it is based on the Model Driven Service Abstraction Layer (MD-SAL) architecture.
24 The OCP Plugin project consists of three main components: OCP southbound plugin, OCP protocol library
25 and OCP service. For details on each of them, refer to the OCP Plugin User Guide.
28 image::ocpplugin/plugin-design.jpg[Overall architecture,width=500]
30 === Connection Establishment
31 The OCP layer is transported over a TCP/IP connection established between the RE and the REC.
32 OCP provides the following functions:
34 * Control & Management of the RE by the REC
35 * Transport of AISG/3GPP Iuant Layer 7 messages and alarms between REC and RE
38 Hello message is used by the OCP agent during connection setup. It is used for version negotiation.
39 When the connection is established, the OCP agent immediately sends a Hello message with the version
40 field set to highest OCP version supported by itself, along with the verdor ID and serial number of
41 the radio head it is running on.
43 The combinaiton of the verdor ID and serial number will be used by the OCP plugin to uniquely identify
44 a managed radio head. When not receiving reply from the OCP plugin, the OCP agent can resend Hello
45 message with pre-defined Hello timeout (THLO) and Hello resend times (NHLO).
47 According to ORI spec, the default value of TCP Link Monitoring Timer (TTLM) is 50 seconds. The RE shall
48 trigger an OCP layer restart while TTLM expires in RE or the RE detects a TCP link failure. So we may
49 define NHLO * THLO = 50 seconds (e.g. NHLO = 10, THLO = 5 seconds).
51 By nature the Hello message is a new type of indication, and it contains supported OCP version, vendor
52 ID and serial number as shown below.
56 <?xml version="1.0" encoding="UTF-8"?>
57 <msg xmlns="http://uri.etsi.org/ori/002-2/v4.1.1">
59 <msgType>IND</msgType>
64 <version>4.1.1</version>
65 <vendorId>XYZ</vendorId>
66 <serialNumber>ABC123</serialNumber>
73 Hello from the OCP agent will always make the OCP plugin respond with ACK. In case everything is OK,
74 it will be ACK(OK). In case something is wrong, it will be ACK(FAIL).
76 If the OCP agent receives ACK(OK), it goes to Established state. If the OCP agent receives ACK(FAIL),
77 it goes to Maintenance state. The failure code and reason of ACK(FAIL) are defined as below:
79 * FAIL_OCP_VERSION (OCP version not supported)
80 * FAIL_NO_MORE_CAPACITY (OCP plugin cannot control any more radio heads)
82 The result inside Ack message indicates OK or FAIL with different reasons.
86 <?xml version="1.0" encoding="UTF-8"?>
87 <msg xmlns="http://uri.etsi.org/ori/002-2/v4.1.1">
89 <msgType>ACK</msgType>
94 <result>FAIL_OCP_VERSION</result>
101 The following figures illustrate the Finite State Machine (FSM) of the OCP agent and OCP plugin
102 for new connection procedure.
104 .OCP agent state machine
105 image::ocpplugin/ocpagent-state-machine.jpg[OCP agent state machine,width=500]
107 .OCP plugin state machine
108 image::ocpplugin/ocpplugin-state-machine.jpg[OCP plugin state machine,width=500]
111 There are ten exposed northbound APIs: health-check, set-time, re-reset, get-param,
112 modify-param, create-obj, delete-obj, get-state, modify-state and get-fault
115 The Health Check procedure allows the application to verify that the OCP layer is functioning
118 Default URL: http://localhost:8181/restconf/operations/ocp-service:health-check-nb
122 [options="header",cols="2,1,2,2,1"]
124 |Field Name | Type | Description | Example | Required?
125 | nodeId | String | Inventory node reference for OCP radio head | ocp:MTI-101-200 | Yes
126 | tcpLinkMonTimeout | unsignedShort | TCP Link Monitoring Timeout (unit: seconds) | 50 | Yes
134 "nodeId": "ocp:MTI-101-200",
135 "tcpLinkMonTimeout": "50"
143 [options="header",cols="1,1,2"]
145 |Field Name | Type | Description
146 | result | String, enumerated | Common default result codes
159 The Set Time procedure allows the application to set/update the absolute time reference that
160 shall be used by the RE.
162 Default URL: http://localhost:8181/restconf/operations/ocp-service:set-time-nb
166 [options="header",cols="1,1,2,2,1"]
168 |Field Name | Type | Description | Example | Required?
169 | nodeId | String | Inventory node reference for OCP radio head | ocp:MTI-101-200 | Yes
170 | newTime | dateTime | New datetime setting for radio head | 2016-04-26T10:23:00-05:00 | Yes
178 "nodeId": "ocp:MTI-101-200",
179 "newTime": "2016-04-26T10:23:00-05:00"
187 [options="header",cols="1,1,2"]
189 |Field Name | Type | Description
190 | result | String, enumerated | Common default result codes + FAIL_INVALID_TIMEDATA
203 The RE Reset procedure allows the application to reset a specific RE.
205 Default URL: http://localhost:8181/restconf/operations/ocp-service:re-reset-nb
209 [options="header",cols="1,1,2,2,1"]
211 |Field Name | Type | Description | Example | Required?
212 | nodeId | String | Inventory node reference for OCP radio head | ocp:MTI-101-200 | Yes
220 "nodeId": "ocp:MTI-101-200"
228 [options="header",cols="1,1,2"]
230 |Field Name | Type | Description
231 | result | String, enumerated | Common default result codes
244 The Object Parameter Reporting procedure allows the application to retrieve the following information:
246 . the defined object types and instances within the Resource Model of the RE
247 . the values of the parameters of the objects
249 Default URL: http://localhost:8181/restconf/operations/ocp-service:get-param-nb
253 [options="header",cols="1,1,2,2,1"]
255 |Field Name | Type | Description | Example | Required?
256 | nodeId | String | Inventory node reference for OCP radio head | ocp:MTI-101-200 | Yes
257 | objId | String | Object ID | RxSigPath_5G:1 | Yes
258 | paramName | String | Parameter name | dataLink | Yes
266 "nodeId": "ocp:MTI-101-200",
267 "objId": "RxSigPath_5G:1",
268 "paramName": "dataLink"
276 [options="header",cols="1,1,2"]
278 |Field Name | Type | Description
279 | id | String | Object ID
280 | name | String | Object parameter name
281 | value | String | Object parameter value
282 | result | String, enumerated | Common default result codes + "FAIL_UNKNOWN_OBJECT", "FAIL_UNKNOWN_PARAM"
291 "id": "RxSigPath_5G:1",
295 "value": "dataLink:1"
306 The Object Parameter Modification procedure allows the application to configure the values of the
307 parameters of the objects identified by the Resource Model.
309 Default URL: http://localhost:8181/restconf/operations/ocp-service:modify-param-nb
313 [options="header",cols="1,1,2,2,1"]
315 |Field Name | Type | Description | Example | Required?
316 | nodeId | String | Inventory node reference for OCP radio head | ocp:MTI-101-200 | Yes
317 | objId | String | Object ID | RxSigPath_5G:1 | Yes
318 | name | String | Object parameter name | dataLink | Yes
319 | value | String | Object parameter value | dataLink:1 | Yes
327 "nodeId": "ocp:MTI-101-200",
328 "objId": "RxSigPath_5G:1",
332 "value": "dataLink:1"
342 [options="header",cols="1,1,2"]
344 |Field Name | Type | Description
345 | objId | String | Object ID
346 | globResult | String, enumerated | Common default result codes + "FAIL_UNKNOWN_OBJECT", "FAIL_PARAMETER_FAIL",
347 "FAIL_NOSUCH_RESOURCE"
348 | name | String | Object parameter name
349 | result | String, enumerated | "SUCCESS", "FAIL_UNKNOWN_PARAM", "FAIL_PARAM_READONLY", "FAIL_PARAM_LOCKREQUIRED",
350 "FAIL_VALUE_OUTOF_RANGE", "FAIL_VALUE_TYPE_ERROR"
357 "objId": "RxSigPath_5G:1",
358 "globResult": "SUCCESS",
370 The Object Creation procedure allows the application to create and initialize a new instance
371 of the given object type on the RE.
373 Default URL: http://localhost:8181/restconf/operations/ocp-service:create-obj-nb
377 [options="header",cols="1,1,2,2,1"]
379 |Field Name | Type | Description | Example | Required?
380 | nodeId | String | Inventory node reference for OCP radio head | ocp:MTI-101-200 | Yes
381 | objType | String | Object type | RxSigPath_5G | Yes
382 | name | String | Object parameter name | dataLink | No
383 | value | String | Object parameter value | dataLink:1 | No
391 "nodeId": "ocp:MTI-101-200",
392 "objType": "RxSigPath_5G",
396 "value": "dataLink:1"
406 [options="header",cols="1,1,2"]
408 |Field Name | Type | Description
409 | objId | String | Object ID
410 | globResult | String, enumerated | Common default result codes + "FAIL_UNKNOWN_OBJTYPE", "FAIL_STATIC_OBJTYPE",
411 "FAIL_UNKNOWN_OBJECT", "FAIL_CHILD_NOTALLOWED", "FAIL_OUTOF_RESOURCES" "FAIL_PARAMETER_FAIL", "FAIL_NOSUCH_RESOURCE"
412 | name | String | Object parameter name
413 | result | String, enumerated | "SUCCESS", "FAIL_UNKNOWN_PARAM", "FAIL_PARAM_READONLY", "FAIL_PARAM_LOCKREQUIRED",
414 "FAIL_VALUE_OUTOF_RANGE", "FAIL_VALUE_TYPE_ERROR"
421 "objId": "RxSigPath_5G:0",
422 "globResult": "SUCCESS",
434 The Object Deletion procedure allows the application to delete a given object instance and
435 recursively its entire child objects on the RE.
437 Default URL: http://localhost:8181/restconf/operations/ocp-service:delete-obj-nb
441 [options="header",cols="1,1,2,2,1"]
443 |Field Name | Type | Description | Example | Required?
444 | nodeId | String | Inventory node reference for OCP radio head | ocp:MTI-101-200 | Yes
445 | objId | String | Object ID | RxSigPath_5G:1 | Yes
453 "nodeId": "ocp:MTI-101-200",
454 "obj-id": "RxSigPath_5G:0"
462 [options="header",cols="1,1,2"]
464 |Field Name | Type | Description
465 | result | String, enumerated | Common default result codes + "FAIL_UNKNOWN_OBJECT",
466 "FAIL_STATIC_OBJTYPE", "FAIL_LOCKREQUIRED"
479 The Object State Reporting procedure allows the application to acquire the current state
480 (for the requested state type) of one or more objects of the RE resource model, and
481 additionally configure event-triggered reporting of the detected state changes for all
482 state types of the indicated objects.
484 Default URL: http://localhost:8181/restconf/operations/ocp-service:get-state-nb
488 [options="header",cols="2,1,2,2,1"]
490 |Field Name | Type | Description | Example | Required?
491 | nodeId | String | Inventory node reference for OCP radio head | ocp:MTI-101-200 | Yes
492 | objId | String | Object ID | RxSigPath_5G:1 | Yes
493 | stateType | String, enumerated | Valid values: "AST", "FST", "ALL" | ALL | Yes
494 | eventDrivenReporting | Boolean | Event-triggered reporting of state change | true | Yes
502 "nodeId": "ocp:MTI-101-200",
503 "objId": "antPort:0",
505 "eventDrivenReporting": "true"
513 [options="header",cols="1,1,2"]
515 |Field Name | Type | Description
516 | id | String | Object ID
517 | type | String, enumerated | State type. Valid values: "AST", "FST
518 | value | String, enumerated | State value. Valid values: For state type = "AST": "LOCKED", "UNLOCKED".
519 For state type = "FST": "PRE_OPERATIONAL", "OPERATIONAL", "DEGRADED", "FAILED", "NOT_OPERATIONAL", "DISABLED"
520 | result | String, enumerated | Common default result codes + "FAIL_UNKNOWN_OBJECT", "FAIL_UNKNOWN_STATETYPE",
521 "FAIL_VALUE_OUTOF_RANGE"
549 The Object State Modification procedure allows the application to trigger a change in the
550 state of an object of the RE Resource Model.
552 Default URL: http://localhost:8181/restconf/operations/ocp-service:modify-state-nb
556 [options="header",cols="1,1,2,2,1"]
558 |Field Name | Type | Description | Example | Required?
559 | nodeId | String | Inventory node reference for OCP radio head | ocp:MTI-101-200 | Yes
560 | objId | String | Object ID | RxSigPath_5G:1 | Yes
561 | stateType | String, enumerated | Valid values: "AST", "FST", "ALL" | AST | Yes
562 | stateValue | String, enumerated | Valid values: For state type = "AST": "LOCKED", "UNLOCKED".
563 For state type = "FST": "PRE_OPERATIONAL", "OPERATIONAL", "DEGRADED", "FAILED", "NOT_OPERATIONAL", "DISABLED" | LOCKED | Yes
571 "nodeId": "ocp:MTI-101-200",
572 "objId": "RxSigPath_5G:1",
574 "stateValue": "LOCKED"
582 [options="header",cols="1,1,2"]
584 |Field Name | Type | Description
585 | objId | String | Object ID
586 | stateType | String, enumerated | State type. Valid values: "AST", "FST
587 | stateValue | String, enumerated | State value. Valid values: For state type = "AST": "LOCKED", "UNLOCKED".
588 For state type = "FST": "PRE_OPERATIONAL", "OPERATIONAL", "DEGRADED", "FAILED", "NOT_OPERATIONAL", "DISABLED"
589 | result | String, enumerated | Common default result codes + "FAIL_UNKNOWN_OBJECT", "FAIL_UNKNOWN_STATETYPE",
590 "FAIL_UNKNOWN_STATEVALUE", "FAIL_STATE_READONLY", "FAIL_RESOURCE_UNAVAILABLE", "FAIL_RESOURCE_INUSE",
591 "FAIL_PARENT_CHILD_CONFLICT", "FAIL_PRECONDITION_NOTMET
598 "objId": "RxSigPath_5G:1",
600 "stateValue": "LOCKED",
607 The Fault Reporting procedure allows the application to acquire information about all current
608 active faults associated with a primary object, as well as configure the RE to report when the
609 fault status changes for any of faults associated with the indicated primary object.
611 Default URL: http://localhost:8181/restconf/operations/ocp-service:get-fault-nb
615 [options="header",cols="1,1,2,2,1"]
617 |Field Name | Type | Description | Example | Required?
618 | nodeId | String | Inventory node reference for OCP radio head | ocp:MTI-101-200 | Yes
619 | objId | String | Object ID | RE:0 | Yes
620 | eventDrivenReporting | Boolean | Event-triggered reporting of fault | true | Yes
628 "nodeId": "ocp:MTI-101-200",
630 "eventDrivenReporting": "true"
638 [options="header",cols="1,1,2"]
640 |Field Name | Type | Description
641 | result | String, enumerated | Common default result codes + "FAIL_UNKNOWN_OBJECT", "FAIL_VALUE_OUTOF_RANGE"
642 | id (obj) | String | Object ID
643 | id (fault) | String | Fault ID
644 | severity | String | Fault severity
645 | timestamp | dateTime | Time stamp
646 | descr | String | Text description
647 | affectedObj | String | Affected object
660 "id": "FAULT_OVERTEMP",
661 "severity": "DEGRADED",
662 "timestamp": "2012-02-12T16:35:00",
663 "descr": "PA temp too high; Pout reduced",
670 "id": "FAULT_VSWR_OUTOF_RANGE",
671 "severity": "WARNING",
672 "timestamp": "2012-02-12T16:01:05",
682 The northbound APIs described above wrap the southbound APIs to make them accessible to external applications
683 via RESTCONF, as well as take care of synchronizing the RE resource model between radio heads and the controller's
684 datastore. See applications/ocp-service/src/main/yang/ocp-resourcemodel.yang for the yang representation of the RE
687 === Java Interfaces (Southbound APIs)
688 The southbound APIs provide concrete implementation of the following OCP elementary functions: health-check,
689 set-time, re-reset, get-param, modify-param, create-obj, delete-obj, get-state, modify-state and get-fault.
690 Any OpenDaylight services/applications (of course, including OCP service) wanting to speak OCP to radio heads will
693 ==== SalDeviceMgmtService
694 Interface SalDeviceMgmtService defines three methods corresponding to health-check, set-time and re-reset.
696 .SalDeviceMgmtService.java
698 package org.opendaylight.yang.gen.v1.urn.opendaylight.ocp.device.mgmt.rev150811;
700 public interface SalDeviceMgmtService
705 Future<RpcResult<HealthCheckOutput>> healthCheck(HealthCheckInput input);
707 Future<RpcResult<SetTimeOutput>> setTime(SetTimeInput input);
709 Future<RpcResult<ReResetOutput>> reReset(ReResetInput input);
714 ==== SalConfigMgmtService
715 Interface SalConfigMgmtService defines two methods corresponding to get-param and modify-param.
717 .SalConfigMgmtService.java
719 package org.opendaylight.yang.gen.v1.urn.opendaylight.ocp.config.mgmt.rev150811;
721 public interface SalConfigMgmtService
726 Future<RpcResult<GetParamOutput>> getParam(GetParamInput input);
728 Future<RpcResult<ModifyParamOutput>> modifyParam(ModifyParamInput input);
733 ==== SalObjectLifecycleService
734 Interface SalObjectLifecycleService defines two methods corresponding to create-obj and delete-obj.
736 .SalObjectLifecycleService.java
738 package org.opendaylight.yang.gen.v1.urn.opendaylight.ocp.object.lifecycle.rev150811;
740 public interface SalObjectLifecycleService
745 Future<RpcResult<CreateObjOutput>> createObj(CreateObjInput input);
747 Future<RpcResult<DeleteObjOutput>> deleteObj(DeleteObjInput input);
752 ==== SalObjectStateMgmtService
753 Interface SalObjectStateMgmtService defines two methods corresponding to get-state and modify-state.
755 .SalObjectStateMgmtService.java
757 package org.opendaylight.yang.gen.v1.urn.opendaylight.ocp.object.state.mgmt.rev150811;
759 public interface SalObjectStateMgmtService
764 Future<RpcResult<GetStateOutput>> getState(GetStateInput input);
766 Future<RpcResult<ModifyStateOutput>> modifyState(ModifyStateInput input);
771 ==== SalFaultMgmtService
772 Interface SalFaultMgmtService defines only one method corresponding to get-fault.
774 .SalFaultMgmtService.java
776 package org.opendaylight.yang.gen.v1.urn.opendaylight.ocp.fault.mgmt.rev150811;
778 public interface SalFaultMgmtService
783 Future<RpcResult<GetFaultOutput>> getFault(GetFaultInput input);
789 In addition to indication messages, the OCP southbound plugin will translate specific events
790 (e.g., connect, disconnect) coming up from the OCP protocol library into MD-SAL Notification
791 objects and then publish them to the MD-SAL. Also, the OCP service will notify the completion
792 of certain operation via Notification as well.
794 ==== SalDeviceMgmtListener
795 An onDeviceConnected Notification will be published to the MD-SAL as soon as a
796 radio head is connected to the controller, and when that radio head is disconnected
797 the OCP southbound plugin will publish an onDeviceDisconnected Notification in response
798 to the disconnect event propagated from the OCP protocol library.
800 .SalDeviceMgmtListener.java
802 package org.opendaylight.yang.gen.v1.urn.opendaylight.ocp.device.mgmt.rev150811;
804 public interface SalDeviceMgmtListener
809 void onDeviceConnected(DeviceConnected notification);
811 void onDeviceDisconnected(DeviceDisconnected notification);
816 ==== OcpServiceListener
817 The OCP service will publish an onAlignmentCompleted Notification to the MD-SAL once
818 it has completed the OCP alignment procedure with the radio head.
820 .OcpServiceListener.java
822 package org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ocp.applications.ocp.service.rev150811;
824 public interface OcpServiceListener
829 void onAlignmentCompleted(AlignmentCompleted notification);
834 ==== SalObjectStateMgmtListener
835 When receiving a state change indication message, the OCP southbound plugin will propagate
836 the indication message to upper layer services/applications by publishing a corresponding
837 onStateChangeInd Notification to the MD-SAL.
839 .SalObjectStateMgmtListener.java
841 package org.opendaylight.yang.gen.v1.urn.opendaylight.ocp.object.state.mgmt.rev150811;
843 public interface SalObjectStateMgmtListener
848 void onStateChangeInd(StateChangeInd notification);
853 ==== SalFaultMgmtListener
854 When receiving a fault indication message, the OCP southbound plugin will propagate
855 the indication message to upper layer services/applications by publishing a corresponding
856 onFaultInd Notification to the MD-SAL.
858 .SalFaultMgmtListener.java
860 package org.opendaylight.yang.gen.v1.urn.opendaylight.ocp.fault.mgmt.rev150811;
862 public interface SalFaultMgmtListener
867 void onFaultInd(FaultInd notification);