From 698cb83e41596c4d44db6a543fd2400101489ead Mon Sep 17 00:00:00 2001 From: Marek Wolan Date: Wed, 3 Apr 2024 22:20:33 +0100 Subject: [PATCH] #2450 change link definition schema --- .../_package_data/data_manipulation.yaml | 40 +++++++++---------- .../_package_data/data_manipulation_marl.yaml | 40 +++++++++---------- src/primaite/game/game.py | 4 +- .../assets/configs/bad_primaite_session.yaml | 40 +++++++++---------- tests/assets/configs/basic_firewall.yaml | 16 ++++---- .../configs/basic_switched_network.yaml | 8 ++-- tests/assets/configs/dmz_network.yaml | 32 +++++++-------- .../configs/eval_only_primaite_session.yaml | 40 +++++++++---------- .../configs/firewall_actions_network.yaml | 32 +++++++-------- tests/assets/configs/multi_agent_session.yaml | 40 +++++++++---------- tests/assets/configs/shared_rewards.yaml | 40 +++++++++---------- .../configs/test_application_install.yaml | 40 +++++++++---------- .../assets/configs/test_primaite_session.yaml | 40 +++++++++---------- .../configs/train_only_primaite_session.yaml | 40 +++++++++---------- 14 files changed, 226 insertions(+), 226 deletions(-) diff --git a/src/primaite/config/_package_data/data_manipulation.yaml b/src/primaite/config/_package_data/data_manipulation.yaml index c68480cf..f2e8938b 100644 --- a/src/primaite/config/_package_data/data_manipulation.yaml +++ b/src/primaite/config/_package_data/data_manipulation.yaml @@ -925,43 +925,43 @@ simulation: type: DNSClient links: - - endpoint_a_ref: router_1 + - endpoint_a_hostname: router_1 endpoint_a_port: 1 - endpoint_b_ref: switch_1 + endpoint_b_hostname: switch_1 endpoint_b_port: 8 - - endpoint_a_ref: router_1 + - endpoint_a_hostname: router_1 endpoint_a_port: 2 - endpoint_b_ref: switch_2 + endpoint_b_hostname: switch_2 endpoint_b_port: 8 - - endpoint_a_ref: switch_1 + - endpoint_a_hostname: switch_1 endpoint_a_port: 1 - endpoint_b_ref: domain_controller + endpoint_b_hostname: domain_controller endpoint_b_port: 1 - - endpoint_a_ref: switch_1 + - endpoint_a_hostname: switch_1 endpoint_a_port: 2 - endpoint_b_ref: web_server + endpoint_b_hostname: web_server endpoint_b_port: 1 - - endpoint_a_ref: switch_1 + - endpoint_a_hostname: switch_1 endpoint_a_port: 3 - endpoint_b_ref: database_server + endpoint_b_hostname: database_server endpoint_b_port: 1 - - endpoint_a_ref: switch_1 + - endpoint_a_hostname: switch_1 endpoint_a_port: 4 - endpoint_b_ref: backup_server + endpoint_b_hostname: backup_server endpoint_b_port: 1 - - endpoint_a_ref: switch_1 + - endpoint_a_hostname: switch_1 endpoint_a_port: 7 - endpoint_b_ref: security_suite + endpoint_b_hostname: security_suite endpoint_b_port: 1 - - endpoint_a_ref: switch_2 + - endpoint_a_hostname: switch_2 endpoint_a_port: 1 - endpoint_b_ref: client_1 + endpoint_b_hostname: client_1 endpoint_b_port: 1 - - endpoint_a_ref: switch_2 + - endpoint_a_hostname: switch_2 endpoint_a_port: 2 - endpoint_b_ref: client_2 + endpoint_b_hostname: client_2 endpoint_b_port: 1 - - endpoint_a_ref: switch_2 + - endpoint_a_hostname: switch_2 endpoint_a_port: 7 - endpoint_b_ref: security_suite + endpoint_b_hostname: security_suite endpoint_b_port: 2 diff --git a/src/primaite/config/_package_data/data_manipulation_marl.yaml b/src/primaite/config/_package_data/data_manipulation_marl.yaml index 9ec2a1f2..ee9f094f 100644 --- a/src/primaite/config/_package_data/data_manipulation_marl.yaml +++ b/src/primaite/config/_package_data/data_manipulation_marl.yaml @@ -1505,43 +1505,43 @@ simulation: links: - - endpoint_a_ref: router_1 + - endpoint_a_hostname: router_1 endpoint_a_port: 1 - endpoint_b_ref: switch_1 + endpoint_b_hostname: switch_1 endpoint_b_port: 8 - - endpoint_a_ref: router_1 + - endpoint_a_hostname: router_1 endpoint_a_port: 2 - endpoint_b_ref: switch_2 + endpoint_b_hostname: switch_2 endpoint_b_port: 8 - - endpoint_a_ref: switch_1 + - endpoint_a_hostname: switch_1 endpoint_a_port: 1 - endpoint_b_ref: domain_controller + endpoint_b_hostname: domain_controller endpoint_b_port: 1 - - endpoint_a_ref: switch_1 + - endpoint_a_hostname: switch_1 endpoint_a_port: 2 - endpoint_b_ref: web_server + endpoint_b_hostname: web_server endpoint_b_port: 1 - - endpoint_a_ref: switch_1 + - endpoint_a_hostname: switch_1 endpoint_a_port: 3 - endpoint_b_ref: database_server + endpoint_b_hostname: database_server endpoint_b_port: 1 - - endpoint_a_ref: switch_1 + - endpoint_a_hostname: switch_1 endpoint_a_port: 4 - endpoint_b_ref: backup_server + endpoint_b_hostname: backup_server endpoint_b_port: 1 - - endpoint_a_ref: switch_1 + - endpoint_a_hostname: switch_1 endpoint_a_port: 7 - endpoint_b_ref: security_suite + endpoint_b_hostname: security_suite endpoint_b_port: 1 - - endpoint_a_ref: switch_2 + - endpoint_a_hostname: switch_2 endpoint_a_port: 1 - endpoint_b_ref: client_1 + endpoint_b_hostname: client_1 endpoint_b_port: 1 - - endpoint_a_ref: switch_2 + - endpoint_a_hostname: switch_2 endpoint_a_port: 2 - endpoint_b_ref: client_2 + endpoint_b_hostname: client_2 endpoint_b_port: 1 - - endpoint_a_ref: switch_2 + - endpoint_a_hostname: switch_2 endpoint_a_port: 7 - endpoint_b_ref: security_suite + endpoint_b_hostname: security_suite endpoint_b_port: 2 diff --git a/src/primaite/game/game.py b/src/primaite/game/game.py index 2d007193..bfbffc4d 100644 --- a/src/primaite/game/game.py +++ b/src/primaite/game/game.py @@ -396,8 +396,8 @@ class PrimaiteGame: # 2. create links between nodes for link_cfg in links_cfg: - node_a = net.get_node_by_hostname(link_cfg["endpoint_a_ref"]) - node_b = net.get_node_by_hostname(link_cfg["endpoint_b_ref"]) + node_a = net.get_node_by_hostname(link_cfg["endpoint_a_hostname"]) + node_b = net.get_node_by_hostname(link_cfg["endpoint_b_hostname"]) if isinstance(node_a, Switch): endpoint_a = node_a.network_interface[link_cfg["endpoint_a_port"]] else: diff --git a/tests/assets/configs/bad_primaite_session.yaml b/tests/assets/configs/bad_primaite_session.yaml index 19cad586..493b0452 100644 --- a/tests/assets/configs/bad_primaite_session.yaml +++ b/tests/assets/configs/bad_primaite_session.yaml @@ -687,43 +687,43 @@ simulation: type: DNSClient links: - - endpoint_a_ref: router_1 + - endpoint_a_hostname: router_1 endpoint_a_port: 1 - endpoint_b_ref: switch_1 + endpoint_b_hostname: switch_1 endpoint_b_port: 8 - - endpoint_a_ref: router_1 + - endpoint_a_hostname: router_1 endpoint_a_port: 2 - endpoint_b_ref: switch_2 + endpoint_b_hostname: switch_2 endpoint_b_port: 8 - - endpoint_a_ref: switch_1 + - endpoint_a_hostname: switch_1 endpoint_a_port: 1 - endpoint_b_ref: domain_controller + endpoint_b_hostname: domain_controller endpoint_b_port: 1 - - endpoint_a_ref: switch_1 + - endpoint_a_hostname: switch_1 endpoint_a_port: 2 - endpoint_b_ref: web_server + endpoint_b_hostname: web_server endpoint_b_port: 1 - - endpoint_a_ref: switch_1 + - endpoint_a_hostname: switch_1 endpoint_a_port: 3 - endpoint_b_ref: database_server + endpoint_b_hostname: database_server endpoint_b_port: 1 - - endpoint_a_ref: switch_1 + - endpoint_a_hostname: switch_1 endpoint_a_port: 4 - endpoint_b_ref: backup_server + endpoint_b_hostname: backup_server endpoint_b_port: 1 - - endpoint_a_ref: switch_1 + - endpoint_a_hostname: switch_1 endpoint_a_port: 7 - endpoint_b_ref: security_suite + endpoint_b_hostname: security_suite endpoint_b_port: 1 - - endpoint_a_ref: switch_2 + - endpoint_a_hostname: switch_2 endpoint_a_port: 1 - endpoint_b_ref: client_1 + endpoint_b_hostname: client_1 endpoint_b_port: 1 - - endpoint_a_ref: switch_2 + - endpoint_a_hostname: switch_2 endpoint_a_port: 2 - endpoint_b_ref: client_2 + endpoint_b_hostname: client_2 endpoint_b_port: 1 - - endpoint_a_ref: switch_2 + - endpoint_a_hostname: switch_2 endpoint_a_port: 7 - endpoint_b_ref: security_suite + endpoint_b_hostname: security_suite endpoint_b_port: 2 diff --git a/tests/assets/configs/basic_firewall.yaml b/tests/assets/configs/basic_firewall.yaml index da293167..3aa2ca2d 100644 --- a/tests/assets/configs/basic_firewall.yaml +++ b/tests/assets/configs/basic_firewall.yaml @@ -161,22 +161,22 @@ simulation: links: - ref: switch_1___client_1 - endpoint_a_ref: switch_1 + endpoint_a_hostname: switch_1 endpoint_a_port: 1 - endpoint_b_ref: client_1 + endpoint_b_hostname: client_1 endpoint_b_port: 1 - ref: switch_2___client_2 - endpoint_a_ref: switch_2 + endpoint_a_hostname: switch_2 endpoint_a_port: 1 - endpoint_b_ref: client_2 + endpoint_b_hostname: client_2 endpoint_b_port: 1 - ref: switch_1___firewall - endpoint_a_ref: switch_1 + endpoint_a_hostname: switch_1 endpoint_a_port: 2 - endpoint_b_ref: firewall + endpoint_b_hostname: firewall endpoint_b_port: 1 - ref: switch_2___firewall - endpoint_a_ref: switch_2 + endpoint_a_hostname: switch_2 endpoint_a_port: 2 - endpoint_b_ref: firewall + endpoint_b_hostname: firewall endpoint_b_port: 2 diff --git a/tests/assets/configs/basic_switched_network.yaml b/tests/assets/configs/basic_switched_network.yaml index 009f239a..ab55a6ed 100644 --- a/tests/assets/configs/basic_switched_network.yaml +++ b/tests/assets/configs/basic_switched_network.yaml @@ -162,11 +162,11 @@ simulation: # pre installed services and applications links: - - endpoint_a_ref: switch_1 + - endpoint_a_hostname: switch_1 endpoint_a_port: 1 - endpoint_b_ref: client_1 + endpoint_b_hostname: client_1 endpoint_b_port: 1 - - endpoint_a_ref: switch_1 + - endpoint_a_hostname: switch_1 endpoint_a_port: 2 - endpoint_b_ref: client_2 + endpoint_b_hostname: client_2 endpoint_b_port: 1 diff --git a/tests/assets/configs/dmz_network.yaml b/tests/assets/configs/dmz_network.yaml index acac301a..0930bc7d 100644 --- a/tests/assets/configs/dmz_network.yaml +++ b/tests/assets/configs/dmz_network.yaml @@ -267,42 +267,42 @@ simulation: type: DNSServer links: - ref: client_1___switch_1 - endpoint_a_ref: client_1 + endpoint_a_hostname: client_1 endpoint_a_port: 1 - endpoint_b_ref: switch_1 + endpoint_b_hostname: switch_1 endpoint_b_port: 1 - ref: router_1___switch_1 - endpoint_a_ref: router_1 + endpoint_a_hostname: router_1 endpoint_a_port: 1 - endpoint_b_ref: switch_1 + endpoint_b_hostname: switch_1 endpoint_b_port: 8 - ref: router_1___firewall - endpoint_a_ref: firewall + endpoint_a_hostname: firewall endpoint_a_port: 2 # internal firewall port - endpoint_b_ref: router_1 + endpoint_b_hostname: router_1 endpoint_b_port: 2 - ref: firewall___switch_2 - endpoint_a_ref: firewall + endpoint_a_hostname: firewall endpoint_a_port: 3 # dmz firewall port - endpoint_b_ref: switch_2 + endpoint_b_hostname: switch_2 endpoint_b_port: 8 - ref: dmz_server___switch_2 - endpoint_a_ref: dmz_server + endpoint_a_hostname: dmz_server endpoint_a_port: 1 - endpoint_b_ref: switch_2 + endpoint_b_hostname: switch_2 endpoint_b_port: 1 - ref: firewall___switch_3 - endpoint_a_ref: firewall + endpoint_a_hostname: firewall endpoint_a_port: 1 # external firewall port - endpoint_b_ref: switch_3 + endpoint_b_hostname: switch_3 endpoint_b_port: 8 - ref: external_computer___switch_3 - endpoint_a_ref: external_computer + endpoint_a_hostname: external_computer endpoint_a_port: 1 - endpoint_b_ref: switch_3 + endpoint_b_hostname: switch_3 endpoint_b_port: 1 - ref: external_server___switch_3 - endpoint_a_ref: external_server + endpoint_a_hostname: external_server endpoint_a_port: 1 - endpoint_b_ref: switch_3 + endpoint_b_hostname: switch_3 endpoint_b_port: 2 diff --git a/tests/assets/configs/eval_only_primaite_session.yaml b/tests/assets/configs/eval_only_primaite_session.yaml index c342ed72..918f00ca 100644 --- a/tests/assets/configs/eval_only_primaite_session.yaml +++ b/tests/assets/configs/eval_only_primaite_session.yaml @@ -703,43 +703,43 @@ simulation: type: DNSClient links: - - endpoint_a_ref: router_1 + - endpoint_a_hostname: router_1 endpoint_a_port: 1 - endpoint_b_ref: switch_1 + endpoint_b_hostname: switch_1 endpoint_b_port: 8 - - endpoint_a_ref: router_1 + - endpoint_a_hostname: router_1 endpoint_a_port: 2 - endpoint_b_ref: switch_2 + endpoint_b_hostname: switch_2 endpoint_b_port: 8 - - endpoint_a_ref: switch_1 + - endpoint_a_hostname: switch_1 endpoint_a_port: 1 - endpoint_b_ref: domain_controller + endpoint_b_hostname: domain_controller endpoint_b_port: 1 - - endpoint_a_ref: switch_1 + - endpoint_a_hostname: switch_1 endpoint_a_port: 2 - endpoint_b_ref: web_server + endpoint_b_hostname: web_server endpoint_b_port: 1 - - endpoint_a_ref: switch_1 + - endpoint_a_hostname: switch_1 endpoint_a_port: 3 - endpoint_b_ref: database_server + endpoint_b_hostname: database_server endpoint_b_port: 1 - - endpoint_a_ref: switch_1 + - endpoint_a_hostname: switch_1 endpoint_a_port: 4 - endpoint_b_ref: backup_server + endpoint_b_hostname: backup_server endpoint_b_port: 1 - - endpoint_a_ref: switch_1 + - endpoint_a_hostname: switch_1 endpoint_a_port: 7 - endpoint_b_ref: security_suite + endpoint_b_hostname: security_suite endpoint_b_port: 1 - - endpoint_a_ref: switch_2 + - endpoint_a_hostname: switch_2 endpoint_a_port: 1 - endpoint_b_ref: client_1 + endpoint_b_hostname: client_1 endpoint_b_port: 1 - - endpoint_a_ref: switch_2 + - endpoint_a_hostname: switch_2 endpoint_a_port: 2 - endpoint_b_ref: client_2 + endpoint_b_hostname: client_2 endpoint_b_port: 1 - - endpoint_a_ref: switch_2 + - endpoint_a_hostname: switch_2 endpoint_a_port: 7 - endpoint_b_ref: security_suite + endpoint_b_hostname: security_suite endpoint_b_port: 2 diff --git a/tests/assets/configs/firewall_actions_network.yaml b/tests/assets/configs/firewall_actions_network.yaml index cf10505e..4e134fe6 100644 --- a/tests/assets/configs/firewall_actions_network.yaml +++ b/tests/assets/configs/firewall_actions_network.yaml @@ -461,42 +461,42 @@ simulation: type: DNSServer links: - ref: client_1___switch_1 - endpoint_a_ref: client_1 + endpoint_a_hostname: client_1 endpoint_a_port: 1 - endpoint_b_ref: switch_1 + endpoint_b_hostname: switch_1 endpoint_b_port: 1 - ref: router_1___switch_1 - endpoint_a_ref: router_1 + endpoint_a_hostname: router_1 endpoint_a_port: 1 - endpoint_b_ref: switch_1 + endpoint_b_hostname: switch_1 endpoint_b_port: 8 - ref: router_1___firewall - endpoint_a_ref: firewall + endpoint_a_hostname: firewall endpoint_a_port: 2 # internal firewall port - endpoint_b_ref: router_1 + endpoint_b_hostname: router_1 endpoint_b_port: 2 - ref: firewall___switch_2 - endpoint_a_ref: firewall + endpoint_a_hostname: firewall endpoint_a_port: 3 # dmz firewall port - endpoint_b_ref: switch_2 + endpoint_b_hostname: switch_2 endpoint_b_port: 8 - ref: dmz_server___switch_2 - endpoint_a_ref: dmz_server + endpoint_a_hostname: dmz_server endpoint_a_port: 1 - endpoint_b_ref: switch_2 + endpoint_b_hostname: switch_2 endpoint_b_port: 1 - ref: firewall___switch_3 - endpoint_a_ref: firewall + endpoint_a_hostname: firewall endpoint_a_port: 1 # external firewall port - endpoint_b_ref: switch_3 + endpoint_b_hostname: switch_3 endpoint_b_port: 8 - ref: external_computer___switch_3 - endpoint_a_ref: external_computer + endpoint_a_hostname: external_computer endpoint_a_port: 1 - endpoint_b_ref: switch_3 + endpoint_b_hostname: switch_3 endpoint_b_port: 1 - ref: external_server___switch_3 - endpoint_a_ref: external_server + endpoint_a_hostname: external_server endpoint_a_port: 1 - endpoint_b_ref: switch_3 + endpoint_b_hostname: switch_3 endpoint_b_port: 2 diff --git a/tests/assets/configs/multi_agent_session.yaml b/tests/assets/configs/multi_agent_session.yaml index 35431064..e4342582 100644 --- a/tests/assets/configs/multi_agent_session.yaml +++ b/tests/assets/configs/multi_agent_session.yaml @@ -1162,43 +1162,43 @@ simulation: type: DNSClient links: - - endpoint_a_ref: router_1 + - endpoint_a_hostname: router_1 endpoint_a_port: 1 - endpoint_b_ref: switch_1 + endpoint_b_hostname: switch_1 endpoint_b_port: 8 - - endpoint_a_ref: router_1 + - endpoint_a_hostname: router_1 endpoint_a_port: 2 - endpoint_b_ref: switch_2 + endpoint_b_hostname: switch_2 endpoint_b_port: 8 - - endpoint_a_ref: switch_1 + - endpoint_a_hostname: switch_1 endpoint_a_port: 1 - endpoint_b_ref: domain_controller + endpoint_b_hostname: domain_controller endpoint_b_port: 1 - - endpoint_a_ref: switch_1 + - endpoint_a_hostname: switch_1 endpoint_a_port: 2 - endpoint_b_ref: web_server + endpoint_b_hostname: web_server endpoint_b_port: 1 - - endpoint_a_ref: switch_1 + - endpoint_a_hostname: switch_1 endpoint_a_port: 3 - endpoint_b_ref: database_server + endpoint_b_hostname: database_server endpoint_b_port: 1 - - endpoint_a_ref: switch_1 + - endpoint_a_hostname: switch_1 endpoint_a_port: 4 - endpoint_b_ref: backup_server + endpoint_b_hostname: backup_server endpoint_b_port: 1 - - endpoint_a_ref: switch_1 + - endpoint_a_hostname: switch_1 endpoint_a_port: 7 - endpoint_b_ref: security_suite + endpoint_b_hostname: security_suite endpoint_b_port: 1 - - endpoint_a_ref: switch_2 + - endpoint_a_hostname: switch_2 endpoint_a_port: 1 - endpoint_b_ref: client_1 + endpoint_b_hostname: client_1 endpoint_b_port: 1 - - endpoint_a_ref: switch_2 + - endpoint_a_hostname: switch_2 endpoint_a_port: 2 - endpoint_b_ref: client_2 + endpoint_b_hostname: client_2 endpoint_b_port: 1 - - endpoint_a_ref: switch_2 + - endpoint_a_hostname: switch_2 endpoint_a_port: 7 - endpoint_b_ref: security_suite + endpoint_b_hostname: security_suite endpoint_b_port: 2 diff --git a/tests/assets/configs/shared_rewards.yaml b/tests/assets/configs/shared_rewards.yaml index 9cf4d17d..7df6802c 100644 --- a/tests/assets/configs/shared_rewards.yaml +++ b/tests/assets/configs/shared_rewards.yaml @@ -921,43 +921,43 @@ simulation: links: - - endpoint_a_ref: router_1 + - endpoint_a_hostname: router_1 endpoint_a_port: 1 - endpoint_b_ref: switch_1 + endpoint_b_hostname: switch_1 endpoint_b_port: 8 - - endpoint_a_ref: router_1 + - endpoint_a_hostname: router_1 endpoint_a_port: 2 - endpoint_b_ref: switch_2 + endpoint_b_hostname: switch_2 endpoint_b_port: 8 - - endpoint_a_ref: switch_1 + - endpoint_a_hostname: switch_1 endpoint_a_port: 1 - endpoint_b_ref: domain_controller + endpoint_b_hostname: domain_controller endpoint_b_port: 1 - - endpoint_a_ref: switch_1 + - endpoint_a_hostname: switch_1 endpoint_a_port: 2 - endpoint_b_ref: web_server + endpoint_b_hostname: web_server endpoint_b_port: 1 - - endpoint_a_ref: switch_1 + - endpoint_a_hostname: switch_1 endpoint_a_port: 3 - endpoint_b_ref: database_server + endpoint_b_hostname: database_server endpoint_b_port: 1 - - endpoint_a_ref: switch_1 + - endpoint_a_hostname: switch_1 endpoint_a_port: 4 - endpoint_b_ref: backup_server + endpoint_b_hostname: backup_server endpoint_b_port: 1 - - endpoint_a_ref: switch_1 + - endpoint_a_hostname: switch_1 endpoint_a_port: 7 - endpoint_b_ref: security_suite + endpoint_b_hostname: security_suite endpoint_b_port: 1 - - endpoint_a_ref: switch_2 + - endpoint_a_hostname: switch_2 endpoint_a_port: 1 - endpoint_b_ref: client_1 + endpoint_b_hostname: client_1 endpoint_b_port: 1 - - endpoint_a_ref: switch_2 + - endpoint_a_hostname: switch_2 endpoint_a_port: 2 - endpoint_b_ref: client_2 + endpoint_b_hostname: client_2 endpoint_b_port: 1 - - endpoint_a_ref: switch_2 + - endpoint_a_hostname: switch_2 endpoint_a_port: 7 - endpoint_b_ref: security_suite + endpoint_b_hostname: security_suite endpoint_b_port: 2 diff --git a/tests/assets/configs/test_application_install.yaml b/tests/assets/configs/test_application_install.yaml index d2e85f30..a2059913 100644 --- a/tests/assets/configs/test_application_install.yaml +++ b/tests/assets/configs/test_application_install.yaml @@ -953,43 +953,43 @@ simulation: links: - - endpoint_a_ref: router_1 + - endpoint_a_hostname: router_1 endpoint_a_port: 1 - endpoint_b_ref: switch_1 + endpoint_b_hostname: switch_1 endpoint_b_port: 8 - - endpoint_a_ref: router_1 + - endpoint_a_hostname: router_1 endpoint_a_port: 2 - endpoint_b_ref: switch_2 + endpoint_b_hostname: switch_2 endpoint_b_port: 8 - - endpoint_a_ref: switch_1 + - endpoint_a_hostname: switch_1 endpoint_a_port: 1 - endpoint_b_ref: domain_controller + endpoint_b_hostname: domain_controller endpoint_b_port: 1 - - endpoint_a_ref: switch_1 + - endpoint_a_hostname: switch_1 endpoint_a_port: 2 - endpoint_b_ref: web_server + endpoint_b_hostname: web_server endpoint_b_port: 1 - - endpoint_a_ref: switch_1 + - endpoint_a_hostname: switch_1 endpoint_a_port: 3 - endpoint_b_ref: database_server + endpoint_b_hostname: database_server endpoint_b_port: 1 - - endpoint_a_ref: switch_1 + - endpoint_a_hostname: switch_1 endpoint_a_port: 4 - endpoint_b_ref: backup_server + endpoint_b_hostname: backup_server endpoint_b_port: 1 - - endpoint_a_ref: switch_1 + - endpoint_a_hostname: switch_1 endpoint_a_port: 7 - endpoint_b_ref: security_suite + endpoint_b_hostname: security_suite endpoint_b_port: 1 - - endpoint_a_ref: switch_2 + - endpoint_a_hostname: switch_2 endpoint_a_port: 1 - endpoint_b_ref: client_1 + endpoint_b_hostname: client_1 endpoint_b_port: 1 - - endpoint_a_ref: switch_2 + - endpoint_a_hostname: switch_2 endpoint_a_port: 2 - endpoint_b_ref: client_2 + endpoint_b_hostname: client_2 endpoint_b_port: 1 - - endpoint_a_ref: switch_2 + - endpoint_a_hostname: switch_2 endpoint_a_port: 7 - endpoint_b_ref: security_suite + endpoint_b_hostname: security_suite endpoint_b_port: 2 diff --git a/tests/assets/configs/test_primaite_session.yaml b/tests/assets/configs/test_primaite_session.yaml index 1fd489ec..fc72cfd7 100644 --- a/tests/assets/configs/test_primaite_session.yaml +++ b/tests/assets/configs/test_primaite_session.yaml @@ -743,43 +743,43 @@ simulation: protocol: ICMP links: - - endpoint_a_ref: router_1 + - endpoint_a_hostname: router_1 endpoint_a_port: 1 - endpoint_b_ref: switch_1 + endpoint_b_hostname: switch_1 endpoint_b_port: 8 - - endpoint_a_ref: router_1 + - endpoint_a_hostname: router_1 endpoint_a_port: 2 - endpoint_b_ref: switch_2 + endpoint_b_hostname: switch_2 endpoint_b_port: 8 - - endpoint_a_ref: switch_1 + - endpoint_a_hostname: switch_1 endpoint_a_port: 1 - endpoint_b_ref: domain_controller + endpoint_b_hostname: domain_controller endpoint_b_port: 1 - - endpoint_a_ref: switch_1 + - endpoint_a_hostname: switch_1 endpoint_a_port: 2 - endpoint_b_ref: web_server + endpoint_b_hostname: web_server endpoint_b_port: 1 - - endpoint_a_ref: switch_1 + - endpoint_a_hostname: switch_1 endpoint_a_port: 3 - endpoint_b_ref: database_server + endpoint_b_hostname: database_server endpoint_b_port: 1 - - endpoint_a_ref: switch_1 + - endpoint_a_hostname: switch_1 endpoint_a_port: 4 - endpoint_b_ref: backup_server + endpoint_b_hostname: backup_server endpoint_b_port: 1 - - endpoint_a_ref: switch_1 + - endpoint_a_hostname: switch_1 endpoint_a_port: 7 - endpoint_b_ref: security_suite + endpoint_b_hostname: security_suite endpoint_b_port: 1 - - endpoint_a_ref: switch_2 + - endpoint_a_hostname: switch_2 endpoint_a_port: 1 - endpoint_b_ref: client_1 + endpoint_b_hostname: client_1 endpoint_b_port: 1 - - endpoint_a_ref: switch_2 + - endpoint_a_hostname: switch_2 endpoint_a_port: 2 - endpoint_b_ref: client_2 + endpoint_b_hostname: client_2 endpoint_b_port: 1 - - endpoint_a_ref: switch_2 + - endpoint_a_hostname: switch_2 endpoint_a_port: 7 - endpoint_b_ref: security_suite + endpoint_b_hostname: security_suite endpoint_b_port: 2 diff --git a/tests/assets/configs/train_only_primaite_session.yaml b/tests/assets/configs/train_only_primaite_session.yaml index ca26fc62..b083505e 100644 --- a/tests/assets/configs/train_only_primaite_session.yaml +++ b/tests/assets/configs/train_only_primaite_session.yaml @@ -710,43 +710,43 @@ simulation: type: DNSClient links: - - endpoint_a_ref: router_1 + - endpoint_a_hostname: router_1 endpoint_a_port: 1 - endpoint_b_ref: switch_1 + endpoint_b_hostname: switch_1 endpoint_b_port: 8 - - endpoint_a_ref: router_1 + - endpoint_a_hostname: router_1 endpoint_a_port: 2 - endpoint_b_ref: switch_2 + endpoint_b_hostname: switch_2 endpoint_b_port: 8 - - endpoint_a_ref: switch_1 + - endpoint_a_hostname: switch_1 endpoint_a_port: 1 - endpoint_b_ref: domain_controller + endpoint_b_hostname: domain_controller endpoint_b_port: 1 - - endpoint_a_ref: switch_1 + - endpoint_a_hostname: switch_1 endpoint_a_port: 2 - endpoint_b_ref: web_server + endpoint_b_hostname: web_server endpoint_b_port: 1 - - endpoint_a_ref: switch_1 + - endpoint_a_hostname: switch_1 endpoint_a_port: 3 - endpoint_b_ref: database_server + endpoint_b_hostname: database_server endpoint_b_port: 1 - - endpoint_a_ref: switch_1 + - endpoint_a_hostname: switch_1 endpoint_a_port: 4 - endpoint_b_ref: backup_server + endpoint_b_hostname: backup_server endpoint_b_port: 1 - - endpoint_a_ref: switch_1 + - endpoint_a_hostname: switch_1 endpoint_a_port: 7 - endpoint_b_ref: security_suite + endpoint_b_hostname: security_suite endpoint_b_port: 1 - - endpoint_a_ref: switch_2 + - endpoint_a_hostname: switch_2 endpoint_a_port: 1 - endpoint_b_ref: client_1 + endpoint_b_hostname: client_1 endpoint_b_port: 1 - - endpoint_a_ref: switch_2 + - endpoint_a_hostname: switch_2 endpoint_a_port: 2 - endpoint_b_ref: client_2 + endpoint_b_hostname: client_2 endpoint_b_port: 1 - - endpoint_a_ref: switch_2 + - endpoint_a_hostname: switch_2 endpoint_a_port: 7 - endpoint_b_ref: security_suite + endpoint_b_hostname: security_suite endpoint_b_port: 2