diff options
author | Tomas Cechvala <tcechval@cisco.com> | 2017-02-10 15:48:05 +0100 |
---|---|---|
committer | Tomas Cechvala <tcechval@cisco.com> | 2017-03-10 09:14:14 +0000 |
commit | 32f101bf3a3e2a17b834f2e17f9976eb7fd03960 (patch) | |
tree | 97b85ff5a19f2deca8a92599bff069f2a53c660d /testing/robot/data/test_data.py | |
parent | 3ce8b6143a2eac2de4df17cab3e2c7ad9ea2acb6 (diff) |
Security groups smoke test in FDS
Security group rules are applied to L2 traffic.
- creates infrastructure
- applies policy rules
- makes MM send icmp and http traffic
- changes policy rules
- rechecks the traffic
- clears infrastructure
Change-Id: I7b73f7ff22bb3fc59c5e873818bdb5d5ad88c12d
Signed-off-by: Tomas Cechvala <tcechval@cisco.com>
Diffstat (limited to 'testing/robot/data/test_data.py')
-rw-r--r-- | testing/robot/data/test_data.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/testing/robot/data/test_data.py b/testing/robot/data/test_data.py index 2011257..97aaf2b 100644 --- a/testing/robot/data/test_data.py +++ b/testing/robot/data/test_data.py @@ -12,6 +12,8 @@ import uuid run_uuid = str(uuid.uuid4()) network_name = 'fds_smoke_network_' + run_uuid subnet_name = 'fds_smoke_subnet_' + run_uuid +sg_client = 'client' +sg_server = 'server' vm1_name = 'fds_smoke_vm1_' + run_uuid vm1_address = '192.168.10.5' vm2_name = 'fds_smoke_vm2_' + run_uuid @@ -21,7 +23,7 @@ port2_name = 'fds_smoke_port2_' + run_uuid subnet_cidr = '192.168.10.0/24' vm_flavor = 'm1.small' vm_image = 'cirros-0.3.4' -userdata1 = "#!/bin/sh\n\nsudo ip a add {}/24 dev eth0\n".format(vm1_address) +userdata1 = "#!/bin/sh\n\nsudo ip a add {}/24 dev eth0\n while true; do echo curl_passed | nc -l -p 80; done\n".format(vm1_address) userdata2 = "#!/bin/sh\n\nsudo ip a add {}/24 dev eth0\nwhile true; do\n ping -c 1 {} 2>&1 >/dev/null\n " \ "RES=$?\n if [ \"Z$RES\" = \"Z0\" ] ; then\n echo 'ping PASSED'\n break\n else\n echo " \ - "'ping FAILED'\n fi\n sleep 1\ndone\n".format(vm2_address, vm1_address) + "'ping FAILED'\n fi\n sleep 1\ndone\n\nwhile true; do curl {} --retry-delay 1 -m 1; sleep 3; done\n".format(vm2_address, vm1_address, vm1_address) |