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()
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()
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()
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()
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()
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()