c5328dfedcb22f6826ac23d3ef0d0e88a69b830f
[docs.git] / manuals / developer-guide / src / main / asciidoc / packetcable / packetcable-dev.adoc
1 [[developer-and-testing-preliminary]]
2 = PCMM Developer and Testing (*Preliminary*)
3
4 [[specification]]
5 == Specification
6
7 http://www.cablelabs.com/wp-content/uploads/specdocs/PKT-SP-MM-I05-091029.pdf[PacketCable™
8 Specification Multimedia Specification PKT-SP-MM-I05-091029]
9
10 [[system-overview]]
11 == System Overview
12
13 These components introduce a DOCSIS QoS Service Flow management using
14 the PCMM protocol. The driver component is responsible for the
15 PCMM/COPS/PDP functionality required to service requests from
16 PacketCable Provider and FlowManager. Requests are transposed into PCMM
17 Gate Control messages and transmitted via COPS to the CMTS. This plugin
18 adheres to the PCMM/COPS/PDP functionality defined in the CableLabs
19 specification. PacketCable solution is an MDSAL compliant component.
20
21 image:Screenshot6.png[Screenshot6.png,title="Screenshot6.png"]
22
23 image:Odp_diagram_helium_v6.jpg[Odp_diagram_helium_v6.jpg,title="Odp_diagram_helium_v6.jpg"]
24
25 [[packetcable-components]]
26 == Packetcable Components
27
28 packetcable is comprised of three OpendayLight bundles
29
30 [cols=",",options="header",]
31 |=======================================================================
32 |Bundle |Description
33 |packetcable-model |Contains the YANG information model for flows and
34 nodes
35
36 |packetcable-provider |Provider hosts the model processing, RESTCONF,
37 API implementation, and brokers requests to consumer
38
39 |packetcable-consumer |Consumer hosts packet codec and sends requests to
40 driver
41
42 |packetcable-driver |The codec for transforming the model into the
43 appropriate PCMM Gate message for flows and CMTS connections.
44 |=======================================================================
45
46 See
47 https://git.opendaylight.org/gerrit/gitweb?p=packetcable.git;a=tree;f=packetcable-model/src/main/yang[YANG
48 Model]
49
50 [[tell-a-bundle-to-log-debug]]
51 ==== Tell a Bundle to Log Debug
52
53 `   log:set  org.opendaylight.packetcable.packetcable-provider`
54
55 [[tools-for-testing]]
56 == Tools for Testing
57
58 [[custom-testsuite]]
59 === Custom Testsuite
60
61 Most of the
62 [https://wiki.opendaylight.org/view/OpenDaylight_OpenFlow_Plugin::Python_test_scripts
63 Openflow tests for RESTCONF] can be adapted for PCMM and service flow
64 testing.
65 https://git.opendaylight.org/gerrit/gitweb?p=packetcable.git;a=tree;f=packetcable-client[Browse
66 this folder] for WIP of tests and examples used for minimum acceptance
67 testing.
68
69 [[restconfapi.py]]
70 ==== restconfapi.py
71
72 Scripted series of packetcable actions testing minimum compliance.
73
74 For example, adding a CMTS, adding IPv4 flow, delete flow and delete
75 CMTS.
76
77 Other flows can be formulated and added to create a regression test of
78 what kind of flows are interesting for use cases. Multicast?
79
80 [[flow_config_perf_pcmm.py]]
81 ==== flow_config_perf_pcmm.py
82
83 For load testing there is this nice tool that could be repurpose to load
84 test a CMTS. TODO: Adapt this script for load testing PCMM on a CMTS.
85
86 [[yang-ide]]
87 === Yang-IDE
88
89 https://github.com/xored/yang-ide/wiki/Setup-and-build[Setup and Build
90 Yang-IDE for Eclipse]
91
92 [[using-wireshark-to-trace-pcmm]]
93 == Using Wireshark to Trace PCMM
94
95 1.  To start wireshark with privileges issue the following command:
96 +
97 ----------------
98 sudo wireshark &
99 ----------------
100 2.  Select the interface to monitor.
101 3.  Use the Filter to only display COPS messages by applying “cops” in
102 the filter field.
103
104 image:Screenshot8.png[Screenshot8.png,title="Screenshot8.png"]
105
106 [[debugging-and-verifying-dqos-gate-flows-on-the-cmts]]
107 == Debugging and Verifying DQoS Gate (Flows) on the CMTS
108
109 http://books.google.com/books?id=zNnCLUa8CHQC&pg=PA701&lpg=PA701&dq=show+packetcable+gate[This
110 book] serves as a good reference. Below are some of the most useful CMTS
111 commands to verify flows have been enabled on the CMTS.
112
113 [[cisco]]
114 === Cisco
115
116 http://www.cisco.com/c/en/us/td/docs/cable/cmts/cmd_ref/b_cmts_cable_cmd_ref.pdf[Cisco
117 CMTS Cable Command Reference]
118
119 [[find-the-cable-modem]]
120 === Find the Cable Modem
121
122 -----------------------------------------------------------------------------------
123 10k2-DSG#show cable modem
124                                                                                   D
125 MAC Address    IP Address      I/F           MAC           Prim RxPwr  Timing Num I
126                                              State         Sid  (dBmv) Offset CPE P
127 0010.188a.faf6 0.0.0.0         C8/0/0/U0     offline       1    0.00   1482   0   N
128 74ae.7600.01f3 10.32.115.150   C8/0/10/U0    online        1    -0.50  1431   0   Y
129 0010.188a.fad8 10.32.115.142   C8/0/10/UB    w-online      2    -0.50  1507   1   Y
130 000e.0900.00dd 10.32.115.143   C8/0/10/UB    w-online      3    1.00   1677   0   Y
131 e86d.5271.304f 10.32.115.168   C8/0/10/UB    w-online      6    -0.50  1419   1   Y
132 -----------------------------------------------------------------------------------
133
134 [[show-pcmm-plugin-connection]]
135 === Show PCMM Plugin Connection
136
137 ----------------------------------------------------------------------------
138 10k2-DSG#show packetcabl ?
139   cms     Gate Controllers connected to this PacketCable client
140   event   Event message server information
141   gate    PacketCable gate information
142   global  PacketCable global information
143
144 10k2-DSG#show packetcable cms
145 GC-Addr        GC-Port  Client-Addr    COPS-handle  Version PSID Key PDD-Cfg
146
147
148 10k2-DSG#show packetcable cms
149 GC-Addr        GC-Port  Client-Addr    COPS-handle  Version PSID Key PDD-Cfg
150 10.32.0.240    54238    10.32.15.3     0x4B9C8150/1    4.0   0    0   0   
151 ----------------------------------------------------------------------------
152
153 [[show-cops-messages]]
154 === Show COPS Messages
155
156 ------------------
157 debug cops details
158 ------------------
159
160 [[use-cm-mac-address-to-list-service-flows]]
161 === Use CM Mac Address to List Service Flows
162
163 ------------------------------------------------------------------------------------
164 10k2-DSG#show cable modem    
165                                                                                   D
166 MAC Address    IP Address      I/F           MAC           Prim RxPwr  Timing Num I
167                                              State         Sid  (dBmv) Offset CPE P
168 0010.188a.faf6 ---             C8/0/0/UB     w-online      1    0.50   1480   1   N
169 74ae.7600.01f3 10.32.115.150   C8/0/10/U0    online        1    -0.50  1431   0   Y
170 0010.188a.fad8 10.32.115.142   C8/0/10/UB    w-online      2    -0.50  1507   1   Y
171 000e.0900.00dd 10.32.115.143   C8/0/10/UB    w-online      3    0.00   1677   0   Y
172 e86d.5271.304f 10.32.115.168   C8/0/10/UB    w-online      6    -0.50  1419   1   Y
173
174
175 10k2-DSG#show cable modem 000e.0900.00dd service-flow
176                                                  
177
178 SUMMARY:
179 MAC Address    IP Address      Host          MAC           Prim  Num Primary    DS
180                                Interface     State         Sid   CPE Downstream RfId
181 000e.0900.00dd 10.32.115.143   C8/0/10/UB    w-online      3     0   Mo8/0/2:1  2353
182
183
184 Sfid  Dir Curr  Sid   Sched  Prio MaxSusRate  MaxBrst     MinRsvRate  Throughput 
185           State       Type
186 23    US  act   3     BE     0    0           3044        0           39         
187 30    US  act   16    BE     0    500000      3044        0           0          
188 24    DS  act   N/A   N/A    0    0           3044        0           17         
189
190
191
192 UPSTREAM SERVICE FLOW DETAIL:
193
194 SFID  SID   Requests   Polls      Grants     Delayed    Dropped    Packets   
195                                              Grants     Grants
196 23    3     784        0          784        0          0          784       
197 30    16    0          0          0          0          0          0         
198
199
200 DOWNSTREAM SERVICE FLOW DETAIL:
201
202 SFID  RP_SFID QID    Flg Policer               Scheduler             FrwdIF    
203                          Xmits      Drops      Xmits      Drops
204 24    33019   131550     0          0          777        0          Wi8/0/2:2
205
206 Flags Legend:
207 $: Low Latency Queue (aggregated)
208 ~: CIR Queue
209 ------------------------------------------------------------------------------------
210
211 [[deleting-a-pcmm-gate-message-from-the-cmts]]
212 === Deleting a PCMM Gate Message from the CMTS
213
214 ------------------------------------------
215 10k2-DSG#test cable dsd  000e.0900.00dd 30
216 ------------------------------------------
217
218 [[find-service-flows]]
219 === Find service flows
220
221 All gate controllers currently connected to the PacketCable client are
222 displayed
223
224 ------------------------------------------------------
225 show cable modem 00:11:22:33:44:55 service flow   ????
226 show cable modem
227 ------------------------------------------------------
228
229 [[debug-and-display-pcmm-gate-messages]]
230 === Debug and display PCMM Gate messages
231
232 ------------------------------
233 debug packetcable gate control
234 debug packetcable gate events
235 show packetcable gate summary
236 show packetcable global
237 show packetcable cms
238 ------------------------------
239
240 [[debug-cops-messages]]
241 === Debug COPS messages
242
243 -----------------------------
244 debug cops detail
245 debug packetcable cops
246 debug cable dynamic_qos trace
247 -----------------------------
248
249 [[arris]]
250 === Arris
251
252 Pending
253
254 [[integration-verification]]
255 == Integration Verification
256
257 Checkout the integration project and perform regression tests.
258
259 --------------------------------------------------------------------------
260 git clone ssh://${ODL_USERNAME}@git.opendaylight.org:29418/integration.git
261 git clone https:/git.opendaylight.org/gerrit/integration.git
262 --------------------------------------------------------------------------
263
264 1.  Check and edit the
265 integration/features/src/main/resources/features.xml and follow the
266 directions there.
267 2.  Check and edit the integration/features/pom.xml and add a dependency
268 for your feature file
269 3.  Build integration/features and debug
270
271 `  mvn clean install`
272
273 Test your feature in the integration/distributions/extra/karaf/
274 distribution
275
276 -----------------------------------------
277 cd integration/distributions/extra/karaf/
278 mvn clean install
279 cd target/assembly/bin
280 ./karaf
281 -----------------------------------------
282
283 [[service-wrapper]]
284 === service-wrapper
285
286 Install http://karaf.apache.org/manual/latest/users-guide/wrapper.html
287
288 --------------------------------------------------------------------------------------------------------
289 opendaylight-user@root>feature:install service-wrapper
290 opendaylight-user@root>wrapper:install --help
291 DESCRIPTION
292         wrapper:install
293
294 Install the container as a system service in the OS.
295
296 SYNTAX
297         wrapper:install [options]
298
299 OPTIONS
300         -d, --display
301                 The display name of the service.
302                 (defaults to karaf)
303         --help
304                 Display this help message
305         -s, --start-type
306                 Mode in which the service is installed. AUTO_START or DEMAND_START (Default: AUTO_START)
307                 (defaults to AUTO_START)
308         -n, --name
309                 The service name that will be used when installing the service. (Default: karaf)
310                 (defaults to karaf)
311         -D, --description
312                 The description of the service.
313                 (defaults to )
314
315 opendaylight-user@root> wrapper:install
316 Creating file: /home/user/odl/distribution-karaf-0.2.0-Helium-RC0/bin/karaf-wrapper
317 Creating file: /home/user/odl/distribution-karaf-0.2.0-Helium-RC0/bin/karaf-service
318 Creating file: /home/user/odl/distribution-karaf-0.2.0-Helium-RC0/etc/karaf-wrapper.conf
319 Creating file: /home/user/odl/distribution-karaf-0.2.0-Helium-RC0/lib/libwrapper.so
320 Creating file: /home/user/odl/distribution-karaf-0.2.0-Helium-RC0/lib/karaf-wrapper.jar
321 Creating file: /home/user/odl/distribution-karaf-0.2.0-Helium-RC0/lib/karaf-wrapper-main.jar
322
323 Setup complete.  You may wish to tweak the JVM properties in the wrapper configuration file:
324 /home/user/odl/distribution-karaf-0.2.0-Helium-RC0/etc/karaf-wrapper.conf
325 before installing and starting the service.
326
327
328 Ubuntu/Debian Linux system detected:
329   To install the service:
330     $ ln -s /home/user/odl/distribution-karaf-0.2.0-Helium-RC0/bin/karaf-service /etc/init.d/
331
332   To start the service when the machine is rebooted:
333     $ update-rc.d karaf-service defaults
334
335   To disable starting the service when the machine is rebooted:
336     $ update-rc.d -f karaf-service remove
337
338   To start the service:
339     $ /etc/init.d/karaf-service start
340
341   To stop the service:
342     $ /etc/init.d/karaf-service stop
343
344   To uninstall the service :
345     $ rm /etc/init.d/karaf-service
346 --------------------------------------------------------------------------------------------------------