From 29b67081ba32cc8c68ecf5ba38c6d14eacec9f4d Mon Sep 17 00:00:00 2001 From: BLINDAUER Emmanuel Date: Wed, 20 Apr 2016 15:50:50 +0200 Subject: [PATCH] Use netmagis id for VLANs --- scripts/netmagis-looklarge.py | 2 +- scripts/netmagisclient/netmagisclient.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/netmagis-looklarge.py b/scripts/netmagis-looklarge.py index fc83c22..6eff847 100644 --- a/scripts/netmagis-looklarge.py +++ b/scripts/netmagis-looklarge.py @@ -19,7 +19,7 @@ naddr = sys.argv[1] nomreseau = sys.argv[2] # example -# nomreseau = "130.79.80.0/23 2001:660:4703:2001::/64 (IUT Sud)" +# nomreseau = 50 (refer to sourcecode from netmagis listing) data = {'action': 'add-multi', 'naddr': naddr, diff --git a/scripts/netmagisclient/netmagisclient.py b/scripts/netmagisclient/netmagisclient.py index f16981f..5966c02 100644 --- a/scripts/netmagisclient/netmagisclient.py +++ b/scripts/netmagisclient/netmagisclient.py @@ -138,7 +138,7 @@ def looklarge(self, data): self.br.open(uri) self.br.select_form(None, None, 1) self.br["naddr"] = data["naddr"] - self.br.set_value_by_label([data["plage"]], name='plage') + self.br["plage"] = [data["plage"]] r = self.br.submit() returnlooklarge = r.read() if 'Aucun bloc' in returnlooklarge: