Fin du TP2

This commit is contained in:
2025-11-14 21:30:34 +01:00
parent 72a79ee83f
commit adc251afe6
25 changed files with 819 additions and 38 deletions

View File

@@ -15,8 +15,12 @@ def save_built_config(file_name, data):
def create_config_cpe_lyon_batA():
pass
esw3_data = load_json_data_from_file(file_path='data/vlan_ESW3.json')
esw3_config = render_network_config(template_name='vlan_switch.j2', data=esw3_data)
R3_data = load_json_data_from_file(file_path='data/vlan_R03.json')
R3_config = render_network_config(template_name='vlan_router.j2', data=R3_data)
return R3_config,esw3_config
def create_config_cpe_lyon_batB():
pass

View File

@@ -43,10 +43,12 @@ def question_26(nr):
pass
def question_27(nr):
pass
result = nr.run(task=hello_world)
print(type(result))
def question_29(nr):
pass
result = nr.run(task=hello_world)
print_result(result)
def question_30(nr):
pass
@@ -83,7 +85,7 @@ def question_40(nr):
if __name__ == "__main__":
#nr = InitNornir(config_file="inventory/config.yaml")
nr = InitNornir(config_file="inventory/config.yaml")
#question_13(nr)
#question_14(nr)
@@ -99,7 +101,7 @@ if __name__ == "__main__":
#question_24(nr)
#question_25(nr)
#question_26(nr)
#question_27(nr)
question_27(nr)
#question_29(nr)
#question_30(nr)