Skip to content

Commit

Permalink
fixes issue #16. Change site selection format after upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
MajesticFalcon committed Nov 30, 2020
1 parent 3490ad1 commit 92474f5
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions netbox/scripts/example.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ class Meta:
)
INET_VLAN = VLAN.objects.get(vid=900)
MGMT_VLAN = VLAN.objects.get(vid=107)
SITES = Site.objects.filter(region_id=1)
#SITES = Site.objects.filter(region_id=1)
REGION = 1
ZAPI = ZabbixAPI(
url='http://172.16.101.51/api_jsonrpc.php/',
user='Admin',
Expand All @@ -65,7 +66,12 @@ class Meta:
asset_tag = StringVar(label="Asset Tag", required=False)
hardware_choice = ChoiceVar(choices=CHOICES)
comments = TextVar(label="Comments", required=False)
uplink_site = ObjectVar(SITES)
uplink_site = ObjectVar(
model=Site,
query_params={
'region_id': REGION
}
}
skip_zabbix = BooleanVar(label="Disable Zabbix configuration")
skip_uplink_port = BooleanVar(label="Disable upstream port selection")
confirmation_email = BooleanVar(label="Send Confirmation Email")
Expand Down

0 comments on commit 92474f5

Please sign in to comment.