示例#1
0
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
示例#2
0
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
示例#3
0
 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)
示例#4
0
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)