diff options
author | 2017-07-27 15:04:07 +0000 | |
---|---|---|
committer | 2017-07-27 15:04:07 +0000 | |
commit | 162c03ef301396072c1934e7e7e0c40a841b4fe2 (patch) | |
tree | 7a2a2781949252436450ff5832962785061a774a /app/test/fetch/cli_fetch/test_data/cli_access.py | |
parent | b88c78e3cf2bef22aa2f1c4d0bf305e303bc15f0 (diff) | |
parent | 7e83d0876ddb84a45e130eeba28bc40ef53c074b (diff) |
Merge "Calipso initial release for OPNFV"
Diffstat (limited to 'app/test/fetch/cli_fetch/test_data/cli_access.py')
-rw-r--r-- | app/test/fetch/cli_fetch/test_data/cli_access.py | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/app/test/fetch/cli_fetch/test_data/cli_access.py b/app/test/fetch/cli_fetch/test_data/cli_access.py new file mode 100644 index 0000000..b151dc6 --- /dev/null +++ b/app/test/fetch/cli_fetch/test_data/cli_access.py @@ -0,0 +1,58 @@ +############################################################################### +# Copyright (c) 2017 Koren Lev (Cisco Systems), Yaron Yogev (Cisco Systems) # +# and others # +# # +# All rights reserved. This program and the accompanying materials # +# are made available under the terms of the Apache License, Version 2.0 # +# which accompanies this distribution, and is available at # +# http://www.apache.org/licenses/LICENSE-2.0 # +############################################################################### +COMPUTE_HOST_ID = "node-5.cisco.com" +COMMAND = "virsh list" +NON_GATEWAY_CACHED_COMMAND = COMPUTE_HOST_ID + "," + "ssh -o StrictHostKeyChecking=no " + \ + COMPUTE_HOST_ID + " sudo " + COMMAND +GATEWAY_CACHED_COMMAND = COMPUTE_HOST_ID + "," + "sudo " + COMMAND +CACHED_COMMAND_RESULT = " Id Name State\n---\n 2 instance-00000003 running" +RUN_RESULT = " Id Name State\n---\n 2 instance-00000002 running" +FETCH_LINES_RESULT = [ + " Id Name State", + "---", + " 2 instance-00000002 running" +] + +LINES_FOR_FIX = [ + "br-ex\t\t8000.005056acc9a2\tno\t\teno33554952", + "\t\t\t\t\t\t\tp_ff798dba-0", + "\t\t\t\t\t\t\tv_public", + "\t\t\t\t\t\t\tv_vrouter_pub", + "br-fw-admin\t\t8000.005056ace897\tno\t\teno16777728" +] + +FIXED_LINES = [ + "br-ex\t\t8000.005056acc9a2\tno\t\teno33554952,p_ff798dba-0,v_public,v_vrouter_pub", + "br-fw-admin\t\t8000.005056ace897\tno\t\teno16777728" +] + +PARSED_CMD_RESULT = [ + { + "bridge_id": "8000.005056acc9a2", + "bridge_name": "br-ex", + "interfaces": "eno33554952,p_ff798dba-0,v_public,v_vrouter_pub", + "stp_enabled": "no" + }, + { + "bridge_id": "8000.005056ace897", + "bridge_name": "br-fw-admin", + "interfaces": "eno16777728", + "stp_enabled": "no" + } +] + +LINE_FOR_PARSE = "br-ex\t\t8000.005056acc9a2\tno\t\teno33554952,p_ff798dba-0,v_public,v_vrouter_pub" +PARSED_LINE = { + "bridge_id": "8000.005056acc9a2", + "bridge_name": "br-ex", + "interfaces": "eno33554952,p_ff798dba-0,v_public,v_vrouter_pub", + "stp_enabled": "no" +} +HEADERS = ["bridge_name", "bridge_id", "stp_enabled", "interfaces"] |