cterasdk.edge.network module#

class cterasdk.edge.network.BaseMTU(edge)#

Bases: BaseCommand

modify(interface, size)#
reset(interface)#
class cterasdk.edge.network.BaseStaticRoutes(edge)#

Bases: BaseCommand

Edge Filer Static Routes Configuration

add(interface, route_gateway, route_network)#

Add a route.

Parameters:
  • interface (object) – Interface name or port number

  • route_gateway (str) – Gateway IP address

  • route_network (str) – Network (CIDR)

clear()#
delete(route)#

Delete a route.

Parameters:

route (cterasdk.edge.types.StaticRoute) – Static Route

class cterasdk.edge.network.Diagnostics(edge)#

Bases: BaseCommand

diagnose(services)#

Test a TCP connection to a host over a designated port

Parameters:

services (list[cterasdk.edge.types.TCPService]) – List of services, identified by a host and a port

Returns:

A list of named-tuples including the host, port and a boolean value indicating whether TCP connection can be established

Return type:

list[cterasdk.edge.types.TCPConnectResult]

iperf(address, port=5201, threads=1, protocol='TCP', direction='Upload', timeout=None)#

Invoke a network throughput test

Parameters:
  • address (str) – The host running the iperf server

  • port (int,optional) – The iperf server port, defaults to 5201

  • threads (int,optional) – The number of threads, defaults to 1

  • protocol (cterasdk.edge.enum.IPProtocol,optional) – IP protocol, defaults to ‘TCP’

  • direction (cterasdk.edge.enum.Traffic,optional) – Traffic direction, defaults to ‘Upload’

  • timeout (float,optional) – Timeout (in seconds).

Returns:

A string containing the iperf output

Return type:

str

tcp_connect(service)#

Test a TCP connection between the Edge Filer and the provided host address

Parameters:

service (cterasdk.edge.types.TCPService) – A service, identified by a host and a port

Returns:

A named-tuple including the host, port and a boolean value indicating whether TCP connection can be established

Return type:

cterasdk.edge.types.TCPConnectResult

class cterasdk.edge.network.Hosts(edge)#

Bases: BaseCommand

Edge Filer Static Route Configuration APIs

add(ipaddr, hostname)#

Add entry to the Edge Filer’s hosts file.

Parameters:
  • ipaddr (str) – IP Address

  • hostname (str) – Hostname

delete(hostname)#
get()#

Get the Edge Filer’s hosts file entries.

class cterasdk.edge.network.LegacyMTU(edge)#

Bases: BaseMTU

Single Network Interface MTU Configuration

modify(size)#

Set Custom Network Maximum Transmission Unit (MTU)

Parameters:

size (int) – Maximum Transmission Unit

reset()#

Reset to defaults.

class cterasdk.edge.network.LegacyNetwork(edge)#

Bases: Network

Edge Filer Legacy Network API

enable_dhcp()#

Enable DHCP

Parameters:

interface (object) – Interface name or port number

get_status()#

Retrieve the network interface status

ifconfig()#

Retrieve the IP address settings

ipconfig()#

Retrieve the IP address settings

set_static_ipaddr(address, subnet, gateway, primary_dns_server, secondary_dns_server=None)#

Set a Static IP Address

Parameters:
  • interface (object) – Interface name or port number

  • address (str) – The static address

  • subnet (str) – The subnet for the static address

  • gateway (str) – The default gateway

  • primary_dns_server (str) – The primary DNS server

  • secondary_dns_server (str,optinal) – The secondary DNS server, defaults to None

set_static_nameserver(primary_dns_server, secondary_dns_server=None)#

Set Static DNS Servers

Parameters:
  • interface (object) – Interface name or port number

  • primary_dns_server (str) – Primary DNS server

  • secondary_dns_server (str,optional) – Secondary DNS server, defaults to None

class cterasdk.edge.network.LegacyStaticRoutes(edge)#

Bases: BaseStaticRoutes

Legacy Static Routes Configuration

add(gateway, network)#

Add a route.

Parameters:
  • gateway (str) – Gateway IP address

  • network (str) – Network (CIDR)

get()#

Get Routes.

class cterasdk.edge.network.MTU711(edge)#

Bases: BaseMTU

Multi Network Interface MTU Configuration

class cterasdk.edge.network.Network(edge)#

Bases: BaseCommand

deduce_port(interface)#
enable_dhcp(interface)#

Enable DHCP

Parameters:

interface (object) – Interface name or port number

interface(name)#

Get Network Interface

Parameters:

name (str) – Interface name

property interfaces#

Get Network Interfaces.

Returns:

A list of network interfaces

Return type:

list[cterasdk.edge.types.NetworkInterface]

ipconfig(interface)#

Get Interface Configuration

Parameters:

interface (object) – Interface name or port number

port(name)#

Get Port

Parameters:

name (str) – Interface name

set_static_ipaddr(interface, address, subnet, gateway, primary_dns_server, secondary_dns_server=None)#

Set a Static IP Address

Parameters:
  • interface (object) – Interface name or port number

  • address (str) – The static address

  • subnet (str) – The subnet for the static address

  • gateway (str) – The default gateway

  • primary_dns_server (str) – The primary DNS server

  • secondary_dns_server (str,optinal) – The secondary DNS server, defaults to None

set_static_nameserver(interface, primary_dns_server, secondary_dns_server=None)#

Set Static DNS Servers

Parameters:
  • interface (object) – Interface name or port number

  • primary_dns_server (str) – Primary DNS server

  • secondary_dns_server (str,optional) – Secondary DNS server, defaults to None

status(interface)#

Get Interface Status.

Parameters:

interface (object) – Interface name or port number

class cterasdk.edge.network.Network711(edge)#

Bases: Network

Edge Filer v7.11 Network API

class cterasdk.edge.network.NetworkModule#

Bases: BaseModule

initialize_version(software_version)#
class cterasdk.edge.network.Proxy(edge)#

Bases: BaseCommand

Edge Filer Proxy Configuration APIs

disable()#

Disable Proxy

Returns:

Proxy settings

Return type:

cterasdk.common.object.Object

get_configuration()#

Get Proxy Configuration

is_enabled()#

Check if Proxy Configuration is Enabled

Returns:

True if a proxy server was configured and False otherwise.

Return type:

bool

modify(address, port=None, username=None, password=None)#

Modify Proxy Configuration

Parameters:
  • address (str) – Proxy address

  • port (int,optional) – Proxy port, defaults to 8080

  • username (str,optional) – Username

  • password (str,optional) – Password

Returns:

Proxy settings

Return type:

cterasdk.common.object.Object

class cterasdk.edge.network.StaticRoutes711(edge)#

Bases: BaseStaticRoutes

Edge Filer 7.11 Static Routes Configuration

get()#

Get Routes.