Merge "Improve description of push policy for vFW" into casablanca
[integration.git] / test / vcpe / loop.py
1 #! /usr/bin/python
2
3 import time
4 import logging
5 import json
6 import mysql.connector
7 import ipaddress
8 import re
9 import sys
10 import base64
11 from vcpecommon import *
12 import preload
13 import commands
14 import vcpe_custom_service
15
16
17 logging.basicConfig(level=logging.INFO, format='%(message)s')
18
19 cpecommon = VcpeCommon()
20 custom = vcpe_custom_service.CustomService(cpecommon)
21
22 nodes=['mux']
23 hosts = cpecommon.get_vm_ip(nodes)
24
25 custom.del_vgmux_ves_mode(hosts['mux'])
26 time.sleep(2)
27 custom.del_vgmux_ves_collector(hosts['mux'])
28 #exit()
29
30 time.sleep(2)
31 logging.info('Setting vGMUX DCAE collector IP address')
32 custom.set_vgmux_ves_collector(hosts['mux'])
33 time.sleep(2)
34 vgmux_vnf_name = cpecommon.load_object('vgmux_vnf_name')
35 logging.info('vGMUX VNF instance name is %s', vgmux_vnf_name)
36 logging.info('Letting vGMUX report packet loss to DCAE')
37 custom.set_vgmux_packet_loss_rate(hosts['mux'], 55, vgmux_vnf_name)