Ejemplo n.º 1
0
def host_expected_to_be_down(management_profile):
    box = Netbox(ip='10.254.254.254', sysname='downhost.example.org',
                 organization_id='myorg', room_id='myroom', category_id='SRV')
    box.save()
    NetboxProfile(netbox=box, profile=management_profile).save()
    yield box
    print("teardown test device")
    box.delete()
Ejemplo n.º 2
0
def netbox():
    box = Netbox(ip='10.254.254.254', sysname='downhost.example.org',
                 organization_id='myorg', room_id='myroom', category_id='SRV',
                 snmp_version=2)
    box.save()
    yield box
    print("teardown test device")
    box.delete()
Ejemplo n.º 3
0
def localhost():
    from nav.models.manage import Netbox
    box = Netbox(ip='127.0.0.1', sysname='localhost.example.org',
                 organization_id='myorg', room_id='myroom', category_id='SRV',
                 read_only='public', snmp_version=2)
    box.save()
    yield box
    print("teardown test device")
    box.delete()
Ejemplo n.º 4
0
def netbox(management_profile):
    box = Netbox(ip='10.254.254.254',
                 sysname='downhost.example.org',
                 organization_id='myorg',
                 room_id='myroom',
                 category_id='SRV')
    box.save()
    yield box
    print("teardown test device")
    box.delete()
Ejemplo n.º 5
0
def localhost(management_profile):
    from nav.models.manage import Netbox, NetboxProfile
    box = Netbox(ip='127.0.0.1',
                 sysname='localhost.example.org',
                 organization_id='myorg',
                 room_id='myroom',
                 category_id='SRV')
    box.save()
    NetboxProfile(netbox=box, profile=management_profile).save()
    yield box
    print("teardown test device")
    box.delete()
Ejemplo n.º 6
0
def host_going_down():
    box = Netbox(
        ip="10.254.254.254",
        sysname="downhost.example.org",
        organization_id="myorg",
        room_id="myroom",
        category_id="SRV",
    )
    box.save()
    yield box
    print("teardown test device")
    box.delete()