blob: ad58797151f90f18d6b6ef7127e3737efb08099e [file] [log] [blame]
Kang Xi11d278c2018-04-06 16:56:04 -04001#! /usr/bin/python
2
3import time
4import logging
5import json
6import mysql.connector
7import ipaddress
8import re
9import sys
10import base64
11from vcpecommon import *
12import preload
13import commands
14import vcpe_custom_service
15
16
17logging.basicConfig(level=logging.INFO, format='%(message)s')
18
19cpecommon = VcpeCommon()
20custom = vcpe_custom_service.CustomService(cpecommon)
21
22nodes=['mux']
23hosts = cpecommon.get_vm_ip(nodes)
24
25custom.del_vgmux_ves_mode(hosts['mux'])
26time.sleep(2)
27custom.del_vgmux_ves_collector(hosts['mux'])
28exit()
29
30time.sleep(2)
31logging.info('Setting vGMUX DCAE collector IP address')
32custom.set_vgmux_ves_collector(hosts['mux'])
33time.sleep(2)
34vgmux_vnf_name = cpecommon.load_object('vgmux_vnf_name')
35logging.info('vGMUX VNF instance name is %s', vgmux_vnf_name)
36logging.info('Letting vGMUX report packet loss to DCAE')
37custom.set_vgmux_packet_loss_rate(hosts['mux'], 55, vgmux_vnf_name)