Ip_Retriever

IPRetriever The IPRetriever class takes an ECME address and when run will
IPRetriever.read_config Loads the address information from a json configuration
IPRetriever.run Attempts to finds the server IP address associated with the
IPRetriever.set_interface Sets the interface and IP Version that is looked for on the server.
IPRetriever.sol_find_ip Uses ifconfig to get the IP address in an SOL session.
IPRetriever.sol_try_command Connects to the server over a SOL connection. Attempts
IPRetriever.write_config Saves the address information in a json configuration file
class IPRetriever(ecme_ip, aggressive=False, verbosity=0, **kwargs)[source]

Bases: threading.Thread

The IPRetriever class takes an ECME address and when run will connect to the Linux Server from the ECME over SOL and use ifconfig to determine the IP address.

read_config(path)[source]

Loads the address information from a json configuration file written by write_config

run()[source]

Attempts to finds the server IP address associated with the ECME IP. If successful, server_ip will contain the IP address.

set_interface(interface=None, ipv6=False)[source]

Sets the interface and IP Version that is looked for on the server. The interface must be acceptable by ifconfig. By default the first interface given by ifconfig will be used.

sol_find_ip(session)[source]

Uses ifconfig to get the IP address in an SOL session. Returns the ip address if it is found or None on failure.

sol_try_command(command)[source]

Connects to the server over a SOL connection. Attempts to run the given command on the server without knowing the state of the server. The command must return None if it fails. If aggresive is True, then the server may be restarted or power cycled to try and reset the state.

write_config(path)[source]

Saves the address information in a json configuration file

Previous topic

U-Boot Environment

Next topic

Fabric Basics