#2706 - Updates to terminal and host_node documentation, removal of redundant terminal unit test
This commit is contained in:
@@ -49,3 +49,5 @@ fundamental network operations:
|
|||||||
5. **NTP (Network Time Protocol) Client:** Synchronises the host's clock with network time servers.
|
5. **NTP (Network Time Protocol) Client:** Synchronises the host's clock with network time servers.
|
||||||
|
|
||||||
6. **Web Browser:** A simulated application that allows the host to request and display web content.
|
6. **Web Browser:** A simulated application that allows the host to request and display web content.
|
||||||
|
|
||||||
|
7. **Terminal:** A simulated service that allows the host to connect to remote hosts and execute commands.
|
||||||
|
|||||||
@@ -41,6 +41,7 @@ to provide User Credential authentication when receiving/processing commands.
|
|||||||
Terminal acts as the interface between the user/component and both the Session and Requests Managers, facilitating
|
Terminal acts as the interface between the user/component and both the Session and Requests Managers, facilitating
|
||||||
the passing of requests to both.
|
the passing of requests to both.
|
||||||
|
|
||||||
|
A more detailed example of how to use the Terminal class can be found in the Terminal-Processing jupyter notebook.
|
||||||
|
|
||||||
Python
|
Python
|
||||||
""""""
|
""""""
|
||||||
|
|||||||
@@ -278,22 +278,3 @@ def test_network_simulation(basic_network):
|
|||||||
terminal_1: Terminal = client_1.software_manager.software.get("Terminal")
|
terminal_1: Terminal = client_1.software_manager.software.get("Terminal")
|
||||||
|
|
||||||
assert terminal_1.login(username="admin", password="Admin123!", ip_address="10.0.2.2") is False
|
assert terminal_1.login(username="admin", password="Admin123!", ip_address="10.0.2.2") is False
|
||||||
|
|
||||||
|
|
||||||
def test_terminal_receives_requests(game_and_agent_fixture: Tuple[PrimaiteGame, ProxyAgent]):
|
|
||||||
game, agent = game_and_agent_fixture
|
|
||||||
|
|
||||||
network: Network = game.simulation.network
|
|
||||||
computer_a: Computer = network.get_node_by_hostname("client_1")
|
|
||||||
terminal_a: Terminal = computer_a.software_manager.software.get("Terminal")
|
|
||||||
|
|
||||||
computer_b: Computer = network.get_node_by_hostname("client_2")
|
|
||||||
|
|
||||||
assert terminal_a.is_connected is False
|
|
||||||
|
|
||||||
action = ("TERMINAL_LOGIN", {"username": "admin", "password": "Admin123!"})
|
|
||||||
|
|
||||||
agent.store_action(action)
|
|
||||||
game.step()
|
|
||||||
|
|
||||||
assert terminal_a.is_connected is True
|
|
||||||
|
|||||||
Reference in New Issue
Block a user