Fin du TP2
This commit is contained in:
@@ -48,6 +48,23 @@ def create_vlan_config_cpe_paris():
|
||||
R3_config = render_network_config(template_name='vlan_router.j2', data=R3_data)
|
||||
return R3_config,esw3_config
|
||||
|
||||
def create_ospf_config_cpe_marseille():
|
||||
R1_data = load_json_data_from_file(file_path='data/ospf_R01.json')
|
||||
R1_config = render_network_config(template_name='config_ospf.j2', data=R1_data)
|
||||
|
||||
return R1_config
|
||||
|
||||
def create_ospf_config_cpe_paris():
|
||||
R2_data = load_json_data_from_file(file_path='data/ospf_R02.json')
|
||||
R2_config = render_network_config(template_name='config_ospf.j2', data=R2_data)
|
||||
|
||||
return R2_config
|
||||
|
||||
def create_ospf_config_cpe_lyon():
|
||||
R3_data = load_json_data_from_file(file_path='data/ospf_R03.json')
|
||||
R3_config = render_network_config(template_name='config_ospf.j2', data=R3_data)
|
||||
|
||||
return R3_config
|
||||
|
||||
if __name__ == "__main__":
|
||||
"""
|
||||
@@ -60,3 +77,12 @@ if __name__ == "__main__":
|
||||
r03_config, esw3_config = create_vlan_config_cpe_paris()
|
||||
save_built_config('config/vlan_R03.conf', r03_config)
|
||||
save_built_config('config/vlan_ESW3.conf', esw3_config)
|
||||
|
||||
R1_ospf_config = create_ospf_config_cpe_marseille()
|
||||
save_built_config('config/ospf_R1.conf', R1_ospf_config)
|
||||
R2_ospf_config = create_ospf_config_cpe_paris()
|
||||
save_built_config('config/ospf_R2.conf', R2_ospf_config)
|
||||
R3_ospf_config = create_ospf_config_cpe_lyon()
|
||||
save_built_config('config/ospf_R3.conf', R3_ospf_config)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user