def test_create_w_config(icmp_config): monitor = target.ICMPMonitor(**icmp_config) assert monitor assert monitor.name == "test_monitor" assert monitor.partition == "Test" data = monitor.data assert data.get('interval') == 1 assert data.get('timeout') == 10
def test_create_w_defaults(icmp_config): monitor = target.ICMPMonitor(name=icmp_config['name'], partition=icmp_config['partition']) assert monitor assert monitor.name == "test_monitor" assert monitor.partition == "Test" data = monitor.data assert data.get('interval') == 5 assert data.get('timeout') == 16
def test_crud_icmp_monitor(self): """Tests the icmp monitor arch-type""" assert getattr(self, 'bigip', None), \ 'We should always have a bigip at this point...' partition = "Common" name = "test_icmp" schema = icmp.ICMPMonitor.properties schema['partition'] = partition schema['name'] = name monitor = icmp.ICMPMonitor(**schema) self.crud_test(monitor)
def test_get_uri_path(bigip, icmp_config): monitor = target.ICMPMonitor(**icmp_config) assert (monitor._uri_path(bigip) == bigip.tm.ltm.monitor.gateway_icmps.gateway_icmp)