cterasdk.edge.network module#
- class cterasdk.edge.network.MTU(edge)#
Bases:
BaseCommand
Edge Filer MTU Configuration APIs
- modify(mtu)#
Set a custom network maximum transmission unit (MTU)
- Parameters:
mtu (int) – Maximum transmission unit
- reset()#
Set the default maximum transmission unit (MTU) settings
- class cterasdk.edge.network.Network(portal)#
Bases:
BaseCommand
Edge Filer Network configuration APIs
- 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:
- enable_dhcp()#
Enable DHCP
- get_status()#
Retrieve the network interface status
- ifconfig()#
Retrieve the ip configuration
- ipconfig()#
Retrieve the ip configuration
- iperf(address, port=5201, threads=1, protocol='TCP', direction='Upload', retries=120, seconds=1)#
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’
retries (int,optional) – Number of retries when sampling the iperf task status, defaults to 120
seconds (int,optional) – Number of seconds to wait between retries, defaults to 1
- Returns:
A string containing the iperf output
- Return type:
str
- set_static_ipaddr(address, subnet, gateway, primary_dns_server, secondary_dns_server=None)#
Set a Static IP Address
- Parameters:
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 the DNS Server addresses statically
- Parameters:
primary_dns_server (str) – The primary DNS server
secondary_dns_server (str,optinal) – The secondary DNS server, defaults to None
- 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:
- class cterasdk.edge.network.Proxy(edge)#
Bases:
BaseCommand
Edge Filer Proxy Configuration APIs
- disable()#
Disable Proxy
- Returns:
Proxy settings
- Return type:
- get_configuration()#
Get Proxy Configuration
- is_enabled()#
Check if Proxy Configuration is Enabled
- Returns:
True
if a proxy server was configured andFalse
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:
- class cterasdk.edge.network.StaticRoutes(edge)#
Bases:
BaseCommand
Edge Filer Static Route Configuration APIs
- add(source_ip, destination_ip_mask)#
Add a Static Route
- Parameters:
source_ip (str) – The source IP (192.168.15.55)
destination_ip_mask (str) – The destination IP and CIDR block (10.5.0.1/32)
- clear()#
Clear All Static routes
- get()#
Get All Static Routes
- remove(destination_ip_mask)#
Remove a Static Route
- Parameters:
destination_ip_mask (str) – The destination IP and CIDR block (10.5.0.1/32)