Connecting from a Terminal
One can connect to the Network Manager
from a terminal,
e.g., using openssl s_client, to manually send requests to the Network
Manager
. So that you do not have to enter a request in the
very-specific JSON representation of the Client Format, the following syntax
can be used instead.
Connecting from a terminal is only convenient when connecting as a
Client
. A Service
must enter
the full JSON representation of the Service Format when it sends a response.
Some tips for connecting as a Client
:
To identify as a
Client
enterclient
To identify as a
Client
with the nameMy Name
enterclient My Name
To request something from the Network
Manager
use the following formatManager <attribute> [<arguments>, [<keyword_arguments>]]
For example, to request the
identity
of the NetworkManager
enterManager identity
or, as a shortcut for requesting the
identity
of theManager
, you only need to enteridentity
To check if a user with the name
n.bohr
exists in the database of registered users enterManager users_table.is_user_registered n.bohr
Note
Most requests that are for the Network
Manager
to execute require that the request comes from aClient
that is connected to the NetworkManager
as an administrator. Your login credentials will be checked (requested from you) before the NetworkManager
executes the request. See theuser
command in MSL-Network CLI Documentation for more details on how to become an administrator.To request something from a
Service
use the following format<service> <attribute> [<arguments>, [<keyword_arguments>]]
Attention
Although you can send requests to a
Service
in the following manner there is no way to block the request if theService
has already met the restriction for the maximum number ofClient
's that can be linked with theService
to send requests to it. Therefore, you should only do the following if you are certain that theService
has not reached its maximumClient
limit. To test if thisClient
limit has been reached enterlink <service>
, for example,link BasicMath
and see if you get aPermissionError
in the response before you proceed to send requests to theService
.For example, to request the addition of two numbers from the BasicMath Service enter
BasicMath add 4 10
or
BasicMath add x=4 y=10
To request the concatenation of two strings from a
ModifyString.concat(s1, s2)
Service
, but with theModifyString
Service
being namedString Editor
on the NetworkManager
enter"String Editor" concat s1="first string" s2="second string"
To disconnect from the Network
Manager
enterdisconnect
or
exit