Added placeholder for networkacl tests

This commit is contained in:
Ian Southam 2014-08-13 16:07:08 +02:00 committed by wilderrodrigues
parent 3ea63ced68
commit 99dd91c565

View File

@ -56,6 +56,27 @@ class UpdateConfigTestCase(SystemVMTestCase):
"type": "ips" "type": "ips"
} }
basic_acl = {
"device":"eth2",
"mac_address":"02:00:5d:8d:00:03",
"private_gateway_acl":False,
"nic_ip":"172.16.1.1",
"nic_netmask":"24",
"ingress_rules":
[
{"type":"all",
"cidr":"0.0.0.0/0",
"allowed":False}
],
"egress_rules":
[
{"type":"all",
"cidr":"0.0.0.0/0",
"allowed":False}
],
"type":"networkacl"
}
def update_config(self, config): def update_config(self, config):
config_json = json.dumps(config, indent=2) config_json = json.dumps(config, indent=2)
print_doc('config.json', config_json) print_doc('config.json', config_json)
@ -141,6 +162,7 @@ class UpdateConfigTestCase(SystemVMTestCase):
"172.16.1.22" : "22" "172.16.1.22" : "22"
} }
self.check_password(passw) self.check_password(passw)
self.check_acl(self.basic_acl)
passw = { "172.16.1.20" : "120", passw = { "172.16.1.20" : "120",
"172.16.1.21" : "121", "172.16.1.21" : "121",
@ -161,6 +183,9 @@ class UpdateConfigTestCase(SystemVMTestCase):
} }
self.guest_network(config) self.guest_network(config)
def check_acl(self, config):
self.update_config(config)
def check_password(self,passw): def check_password(self,passw):
for val in passw: for val in passw:
self.add_password(val, passw[val]) self.add_password(val, passw[val])