Bartek Grzybowski | fbbdbec | 2019-09-25 16:37:05 +0200 | [diff] [blame^] | 1 | #!/usr/bin/env python |
Kang Xi | 11d278c | 2018-04-06 16:56:04 -0400 | [diff] [blame] | 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']) |
Yang Xu | 9f935b2 | 2018-11-22 10:56:52 -0500 | [diff] [blame] | 28 | #exit() |
Kang Xi | 11d278c | 2018-04-06 16:56:04 -0400 | [diff] [blame] | 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) |