1 .. _packetcable-user-guide:
9 These components introduce a DOCSIS QoS Gates management using the PCMM
10 protocol. The driver component is responsible for the PCMM/COPS/PDP
11 functionality required to service requests from PacketCable Provider and
12 FlowManager. Requests are transposed into PCMM Gate Control messages and
13 transmitted via COPS to the CMTS. This plugin adheres to the
14 PCMM/COPS/PDP functionality defined in the CableLabs specification.
15 PacketCable solution is an MDSAL compliant component.
17 PacketCable Components
18 ----------------------
20 PacketCable is comprised of two OpenDaylight bundles:
22 +--------------------------------------+--------------------------------------+
23 | Bundle | Description |
24 +======================================+======================================+
25 | odl-packetcable-policy-server | Plugin that provides PCMM model |
26 | | implementation based on CMTS |
27 | | structure and COPS protocol. |
28 +--------------------------------------+--------------------------------------+
29 | odl-packetcable-policy-model | The Model provided provides a direct |
30 | | mapping to the underlying QoS Gates |
32 +--------------------------------------+--------------------------------------+
34 See the PacketCable `YANG
35 Models <https://git.opendaylight.org/gerrit/gitweb?p=packetcable.git;a=tree;f=packetcable-policy-model/src/main/yang>`__.
37 Installing PacketCable
38 ----------------------
40 To install PacketCable, run the following ``feature:install`` command
45 feature:install odl-packetcable-policy-server-all odl-restconf odl-mdsal-apidocs
47 Explore and exercise the PacketCable REST API
48 ---------------------------------------------
50 To see the PacketCable APIs, browse to this URL:
51 http://localhost:8181/apidoc/explorer/index.html
53 Replace localhost with the IP address or hostname where OpenDaylight is
54 running if you are not running OpenDaylight locally on your machine.
58 Prior to setting any PCMM gates, a CCAP must first be added.
64 extension <https://chrome.google.com/webstore/detail/postman-rest-client/fdmmgilgnpjigdojojpjoooidkmcomcm?hl=en>`__
66 `Download and import sample packetcable
67 collection <https://git.opendaylight.org/gerrit/gitweb?p=packetcable.git;a=tree;f=packetcable-policy-server/doc/restconf-samples>`__
72 .. figure:: ./images/packetcable-postman.png
73 :alt: Postman Operations
79 PacketCable REST API Usage Examples
80 -----------------------------------
82 * CCAP "CONFIG" DATASTORE API STRUCTURE
84 * Add and view CCAPConfigDatastore(add triggers also the CCAP COPS connection)::
86 PUT http://localhost:8181/restconf/config/packetcable:ccaps/ccap/CMTS-1
95 "ipAddress": "10.20.30.40",
97 },"subscriber-subnets": [
98 "2001:4978:030d:1000:0:0:0:0/52",
103 ],"downstream-scns": [
110 GET http://localhost:8181/restconf/config/packetcable:ccaps/ccap/CMTS-1
113 * CCAP OPERATIONAL STATUS - GET CCAP (COPS) CONNECTION STATUS
115 * Shows the Operational Datastorecontents for the CCAP COPS connection.
116 * The status is updated when the COPS connection is initiated or after an RPC poll::
118 GET http://localhost:8181/restconf/operational/packetcable:ccaps/ccap/CMTS-1/
127 "E6-CTO: CCAP client is connected"
129 "timestamp": "2016-03-23T14:15:54.129-05:00",
137 * CCAP OPERATIONAL STATUS - RPC CCAP POLL CONNECTION
139 * A CCAP RPC poll returns the COPS connectivity status info and also triggers an Operational Datastore status update with the same data::
141 POST http://localhost:8181/restconf/operations/packetcable:ccap-poll-connection
144 "ccapId": "/packetcable:ccaps/packetcable:ccap[packetcable:ccapId='CMTS-1']"
150 "response": "CMTS-1: CCAP poll complete",
151 "timestamp": "2016-03-23T14:15:54.131-05:00",
157 "CMTS-1: CCAP client is connected"
159 "timestamp": "2016-03-23T14:15:54.129-05:00",
167 * CCAP OPERATIONAL STATUS - RPC CCAP POLL CONNECTION (2) - CONNECTION DOWN::
169 POST http://localhost:8181/restconf/operations/packetcable:ccap-poll-connection
172 "ccapId": "/packetcable:ccaps/packetcable:ccap[packetcable:ccapId='CMTS-1']"
178 "response": "CMTS-1: CCAP poll complete",
179 "timestamp": "2016-03-23T14:15:54.131-05:00",
184 "CMTS-1: CCAP client is disconnected with error: null",
185 "CMTS-1: CCAP Cops socket is closed"],
186 "timestamp": "2016-03-23T14:15:54.129-05:00",
194 * CCAP OPERATIONAL STATUS - RPC CCAP SET CONNECTION
196 * A CCAP RPC sets the CCAP COPS connection; possible values true or false meaning that the connection should be up or down.
197 * RPC responds with the same info as RPC POLL CONNECTION, and also updates the Operational Datastore::
199 POST http://localhost:8181/restconf/operations/packetcable:ccap-set-connection
202 "ccapId": "/packetcable:ccaps/packetcable:ccap[packetcable:ccapId='CMTS-1']",
212 "response": "CMTS-1: CCAP set complete",
213 "timestamp": "2016-03-23T17:47:29.446-05:00",
218 "CMTS-1: CCAP client is connected",
219 "CMTS-1: CCAP COPS socket is already open"],
220 "timestamp": "2016-03-23T17:47:29.436-05:00",
227 * CCAP OPERATIONAL STATUS - RPC CCAP SET CONNECTION (2) - SHUTDOWN COPS CONNECTION::
229 POST http://localhost:8181/restconf/operations/packetcable:ccap-set-connection
232 "ccapId": "/packetcable:ccaps/packetcable:ccap[packetcable:ccapId='E6-CTO']",
241 "response": "E6-CTO: CCAP set complete",
242 "timestamp": "2016-03-23T17:47:29.446-05:00",
247 "E60CTO: CCAP client is disconnected with error: null"],
248 "timestamp": "2016-03-23T17:47:29.436-05:00",
256 A "null" in the error information means that the CCAP connection has been disconnected as a result of a RPC SET.
258 * GATES "CONFIG" DATASTORE API STRUCTURE CHANGED
260 * A CCAP RPC poll returns the gate status info, and also triggers a Operational Datastorestatus update.
261 * At a minimum the appIdneeds to be included in the input, subscriberIdand gateIdare optional.
262 * A gate status response is only included if the RPC request is done for a specific gate (subscriberIdand gateIdincluded in input).
263 * Add and retrieve gates to/from the Config Datastore::
265 PUT http://localhost:8181/restconf/config/packetcable:qos/apps/app/cto-app/subscribers/subscriber/44.137.0.12/gates/gate/gate88/
272 "dscp-tos-overwrite": "0xa0",
273 "dscp-tos-mask": "0xff"
276 "service-class-name": "extrm_dn"
279 "classifier-container": [
281 "classifier-id": "1",
283 "srcIp": "44.137.0.0",
284 "dstIp": "44.137.0.11",
298 GET http://localhost:8181/restconf/config/packetcable:qos/apps/app/cto-app/subscribers/subscriber/44.137.0.12/gates/gate/gate88/
301 * GATES SUPPORT MULTIPLE (UP TO FOUR) CLASSIFIERS
303 * Please note that there is a classifier container now that can have up to four classifiers::
305 PUT http://localhost:8181/restconf/config/packetcable:qos/apps/app/cto-app/subscribers/subscriber/44.137.0.12/gates/gate/gate88/
309 "dscp-tos-overwrite": "0xa0",
310 "dscp-tos-mask": "0xff" },
312 "service-class-name": "extrm_dn"},
314 { "classifier-container":[
315 { "classifier-id": "1",
317 "srcIp6": "2001:4978:030d:1100:0:0:0:0/64",
318 "dstIp6": "2001:4978:030d:1000:0:0:0:0/64",
324 "srcPort-start": "4321",
325 "srcPort-end": "4322",
326 "dstPort-start": "1234",
327 "dstPort-end": "1235"
329 { "classifier-id": "2",
331 "srcIp": "44.137.0.12",
332 "srcIpMask": "255.255.255.255",
333 "dstIp": "10.10.10.0",
334 "dstIpMask": "255.255.255.0",
338 "srcPort-start": "4321",
339 "srcPort-end": "4322",
340 "dstPort-start": "1234",
341 "dstPort-end": "1235"
349 * CCAP OPERATIONAL STATUS - GET GATE STATUS FROM OPERATIONAL DATASTORE
351 * Shows the Operational Datastore contents for the gate.
352 * The gate status is updated at the time when the gate is configured or during an RPC poll::
354 GET http://localhost:8181/restconf/operational/packetcable:qos/apps/app/cto-app/subscribers/subscriber/44.137.0.12/gates/gate/gate88
360 "cops-gate-usage-info": "0",
361 "cops-gate-state": "Committed(4)/Other(-1)",
362 "gatePath": "cto-app/44.137.0.12/gate88",
363 "cops-gate-time-info": "0",
364 "cops-gateId": "3e0800e9",
365 "timestamp": "2016-03-24T10:30:18.763-05:00",
371 * CCAP OPERATIONAL STATUS - RPC GATE STATUS POLL
373 * A CCAP RPC poll returns the gate status info and also triggers an Operational Datastore status update.
374 * At a minimum, the appId needs to be included in the input; subscriberId and gateId are optional.
375 * A gate status response is only included if the RPC request is done for a specific gate (subscriberId and gateId included in input)::
377 POST http://localhost:8181/restconf/operations/packetcable:qos-poll-gates
380 "appId": "/packetcable:apps/packetcable:apps[packetcable:appId='cto-app]",
381 "subscriberId": "44.137.0.11",
389 "cops-gate-usage-info": "0",
390 "cops-gate-state": "Committed(4)/Other(-1)",
391 "gatePath": "ctoapp/44.137.0.12/gate88",
392 "cops-gate-time-info": "0",
393 "cops-gateId": "1ceb0001",
395 "timestamp": "2016-03-24T13:22:59.900-05:00",
398 "response": "cto-app/44.137.0.12/gate88: gate poll complete",
399 "timestamp": "2016-03-24T13:22:59.906-05:00"
403 * When multiple gates are polled (only appId or appId and subscriberId are provided), a generic response is returned and the Operational Datastore is updated in the background::
407 "response": "cto-app/: gate subtree poll in progress",
408 "timestamp": "2016-03-24T13:25:30.471-05:00"