diff --git a/generate-conf.py b/generate-conf.py index 4717208..b006e37 100644 --- a/generate-conf.py +++ b/generate-conf.py @@ -3,8 +3,6 @@ import difflib import getpass import logging -from pprint import pprint - import colorlog import requests import termcolor @@ -181,7 +179,6 @@ def gen_conf_re2o(re2o_config, header): mgmt_utils = re2o_config.get("switchs_management_utils") ipv4_managers = dict() for m in mgmt_utils.get("subnet"): - print(m) ipv4_managers[m.get("network")] = { "ip": m.get("network"), "subnet": m.get("netmask")} ipv6_managers = dict() # FUCK YOU ! subnet6 c'est pas une liste de subnets mais un seul subnet @@ -200,7 +197,6 @@ def gen_conf_re2o(re2o_config, header): for port in re2o_config.get("ports"): port_profile = port["get_port_profile"] for v in port_profile["vlan_tagged"]: - print(v) if v["vlan_id"] == vlan_id: range_tagged.append(port["port"]) # i n'y a qu'un seul vlan untagged @@ -284,12 +280,7 @@ def gen_conf_re2o(re2o_config, header): "loop_protect": loop_protect, "arp_protect": arp_protect, "interfaces": interfaces, - "FUCK": ['interfaces_subnet', 'ports', 'ipv6', 'ipv4', 'get_radius_key_value', 'interfaces6_subnet', 'list_modules'] } - pprint(re2o_config) -# pprint(re2o_config.get("interfaces_subnet")) -# pprint(re2o_config.get("list_modules")) -# raise RuntimeError() return conf_from_dict(config_dict) @@ -331,7 +322,6 @@ def get_switch_from_re2o(re2o_instance, switch_name, re2o_user): sw_config.update(r.json()) # on récupère la liste des vlans r = requests.get(base_url + "machines/vlan", headers=headers) - pprint(r.json().get("results")) sw_config.update({"vlans": r.json().get("results")}) return sw_config