diff --git a/include/fastdds/rtps/attributes/BuiltinTransports.hpp b/include/fastdds/rtps/attributes/BuiltinTransports.hpp index 7e8e9087c8c..6921c5482fc 100644 --- a/include/fastdds/rtps/attributes/BuiltinTransports.hpp +++ b/include/fastdds/rtps/attributes/BuiltinTransports.hpp @@ -112,7 +112,7 @@ enum class BuiltinTransports : uint16_t UDPv6 = 5, //< Instantiate UDPv6 transport only LARGE_DATA = 6, //< Instantiate SHM, UDPv4 and TCPv4 transports, but UDPv4 is only used for bootstrapping discovery LARGE_DATAv6 = 7, //< Instantiate SHM, UDPv6 and TCPv6 transports, but UDPv6 is only used for bootstrapping discovery - P2P = 8 //< Instantiate SHM, UDPv4 and TCPv4 transports, shall only be used along with EASY_MODE= + P2P = 8 //< Instantiate SHM, UDPv4 (unicast) and TCPv4 transports, shall only be used along with EASY_MODE= }; inline std::ostream& operator <<( diff --git a/test/system/tools/fastdds/test_discovery_parser.py b/test/system/tools/fastdds/test_discovery_parser.py index 7fd7cb073c3..33efa58a335 100644 --- a/test/system/tools/fastdds/test_discovery_parser.py +++ b/test/system/tools/fastdds/test_discovery_parser.py @@ -45,7 +45,7 @@ def side_effect_rpc(self, *args, **kwargs): assert(third_attr == self.third_attr) for i in range(len(self.check_command)): assert(used_cmd[i] == self.check_command[i]) - return args + return 'Mocked request' def set_env_values(self, env_var_name, value): os.environ[env_var_name] = value diff --git a/test/system/tools/fds/tests.py b/test/system/tools/fds/tests.py index f9d6037cfa4..ec48009d793 100644 --- a/test/system/tools/fds/tests.py +++ b/test/system/tools/fds/tests.py @@ -248,7 +248,7 @@ def test_fast_discovery_parse_XML_file_default_profile(fast_discovery_tool): output, err, exit_code = send_command(command) - EXPECTED_SERVER_ID = "Server (" + PREFIX.lower() + ")" + EXPECTED_SERVER_ID = "GUID prefix: " + PREFIX.lower() print(EXPECTED_SERVER_ID) exit_code = check_output(output, err, EXPECTED_SERVER_ID, False, False) @@ -285,7 +285,7 @@ def test_fast_discovery_parse_XML_file_URI_profile(fast_discovery_tool): output, err, exit_code = send_command(command) - EXPECTED_SERVER_ID = "Server (" + PREFIX.lower() + ")" + EXPECTED_SERVER_ID = "GUID prefix: " + PREFIX.lower() print(EXPECTED_SERVER_ID) exit_code = check_output(output, err, EXPECTED_SERVER_ID, False, False) @@ -305,7 +305,7 @@ def test_fast_discovery_prefix_override(fast_discovery_tool): XML_file_path = 'test_xml_discovery_server_profile.xml' default_profile = XML_parse_profile(XML_file_path, "") - EXPECTED_SERVER_ID = "Server (44.53.00.5f.45.50.52.4f.53.49.4d.41)" + EXPECTED_SERVER_ID = "GUID prefix: 44.53.00.5f.45.50.52.4f.53.49.4d.41" EXPECTED_SERVER_ADDRESS = [] udpv4 = default_profile.getElementsByTagName('udpv4') for elem in udpv4: @@ -338,7 +338,7 @@ def test_fast_discovery_locator_address_override(fast_discovery_tool): prefix = default_profile.getElementsByTagName('prefix') PREFIX = prefix[0].firstChild.data - EXPECTED_SERVER_ID = "Server (" + PREFIX.lower() + ")" + EXPECTED_SERVER_ID = "GUID prefix: " + PREFIX.lower() EXPECTED_SERVER_ADDRESS = [] EXPECTED_SERVER_ADDRESS.append("UDPv4:[172.168.43.125]:11811") XML_SERVER_ADDRESS = [] @@ -377,7 +377,7 @@ def test_fast_discovery_locator_override_same_address(fast_discovery_tool): prefix = default_profile.getElementsByTagName('prefix') PREFIX = prefix[0].firstChild.data - EXPECTED_SERVER_ID = "Server (" + PREFIX.lower() + ")" + EXPECTED_SERVER_ID = "GUID prefix: " + PREFIX.lower() EXPECTED_SERVER_ADDRESS = [] EXPECTED_SERVER_ADDRESS.append("UDPv4:[127.0.0.9]:11811") XML_SERVER_ADDRESS = [] @@ -416,7 +416,7 @@ def test_fast_discovery_locator_port_override(fast_discovery_tool): prefix = default_profile.getElementsByTagName('prefix') PREFIX = prefix[0].firstChild.data - EXPECTED_SERVER_ID = "Server (" + PREFIX.lower() + ")" + EXPECTED_SERVER_ID = "GUID prefix: " + PREFIX.lower() EXPECTED_SERVER_ADDRESS = [] EXPECTED_SERVER_ADDRESS.append("UDPv4:[0.0.0.0]:1234") XML_SERVER_ADDRESS = [] @@ -455,7 +455,7 @@ def test_fast_discovery_locator_override_same_port(fast_discovery_tool): prefix = default_profile.getElementsByTagName('prefix') PREFIX = prefix[0].firstChild.data - EXPECTED_SERVER_ID = "Server (" + PREFIX.lower() + ")" + EXPECTED_SERVER_ID = "GUID prefix: " + PREFIX.lower() EXPECTED_SERVER_ADDRESS = [] EXPECTED_SERVER_ADDRESS.append("UDPv4:[0.0.0.0]:2811") XML_SERVER_ADDRESS = [] @@ -490,7 +490,7 @@ def test_fast_discovery_backup(fast_discovery_tool): """Test that launches a BACKUP using CLI and XML""" XML_file_path = "test_xml_discovery_server_profile.xml" - EXPECTED_BACKUP_ID = "Server (BACKUP) (44.53.00.5f.45.50.52.4f.53.49.4d.41)" + EXPECTED_BACKUP_ID = "#### Backup Server started ####" EXPECTED_SERVER_ADDRESS = [] EXPECTED_SERVER_ADDRESS.append("UDPv4:[0.0.0.0]:11811") @@ -505,7 +505,7 @@ def test_fast_discovery_backup(fast_discovery_tool): if exit_code != 0: sys.exit(exit_code) - EXPECTED_XML_BACKUP_ID = "Server (BACKUP) (44.53.33.5f.45.50.52.4f.53.49.4d.41)" + EXPECTED_XML_BACKUP_ID = "GUID Prefix: 44.53.33.5f.45.50.52.4f.53.49.4d.41" EXPECTED_XML_SERVER_ADDRESS = [] EXPECTED_XML_SERVER_ADDRESS.append("UDPv4:[127.0.0.105]:11825") diff --git a/tools/fds/CliDiscoveryManager.cpp b/tools/fds/CliDiscoveryManager.cpp index 1bbaae3e3ac..77a9e93e483 100644 --- a/tools/fds/CliDiscoveryManager.cpp +++ b/tools/fds/CliDiscoveryManager.cpp @@ -495,7 +495,6 @@ bool CliDiscoveryManager::add_udp_servers() { EPROSIMA_LOG_WARNING(CLI, "The number of specified ports doesn't match the ip addresses provided. Locators might share their port number."); - std::cout << "Where is the warning" << std::endl; } auto it_p = udp_ports_.begin(); auto it_i = udp_ips_.begin(); @@ -878,15 +877,22 @@ int CliDiscoveryManager::fastdds_discovery_server( #endif // ifndef _WIN32 // Print running server attributes - std::cout << "Server ("; + std::cout << "#### "; if (serverQos.wire_protocol().builtin.discovery_config.discoveryProtocol == DiscoveryProtocol::BACKUP) { - std::cout << "BACKUP) ("; + std::cout << "Backup "; } - std::cout << pServer->guid().guidPrefix << ") is running on:" << std::endl; - for (const Locator_t& locator : serverQos.wire_protocol().builtin.metatrafficUnicastLocatorList) + std::cout << "Server started ####" << std::endl; + std::cout << " GUID prefix: " << pServer->guid().guidPrefix << std::endl; + std::cout << " Running on: "; + for (auto locator_it = serverQos.wire_protocol().builtin.metatrafficUnicastLocatorList.begin(); + locator_it != serverQos.wire_protocol().builtin.metatrafficUnicastLocatorList.end();) { - std::cout << " - " << locator << std::endl; + std::cout << *locator_it; + if (++locator_it != serverQos.wire_protocol().builtin.metatrafficUnicastLocatorList.end()) + { + std::cout << std::endl << " "; + } } std::cout << std::endl;