Commit cab6edd8 authored by Hamza Dely's avatar Hamza Dely

Ajout de la configuration des 2920

parent affec65d
......@@ -11,9 +11,10 @@ hp_procurve_map = {
"J9085" : ("R.11.119", "HP 2610"),
"J9088" : ("R.11.119", "HP 2610"),
"J9021" : ("N.11.75", "HP 2810"),
"J9727" : ("WB.15.15.0012", "HP 2920"),
}
all_models = [
"HP 2530", "HP 2626", "HP 2650", "HP 2620",
"HP 2910 al", "HP 2610", "HP 2810",
"HP 2910 al", "HP 2610", "HP 2810", "HP 2920",
]
......@@ -38,6 +38,11 @@ ip default-gateway {{ gateway }}
no ip default-gateway
{%- endif %}
max-vlans 50
{%- if oobm %}
oobm
no ip address
exit
{%- endif %}
{%- for vlan in vlans %}
vlan {{ vlan.id }}
name "{{ vlan.name|capitalize }}"
......@@ -81,7 +86,9 @@ aaa port-access mac-based addr-format multi-colon
{%- endif %}
;--- Bricoles ---
no cdp run
{%- if not stack_new %}
no stack
{%- endif %}
;--- DHCP Snooping ---
{%- if dhcp_snooping_vlan_names %}
dhcp-snooping vlan {% for vlanid in dhcp_snooping_vlan_names|vlan_id %}{{vlanid }} {% endfor %}
......
......@@ -32,7 +32,7 @@ import gestion.config as config
import lc_ldap.objets as ldap_classes
import gestion.config.encoding as enc
GIGABIT_MODELS = ['J9021A', 'J9145A']
GIGABIT_MODELS = ['J9021A', 'J9145A', 'J9727A']
MIB_PRISE_VLAN = 'SNMPv2-SMI::enterprises.11.2.14.11.5.1.7.1.15.3.1.1'
MIB_PRISE_MAC = 'SNMPv2-SMI::enterprises.11.2.14.11.5.1.9.4.2'
......@@ -527,6 +527,8 @@ def conf_switch(hostname):
imodel = data['config_header'].split(' ', 2)[1]
if imodel == "J9145A":
data['module_type'] = 'module 1 type J9145A'
if imodel == "J9727A":
data['module_type'] = 'module 1 type J9727A'
# Pas de snooping pour les 2810
if "J9021" in imodel:
......@@ -556,7 +558,7 @@ def conf_switch(hostname):
data['subnet'] = '255.255.248.0'
# Ra gards ne concerne que les 2620
if "J9626" in imodel or "J9623" in imodel:
if "J9626" in imodel or "J9623" in imodel or "J9727" in imodel:
data['ra_filter'] = True
else:
data['ra_filter'] = False
......@@ -571,6 +573,14 @@ def conf_switch(hostname):
if imodel in GIGABIT_MODELS:
data['gigabit'] = True
# Sur les 2920, le stacking semble être désactivé par défaut
if imodel in ["J9727A"]:
data['stack_new'] = True
# Sur les 2920, l'interface OOBM doit être configurée manuellement
if imodel in ["J9727A"]:
data['oobm'] = True
# Build ports !
ports_list = PortList(get_port_dict(switch).itervalues())
data['ports'] = ports_list
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment