diff options
author | Yang Xu <yang.xu3@huawei.com> | 2018-11-27 13:00:05 -0500 |
---|---|---|
committer | Yang Xu <yang.xu3@huawei.com> | 2018-11-27 18:08:02 +0000 |
commit | 9eae154feaa1c4f30477c7d67050cb3c1135824c (patch) | |
tree | b7f93fa5ca7b159bd9aafdd6b3d549873e9605e0 /test/vcpe/cleanvGMUX.py | |
parent | dc9dc0a25b3ebb75b6cd84fc2ee222a14dac5387 (diff) |
Serveral changes in vCPE testing script
To work with automated vCPE model distribution robot, several changes are made
1. Add image name and flavor in preload data
2. Shorten instance name for rescust service
3. Pass in ip as command line input to cleanvGMUX.py
Change-Id: I6f7c8ae711afbc4665e2de72b6abae7969eecb5c
Issue-ID: INT-717
Signed-off-by: Yang Xu <yang.xu3@huawei.com>
(cherry picked from commit 105db515bbcc2f9a2c6b0363b866af24837cc4ac)
Diffstat (limited to 'test/vcpe/cleanvGMUX.py')
-rwxr-xr-x | test/vcpe/cleanvGMUX.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/test/vcpe/cleanvGMUX.py b/test/vcpe/cleanvGMUX.py index 29f35ae52..8b2751f45 100755 --- a/test/vcpe/cleanvGMUX.py +++ b/test/vcpe/cleanvGMUX.py @@ -7,12 +7,12 @@ import json from datetime import datetime import time -gmux_ip = '10.12.6.115' +gmux_ip = '' logging.basicConfig(level=logging.DEBUG, format='%(message)s') logger = logging.getLogger('') headers = {'Content-Type': 'application/json', 'Accept': 'application/json'} auth = 'admin', 'admin' -base_url = 'http://{0}:8183/restconf/config/ietf-interfaces:interfaces'.format(gmux_ip) +base_url = '' def list_interface(): url = base_url @@ -54,6 +54,8 @@ def delete_interface(interface_name): logger.debug(r) if __name__ == '__main__': + gmux_ip = sys.argv[1] + base_url = 'http://{0}:8183/restconf/config/ietf-interfaces:interfaces'.format(gmux_ip) logger.debug('---------------------------------------------------------------') logger.debug('list interfaces before cleaning gmux') list_interface() |