aboutsummaryrefslogtreecommitdiffstats
path: root/docs/apex/APEX-PCVS-Example.rst
blob: f4299c28061782488cd2e42c3b377d4501a9ece2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
.. This work is licensed under a Creative Commons Attribution 4.0 International License.
.. http://creativecommons.org/licenses/by/4.0

.. _apex-PCVSExample:

Policy-controlled Video Streaming (pcvs) with APEX
**************************************************

.. contents::
    :depth: 3

Introduction
^^^^^^^^^^^^

      .. container:: sectionbody

           .. container:: paragraph

              This module contains several demos for
              Policy-controlled Video Streaming (PCVS). Each demo
              defines a policy using AVRO and Javascript (or other
              scripting languages for the policy logic). To run the
              demo, a vanilla Ubuntu server with some extra software packages is required:

               .. container:: ulist

                  -  Mininet as network simulator

                  -  Floodlight as SDN controller

                  -  Kafka as messaging system

                  -  Zookeeper for Kafka configuration

                  -  APEX for policy control

Install Ubuntu Server and SW
^^^^^^^^^^^^^^^^^^^^^^^^^^^^

          .. container:: sect1

            .. rubric:: Install Demo
               :name: install_demo

            .. container:: sectionbody

               .. container:: paragraph

                  Requirements:

               .. container:: ulist

                  -  Ubuntu server: 1.4 GB

                  -  Ubuntu with Xubuntu Desktop, git, Firefox: 2.3 GB

                  -  Ubuntu with all, system updated: 3 GB

                  -  With ZK, Kafka, VLC, Mininet, Floodlight, Python:
                     4.4 GB

                  -  APEX Build (M2 and built): M2 ~ 2 GB, APEX ~3.5 GB

                  -  APEX install (not build locally): ~ 300 MB

               .. container:: paragraph

                  On a Ubuntu OS (install a stable or LTS server first)

               .. container:: listingblock

                  .. container:: content

                     ::

                        # pre for Ubuntu, tools and X
                        sudo apt-get  -y install --no-install-recommends software-properties-common
                        sudo apt-get  -y install --no-install-recommends build-essential
                        sudo apt-get  -y install --no-install-recommends git
                        sudo aptitude -y install --no-install-recommends xubuntu-desktop
                        sudo apt-get  -y install --no-install-recommends firefox


                        # install Java
                        sudo add-apt-repository ppa:webupd8team/java
                        sudo apt-get update
                        sudo apt-get -y install --no-install-recommends oracle-java8-installer
                        java -version


                        # reboot system, run system update, then continue

                        # if VBox additions are needed, install and reboot
                        sudo (cd /usr/local/share; wget https://www.virtualbox.org/download/testcase/VBoxGuestAdditions_5.2.7-120528.iso)
                        sudo mount /usr/local/share/VBoxGuestAdditions_5.2.7-120528.iso /media/cdrom
                        sudo (cd /media/cdrom;VBoxLinuxAdditions.run)


                        # update apt-get DB
                        sudo apt-get update

                        # if APEX is build from source, install maven and rpm
                        sudo apt-get install maven rpm

                        # install ZooKeeper
                        sudo apt-get install zookeeperd

                        # install Kafka
                        (cd /tmp;wget http://ftp.heanet.ie/mirrors/www.apache.org/dist/kafka/1.0.0/kafka_2.12-1.0.0.tgz --show-progress)
                        sudo mkdir /opt/Kafka
                        sudo tar -xvf /tmp/kafka_2.12-1.0.0.tgz -C /opt/Kafka/

                        # install mininet
                        cd /usr/local/src
                        sudo git clone https://github.com/mininet/mininet.git
                        (cd mininet;util/install.sh -a)

                        # install floodlight, requires ant
                        sudo apt-get install ant
                        cd /usr/local/src
                        sudo wget --no-check-certificate https://github.com/floodlight/floodlight/archive/master.zip
                        sudo unzip master.zip
                        cd floodlight-master
                        sudo ant
                        sudo mkdir /var/lib/floodlight
                        sudo chmod 777 /var/lib/floodlight

                        # install python pip
                        sudo apt-get install python-pip

                        # install kafka-python (need newer version from github)
                        cd /usr/local/src
                        sudo git clone https://github.com/dpkp/kafka-python
                        sudo pip install ./kafka-python

                        # install vlc
                        sudo apt-get install vlc

               .. container:: paragraph

                  Install APEX either from source or from a distribution
                  package. See the APEX documentation for details. We
                  assume that APEX is installed in
                  ``/opt/ericsson/apex/apex``

               .. container:: paragraph

                  Copy the LinkMonitor file to Kafka-Python

               .. container:: listingblock

                  .. container:: content

                     ::

                        sudo cp /opt/ericsson/apex/apex/examples/scripts/pcvs/vpnsla/LinkMonitor.py /usr/local/src/kafka-python

               .. container:: paragraph

                  Change the Logback configuration in APEX to logic
                  logging

               .. container:: listingblock

                  .. container:: content

                     ::

                        (cd /opt/ericsson/apex/apex/etc; sudo cp logback-logic.xml logback.xml)

         .. container:: sect1

            .. rubric:: Get the Demo Video
               :name: get_the_demo_video

            .. container:: sectionbody

               .. container:: ulist

                  -  For all download options of the movie please visit
                     http://bbb3d.renderfarming.net/download.html

                  -  For lower-res downloads and mirrors see
                     https://peach.blender.org/download

               .. container:: listingblock

                  .. container:: content

                     ::

                        sudo mkdir /usr/local/src/videos

               .. container:: paragraph

                  Standard 720p (recommended)

               .. container:: listingblock

                  .. container:: content

                     ::

                        (cd /usr/local/src/videos; sudo curl -o big_buck_bunny_480p_surround.avi http://download.blender.org/peach/bigbuckbunny_movies/big_buck_bunny_480p_surround-fix.avi)

               .. container:: paragraph

                  Full HD video

               .. container:: listingblock

                  .. container:: content

                     ::

                        (cd videos; sudo curl -o bbb_sunflower_1080p_60fps_normal.mp4 http://distribution.bbb3d.renderfarming.net/video/mp4/bbb_sunflower_1080p_60fps_normal.mp4)



VPN SLA Demo
^^^^^^^^^^^^^

          .. container:: sect1

            .. container:: sectionbody

               .. container:: paragraph

                  This demo uses a network with several central office
                  and core switches, over which two VPNs are run. A
                  customer ``A`` has two location ``A1`` and ``A2`` and
                  a VPN between them. A customer ``B`` has two location
                  ``B1`` and ``B2`` and a VPN between them.

               .. container:: imageblock

                  .. container:: content

                     |VPN SLA Architecture|

               .. container:: paragraph

                  The architecture above shows the scenario. The
                  components are realized in this demo as follows:

               .. container:: ulist

                  -  *CEP / Analytics* - a simple Python script taking
                     events from Kafka and sending them to APEX

                  -  *APEX / Policy* - the APEX engine running the VPA
                     SLA policy

                  -  *Controller* - A vanilla Floodlight controller
                     taking events from the Link Monitor and configuring
                     Mininet

                  -  *Network* - A network created using Mininet

               .. container:: paragraph

                  The demo requires to start some software (detailed
                  below). To show actual video streams, we use ``VLC``.
                  If you do not want to show video streams, but only the
                  policy, skip the ``VLC`` section.

               .. container:: paragraph

                  All shown scripts are available in a full APEX
                  installation in
                  ``$APEX_HOME/examples/scripts/pcvs/vpnsla``.

               .. container:: sect2

                  .. rubric:: Start all Software
                     :name: start_all_software

                  .. container:: paragraph

                     Create environment variables in a file, say
                     ``env.sh``. In each new Xterm

                  .. container:: ulist

                     -  Source these environment settings, e.g.
                        ``. ./env.sh``

                     -  Run the commands below as root (``sudo`` per
                        command or ``sudo -i`` for interactive mode as
                        shown below)

                  .. container:: listingblock

                     .. container:: content

                        ::

                           #!/usr/bin/env bash

                           export src_dir=/usr/local/src
                           export APEX_HOME=/opt/ericsson/apex/apex
                           export APEX_USER=apexuser

                  .. container:: paragraph

                     In a new Xterm, start Floodlight

                  .. container:: listingblock

                     .. container:: content

                        ::

                           sudo -i
                           . ./env.sh
                           cd $src_dir/floodlight-master && java -jar target/floodlight.jar

                  .. container:: paragraph

                     In a new Xterm start Mininet

                  .. container:: listingblock

                     .. container:: content

                        ::

                           sudo -i
                           . ./env.sh
                           mn -c && python $APEX_HOME/examples/scripts/pcvs/vpnsla/MininetTopology.py

                  .. container:: paragraph

                     In a new Xterm, start Kafka

                  .. container:: listingblock

                     .. container:: content

                        ::

                           sudo -i
                           . ./env.sh
                           /opt/Kafka/kafka_2.12-1.0.0/bin/kafka-server-start.sh /opt/Kafka/kafka_2.12-1.0.0/config/server.properties

                  .. container:: paragraph

                     In a new Xerm start APEX with the Kafka
                     configuration for this demo

                  .. container:: listingblock

                     .. container:: content

                        ::

                           cd $APEX_HOME
                           ./bin/apexApps.sh engine -c examples/config/pcvs/vpnsla/kafka2kafka.json

                  .. container:: paragraph

                     In a new Xterm start the Link Monitor. The Link
                     Monitor has a 30 second sleep to slow down the
                     demonstration. So the first action of it comes 30
                     seconds after start. Every new action in 30 second
                     intervals.

                  .. container:: listingblock

                     .. container:: content

                        ::

                           sudo -i
                           . ./env.sh
                           cd $src_dir
                           xterm -hold -e 'python3 $src_dir/kafka-python/LinkMonitor.py' &

                  .. container:: paragraph

                     Now all software should be started and the demo is
                     running. The Link Monitor will send link up events,
                     picked up by APEX which triggers the policy. Since
                     there is no problem, the policy will do nothing.

               .. container:: sect2

                  .. rubric:: Create 2 Video Streams with VLC
                     :name: create_2_video_streams_with_vlc

                  .. container:: paragraph

                     In the Mininet console, type ``xterm A1 A2`` and
                     ``xterm B1 B2`` to open terminals on these nodes.

                  .. container:: paragraph

                     ``A2`` and ``B2`` are the receiving nodes. In these
                     terminals, run ``vlc-wrapper``. In each opened VLC
                     window do

                  .. container:: ulist

                     -  Click Media → Open Network Stream

                     -  Give the URL as ``rtp://@:5004``

                  .. container:: paragraph

                     ``A1`` and ``B1`` are the sending nodes (sending
                     the video stream) In these terminals, run
                     ``vlc-wrapper``. In each opened VLC window do

                  .. container:: ulist

                     -  Click Media → Stream

                     -  Add the video (from ``/usr/local/src/videos``)

                     -  Click ``Stream``

                     -  Click ``Next``

                     -  Change the destination
                        ``RTP / MPEG Transport Stream`` and click
                        ``Add``

                     -  Change the address and type to ``10.0.0.2`` in
                        ``A1`` and to ``10.0.0.4`` in ``B1``

                     -  Turn off ``Active Transcoding`` (this is
                        important to minimize CPU load)

                     -  Click ``Next``

                     -  Click ``Stream``

                  .. container:: paragraph

                     The video should be streaming across the network
                     from ``A1`` to ``A2`` and from ``B1`` to ``B2``. If
                     the video streams a slow or interrupted the CPU
                     load is too high. In these cases either try a
                     better machine or use a different (lower quality)
                     video stream.

               .. container:: sect2

                  .. rubric:: Take out L09 and let the Policy do it’s
                     Magic
                     :name: take_out_l09_and_let_the_policy_do_it_s_magic

                  .. container:: paragraph

                     Now it is time to take out the link ``L09``. This
                     will be picked up by the Link Monitor, which sends
                     a new event (L09 DOWN) to the policy. The policy
                     then will calculate which customer should be
                     impeded (throttled). This will continue, until SLAs
                     are violated, then a priority calculation will kick
                     in (Customer ``A`` is prioritized in the setup).

                  .. container:: paragraph

                     To initiate this, simply type ``link s5 s6 down``
                     in the Mininet console followed by ``exit``.

                  .. container:: paragraph

                     If you have the video streams running, you will see
                     one or the other struggeling, depending on the
                     policy decision.

               .. container:: sect2

                  .. rubric:: Reset the Demo
                     :name: reset_the_demo

                  .. container:: paragraph

                     If you want to reset the demo, simple stop (in this
                     order) the following process

                  .. container:: ulist

                     -  Link Monitor

                     -  APEX

                     -  Mininet

                     -  Floodlight

                  .. container:: paragraph

                     Then restart them in this order

                  .. container:: ulist

                     -  Floodlight

                     -  Mininet

                     -  APEX

                     -  Link Monitor

               .. container:: sect2

                  .. rubric:: Monitor the Demo
                     :name: monitor_the_demo

                  .. container:: paragraph

                     Floodlight and APEX provide REST interfaces for
                     monitoring.

                  .. container:: ulist

                     -  Floodlight: see `Floodlight
                        Docs <https://floodlight.atlassian.net/wiki/spaces/floodlightcontroller/pages/40403023/Web+GUI>`__
                        for details on how to access the monitoring. In
                        a standard installation as we use here, pointing
                        browser to the URL
                        ``http://localhost:8080/ui/pages/index.html``
                        should work on the same host

                     -  APEX please see the APEX documentation for
                        `Monitoring
                        Client <https://ericsson.github.io/apex-docs/user-manual/engine-apps/um-engapps-eng-monitoring.html>`__
                        or `Full
                        Client <https://ericsson.github.io/apex-docs/user-manual/engine-apps/um-engapps-full-client.html>`__
                        for details on how to monitor APEX.


VPN SLA Policy
^^^^^^^^^^^^^^

            .. container:: sectionbody

               .. container:: paragraph

                  The VPN SLA policy is designed as a MEDA policy. The
                  first state (M = Match) takes the trigger event (a
                  link up or down) and checks if this is a change to the
                  known topology. The second state (E = Establish) takes
                  all available information (trigger event, local
                  context) and defines what situation we have. The third
                  state (D = Decide) takes the situation and selects
                  which algorithm is best to process it. This state can
                  select between ``none`` (nothing to do), ``solved`` (a
                  problem is solved now), ``sla`` (compare the current
                  customer SLA situation and select one to impede), and
                  ``priority`` (impede non-priority customers). The
                  fourth and final state (A = Act) selects the right
                  action for the taken decision and creates the response
                  event sent to the orchestrator.

               .. container:: paragraph

                  We have added three more policies to set the local
                  context: one for adding nodes, one for adding edges
                  (links), and one for adding customers. These policies
                  do not realize any action, they are only here for
                  updating the local context. This mechanism is the
                  fasted way to update local context, and it is
                  independent of any context plugin.

               .. container:: paragraph

                  The policy uses data defined in Avro, so we have a
                  number of Avro schema definitions.

Context Schemas
---------------

         .. container:: sect1

            .. container:: sectionbody

               .. container:: paragraph

                  The context schemas are for the local context. We
                  model edges and nodes for the topology, customers, and
                  problems with all information on detected problems.

                  .. container:: ulist

                     -  |avroSchemaEdges_link|
                     -  |avroSchemaNodes_link|
                     -  |avroSchemaCustomers_link|


Trigger Schemas
---------------

        .. container:: sect1

            .. container:: sectionbody

               .. container:: paragraph

                  The trigger event provides a status as ``UP`` or
                  ``DOWN``. To avoid tests for these strings in the
                  logic, we defined an Avro schema for an enumeration (|avroSchemaLinkStatus_link|).
                  This does not impact the trigger system (it can still
                  send the strings), but makes the task logic simpler.



Context Logic Nodes
--------------------

         .. container:: sect1

            .. container:: sectionbody

               .. container:: paragraph

                  The node context logic simply takes the trigger event
                  (for context) and creates a new node in the local
                  context topology (|cntxtNodes_link|).

Context Logic Edges
--------------------

         .. container:: sect1

            .. container:: sectionbody

               .. container:: paragraph

                  The edge context logic simply takes the trigger event
                  (for context) and creates a new edge in the local
                  context topology (|cntxtEdges_link|).


Context Logic Customer
----------------------

         .. container:: sect1

            .. container:: sectionbody

               .. container:: paragraph

                  The customer context logic simply takes the trigger
                  event (for context) and creates a new customer in the
                  local context topology (|cntxtCustomer_link|).


Logic: Match
------------

         .. container:: sect1

            .. container:: sectionbody

               .. container:: paragraph

                  This is the logic for the match state. It is kept very
                  simple. Beside taking the trigger event, it also
                  creates a timestamp. This timestamp is later used for
                  SLA and downtime calculations as well as for some
                  performance information of the policy .
                  Sample |taskMatch_link|


Logic: Policy Establish State
-----------------------------

         .. container:: sect1

            .. container:: sectionbody

               .. container:: paragraph

                  This is the logic for the establish state. It is the
                  most complicated logic, since establishing a situation
                  for a decision is the most important part of any
                  policy. First, the policy describes what we find (the
                  switch block), in terms of 8 normal situations and 1
                  extreme error case.

               .. container:: paragraph

                  If required, it creates local context information for
                  the problem (if it is new) or updates it (if the
                  problem still exists). It also calculates customer SLA
                  downtime and checks for any SLA violations. Finally,
                  it creates a situation object.
                  Sample |taskEstablish_link|

Logic: Policy Decide State
--------------------------

         .. container:: sect1

            .. container:: sectionbody

               .. container:: paragraph

                  The decide state can select between different
                  algorithms depending on the situation. So it needs a
                  Task Selection Logic (TSL). This TSL select a task in
                  the current policy execution (i.e. potentially a
                  different one per execution).
                  Sample |tslDecide_Link|

               .. container:: paragraph

                  The actual task logic are then ``none``, ``solved``,
                  ``sla``, and ``priority``.
                  Sample task logic are as given below :

                  .. container:: ulist

                     -  |taskDecideNone_link|
                     -  |taskDecideSolved_Link|
                     -  |taskDecideSla_link|
                     -  |taskDecidePriority_Link|


Logic: Policy Act State
------------------------

         .. container:: sect1

            .. container:: sectionbody

               .. container:: paragraph

                  This is the logic for the act state. It is simply
                  selecting an action, and creating the repsonse event
                  for the orchestrator (the output of the policy).
                  Sample |taskAct_link|

CLI Spec
--------

         .. container:: sect1

            .. rubric:: Complete Policy Definition
               :name: complete_policy_definition

            .. container:: sectionbody

               .. container:: paragraph

                  The complete policy definition is realized using the
                  APEX CLI Editor. The script below shows the actual
                  policy specification. All logic and schemas are
                  included (as macro file).
                  Sample |vpnsla-apex_link|


Context Events Nodes
--------------------

         .. container:: sect1

            .. container:: sectionbody

               .. container:: paragraph

                  The following events create all nodes of the topology.

                  .. container:: ulist

                     -  |ctxtNodesJson_link|


Context Events Edges
--------------------

         .. container:: sect1

            .. container:: sectionbody

               .. container:: paragraph

                  The following events create all edges of the topology.

                  .. container:: ulist

                     -  |ctxtEdgesJson_link|


Context Events Customers
------------------------

         .. container:: sect1

            .. container:: sectionbody

               .. container:: paragraph

                  The following events create all customers of the topology.

                  .. container:: ulist

                     -  |ctxtCustomerJson_link|


Trigger Examples
----------------

         .. container:: sect1

            .. container:: sectionbody

               .. container:: paragraph

                  The following events are examples for trigger events

                  .. container:: ulist

                     -  |triggerEdgeJson_link|

Link Monitor
------------

         .. container:: sect1

            .. container:: sectionbody

               .. container:: paragraph

                  The Link Monitor is a Python script. At startup, it
                  sends the context events to APEX to initialize the
                  topology and the customers. Then it takes events from
                  Kafka and sends them to APEX.
                  Sample |linkMonitor_link|

Mininet Topology
----------------

         .. container:: sect1

            .. container:: sectionbody

               .. container:: paragraph

                  The topology is realized using Mininet. This
                  script is used to establish the topology and to realize
                  network configurations.
                  Sample |mininetTopology_link|


   .. container::
      :name: footer-text

      2.3.0-SNAPSHOT
      Last updated 2020-04-03 16:04:24 IST


.. |ONAP| image:: ../../../images/logos.png
   :class: builtBy
   :target: http://www.onap.org/

.. |VPN SLA Architecture| image:: images/pcvs/vpnsla-arch.png

.. |avroSchemaEdges_link| raw:: html

  <a href="https://github.com/onap/policy-apex-pdp/tree/guilin/examples/examples-pcvs/src/main/resources/org/onap/policy/apex/examples/pcvs/vpnsla/avro/topology-edges.avsc" target="_blank">AVRO Schema Edges</a>
.. |avroSchemaNodes_link| raw:: html

  <a href="https://github.com/onap/policy-apex-pdp/tree/guilin/examples/examples-pcvs/src//main/resources/org/onap/policy/apex/examples/pcvs/vpnsla/avro/topology-nodes.avsc" target="_blank">AVRO Schema Nodes</a>
.. |avroSchemaCustomers_link| raw:: html

  <a href="https://github.com/onap/policy-apex-pdp/tree/guilin/examples/examples-pcvs/src/main/resources/org/onap/policy/apex/examples/pcvs/vpnsla/avro/customers.avsc" target="_blank">AVRO Schema Customers</a>
.. |avroSchemaLinkStatus_link| raw:: html

  <a href="https://github.com/onap/policy-apex-pdp/tree/guilin/examples/examples-pcvs/src/main/resources/org/onap/policy/apex/examples/pcvs/vpnsla/avro/link-status.avsc" target="_blank">AVRO Schema Link Status</a>
.. |cntxtNodes_link| raw:: html

  <a href="https://github.com/onap/policy-apex-pdp/tree/guilin/examples/examples-pcvs/src/main/resources/org/onap/policy/apex/examples/pcvs/vpnsla/logic/ctxt-nodes.js" target="_blank">Logic Node Context</a>
.. |cntxtEdges_link| raw:: html

  <a href="https://github.com/onap/policy-apex-pdp/tree/guilin/examples/examples-pcvs/src/main/resources/org/onap/policy/apex/examples/pcvs/vpnsla/logic/ctxt-edges.js" target="_blank">Logic Edge Context</a>
.. |cntxtCustomer_link| raw:: html

  <a href="https://github.com/onap/policy-apex-pdp/tree/guilin/examples/examples-pcvs/src/main/resources/org/onap/policy/apex/examples/pcvs/vpnsla/logic/ctxt-customer.js" target="_blank">Logic Customer Context</a>
.. |taskMatch_link| raw:: html

  <a href="https://github.com/onap/policy-apex-pdp/tree/guilin/examples/examples-pcvs/src/main/resources/org/onap/policy/apex/examples/pcvs/vpnsla/logic/task-match.js" target="_blank">Logic Policy Match State</a>
.. |taskEstablish_link| raw:: html

  <a href="https://github.com/onap/policy-apex-pdp/tree/guilin/examples/examples-pcvs/src/main/resources/org/onap/policy/apex/examples/pcvs/vpnsla/logic/task-establish.js" target="_blank">Logic Policy Establish State</a>
.. |tslDecide_Link| raw:: html

  <a href="https://github.com/onap/policy-apex-pdp/tree/guilin/examples/examples-pcvs/src/main/resources/org/onap/policy/apex/examples/pcvs/vpnsla/logic/tsl-decide.js" target="_blank">JS Logic Policy Decide State - TSL</a>
.. |taskDecideNone_link| raw:: html

  <a href="https://github.com/onap/policy-apex-pdp/tree/guilin/examples/examples-pcvs/src/main/resources/org/onap/policy/apex/examples/pcvs/vpnsla/logic/task-decide-none.js" target="_blank">Logic: Decide None</a>
.. |taskDecideSolved_Link| raw:: html

  <a href="https://github.com/onap/policy-apex-pdp/tree/guilin/examples/examples-pcvs/src/main/resources/org/onap/policy/apex/examples/pcvs/vpnsla/logic/task-decide-solved.js" target="_blank">Logic: Decide Solved</a>
.. |taskDecideSla_link| raw:: html

  <a href="https://github.com/onap/policy-apex-pdp/tree/guilin/examples/examples-pcvs/src/main/resources/org/onap/policy/apex/examples/pcvs/vpnsla/logic/task-decide-sla.js" target="_blank">Logic: Decide SLA</a>
.. |taskDecidePriority_Link| raw:: html

  <a href="https://github.com/onap/policy-apex-pdp/tree/guilin/examples/examples-pcvs/src/main/resources/org/onap/policy/apex/examples/pcvs/vpnsla/logic/task-decide-priority.js" target="_blank">Logic: Decide Priority</a>
.. |taskAct_link| raw:: html

  <a href="https://github.com/onap/policy-apex-pdp/tree/guilin/examples/examples-pcvs/src/main/resources/org/onap/policy/apex/examples/pcvs/vpnsla/logic/task-act.js" target="_blank">Logic Policy Act State</a>
.. |vpnsla-apex_link| raw:: html

  <a href="https://github.com/onap/policy-apex-pdp/tree/guilin/examples/examples-pcvs/src/main/resources/org/onap/policy/apex/examples/pcvs/vpnsla/vpnsla.apex" target="_blank">APEX VPN SLA Policy Specification</a>
.. |ctxtNodesJson_link| raw:: html

  <a href="https://github.com/onap/policy-apex-pdp/tree/guilin/examples/examples-pcvs/src/main/resources/examples/events/pcvs/vpnsla/CtxtNodes.json" target="_blank">Context Events Nodes</a>
.. |ctxtEdgesJson_link| raw:: html

  <a href="https://github.com/onap/policy-apex-pdp/tree/guilin/examples/examples-pcvs/src/main/resources/examples/events/pcvs/vpnsla/CtxtEdges.json" target="_blank">Context Events Edges</a>
.. |ctxtCustomerJson_link| raw:: html

  <a href="https://github.com/onap/policy-apex-pdp/tree/guilin/examples/examples-pcvs/src/main/resources/examples/events/pcvs/vpnsla/CtxtCustomers.json" target="_blank">Context Events Customers</a>
.. |triggerEdgeJson_link| raw:: html

  <a href="https://github.com/onap/policy-apex-pdp/tree/guilin/examples/examples-pcvs/src/main/resources/examples/events/pcvs/vpnsla/Trigger_Edge09.json" target="_blank">Trigger Examples</a>
.. |linkMonitor_link| raw:: html

  <a href="https://github.com/onap/policy-apex-pdp/tree/guilin/examples/examples-pcvs/src/main/resources/examples/scripts/pcvs/vpnsla/LinkMonitor.py" target="_blank">Link Monitor</a>
.. |mininetTopology_link| raw:: html

  <a href="https://github.com/onap/policy-apex-pdp/tree/guilin/examples/examples-pcvs/src/main/resources/examples/scripts/pcvs/vpnsla/MininetTopology.py" target="_blank">Mininet Topology</a>