@@ -843,68 +843,81 @@ Windows File Sharing (CIFS/SMB)
843843 Network
844844=======
845845
846- .. automethod :: cterasdk.edge.network.Network.set_static_ipaddr
847- :noindex:
846+ Version 7.11+
847+ -------------
848848
849- .. code-block :: python
849+ .. automethod :: cterasdk.edge.network.Network.interface
850+ :noindex:
850851
851- edge.network.set_static_ipaddr(' 10.100.102.4' , ' 255.255.255.0' , ' 10.100.102.1' , ' 10.100.102.1' )
852+ .. automethod :: cterasdk.edge.network.Network.port
853+ :noindex:
852854
853- edge.show(' /status/network/ports/0/ip' ) # will print the IP configuration
855+ .. automethod :: cterasdk.edge.network.Network.deduce_port
856+ :noindex:
854857
855- .. automethod :: cterasdk.edge.network.Network.set_static_nameserver
858+ .. automethod :: cterasdk.edge.network.Network.status
856859 :noindex:
857860
858- .. code-block :: python
861+ .. automethod :: cterasdk.edge.network.Network.ipconfig
862+ :noindex:
859863
860- edge.network.set_static_nameserver(' 10.100.102.1' ) # to set the primary name server
864+ .. automethod :: cterasdk.edge.network.Network.set_static_ipaddr
865+ :noindex:
861866
862- edge.network.set_static_nameserver(' 10.100.102.1' , ' 10.100.102.254' ) # to set both primary and secondary
867+ .. automethod :: cterasdk.edge.network.Network.set_static_nameserver
868+ :noindex:
863869
864870.. automethod :: cterasdk.edge.network.Network.enable_dhcp
865871 :noindex:
866872
867- .. code-block :: python
873+ .. automethod :: cterasdk.edge.network.MTU711.reset
874+ :noindex:
868875
869- edge.network.enable_dhcp()
876+ .. automethod :: cterasdk.edge.network.MTU711.modify
877+ :noindex:
870878
871- Proxy Settings
872- --------------
879+ .. automethod :: cterasdk.edge.network.StaticRoutes711.get
880+ :noindex:
873881
874- .. automethod :: cterasdk.edge.network.Proxy.get_configuration
882+ .. automethod :: cterasdk.edge.network.StaticRoutes711.add
875883 :noindex:
876884
877- .. code-block :: python
885+ .. automethod :: cterasdk.edge.network.StaticRoutes711.delete
886+ :noindex:
878887
879- configuration = edge.network.proxy.get_configuration()
880- print (configuration)
888+ .. automethod :: cterasdk. edge.network.StaticRoutes711.clear
889+ :noindex:
881890
882- .. automethod :: cterasdk.edge.network.Proxy.is_enabled
891+
892+ Pre-Version 7.11
893+ ----------------
894+
895+ .. automethod :: cterasdk.edge.network.LegacyNetwork.set_static_ipaddr
883896 :noindex:
884897
885898.. code-block :: python
886899
887- if edge.network.proxy.is_enabled():
888- print (' Proxy Server is Enabled' )
900+ edge.network.set_static_ipaddr(' 10.100.102.4' , ' 255.255.255.0' , ' 10.100.102.1' , ' 10.100.102.1' )
889901
890- .. automethod :: cterasdk.edge.network.Proxy.modify
902+ edge.show(' /status/network/ports/0/ip' ) # will print the IP configuration
903+
904+ .. automethod :: cterasdk.edge.network.LegacyNetwork.set_static_nameserver
891905 :noindex:
892906
893907.. code-block :: python
894908
895- edge.network.proxy.modify( ' 192.168.11.11 ' , 8081 , ' proxy-user ' , ' proxy-user-password ' )
909+ edge.network.set_static_nameserver( ' 10.100.102.1 ' ) # to set the primary name server
896910
897- .. automethod :: cterasdk.edge.network.Proxy.disable
911+ edge.network.set_static_nameserver(' 10.100.102.1' , ' 10.100.102.254' ) # to set both primary and secondary
912+
913+ .. automethod :: cterasdk.edge.network.LegacyNetwork.enable_dhcp
898914 :noindex:
899915
900916.. code-block :: python
901917
902- edge.network.proxy.disable()
903-
904- MTU
905- ---
918+ edge.network.enable_dhcp()
906919
907- .. automethod :: cterasdk.edge.network.MTU .modify
920+ .. automethod :: cterasdk.edge.network.LegacyMTU .modify
908921 :noindex:
909922
910923.. code-block :: python
@@ -913,24 +926,21 @@ MTU
913926
914927 edge.network.mtu.modify(9000 ) # configure 'jumbo' frames (MTU: 9000)
915928
916- .. automethod :: cterasdk.edge.network.MTU .reset
929+ .. automethod :: cterasdk.edge.network.LegacyMTU .reset
917930 :noindex:
918931
919932.. code-block :: python
920933
921934 edge.network.mtu.reset() # disable custom mtu configuration and restore default setting (1500)
922935
923- Static Routes
924- -------------
925-
926- .. automethod :: cterasdk.edge.network.StaticRoutes.get
936+ .. automethod :: cterasdk.edge.network.LegacyStaticRoutes.get
927937 :noindex:
928938
929939.. code-block :: python
930940
931941 edge.network.routes.get()
932942
933- .. automethod :: cterasdk.edge.network.StaticRoutes .add
943+ .. automethod :: cterasdk.edge.network.LegacyStaticRoutes .add
934944 :noindex:
935945
936946.. code-block :: python
@@ -939,21 +949,53 @@ Static Routes
939949
940950 edge.network.routes.add(' 10.100.102.4' , ' 172.18.100.0/24' )
941951
942- .. automethod :: cterasdk.edge.network.StaticRoutes .delete
952+ .. automethod :: cterasdk.edge.network.LegacyStaticRoutes .delete
943953 :noindex:
944954
945955.. code-block :: python
946956
947957 edge.network.routes.delete(' 192.168.55.7/32' )
948958
949- .. automethod :: cterasdk.edge.network.StaticRoutes .clear
959+ .. automethod :: cterasdk.edge.network.LegacyStaticRoutes .clear
950960 :noindex:
951961
952962.. code-block :: python
953963
954964 # remove all static routes - (clean)
955965 edge.network.routes.clear()
956966
967+ Proxy Settings
968+ --------------
969+
970+ .. automethod :: cterasdk.edge.network.Proxy.get_configuration
971+ :noindex:
972+
973+ .. code-block :: python
974+
975+ configuration = edge.network.proxy.get_configuration()
976+ print (configuration)
977+
978+ .. automethod :: cterasdk.edge.network.Proxy.is_enabled
979+ :noindex:
980+
981+ .. code-block :: python
982+
983+ if edge.network.proxy.is_enabled():
984+ print (' Proxy Server is Enabled' )
985+
986+ .. automethod :: cterasdk.edge.network.Proxy.modify
987+ :noindex:
988+
989+ .. code-block :: python
990+
991+ edge.network.proxy.modify(' 192.168.11.11' , 8081 , ' proxy-user' , ' proxy-user-password' )
992+
993+ .. automethod :: cterasdk.edge.network.Proxy.disable
994+ :noindex:
995+
996+ .. code-block :: python
997+
998+ edge.network.proxy.disable()
957999
9581000 Hosts
9591001-----
@@ -983,23 +1025,23 @@ Hosts
9831025 Diagnostics
9841026-----------
9851027
986- .. automethod :: cterasdk.edge.network.Network .tcp_connect
1028+ .. automethod :: cterasdk.edge.network.Diagnostics .tcp_connect
9871029 :noindex:
9881030
9891031.. code-block :: python
9901032
9911033 cttp_service = edge_types.TCPService(' tenant.ctera.com' , 995 )
992- result = edge.network.tcp_connect(cttp_service)
1034+ result = edge.network.diag. tcp_connect(cttp_service)
9931035 if result.is_open:
9941036 print (' Success' )
9951037 # do something...
9961038 else :
9971039 print (' Failure' )
9981040
9991041 ldap_service = edge_types.TCPService(' dc.ctera.com' , 389 )
1000- edge.network.tcp_connect(ldap_service)
1042+ edge.network.diag. tcp_connect(ldap_service)
10011043
1002- .. automethod :: cterasdk.edge.network.Network .diagnose
1044+ .. automethod :: cterasdk.edge.network.Diagnostics .diagnose
10031045 :noindex:
10041046
10051047.. code-block :: python
@@ -1008,23 +1050,23 @@ Diagnostics
10081050 services.append(edge_types.TCPService(' 192.168.90.1' , 389 )) # LDAP
10091051 services.append(edge_types.TCPService(' ctera.portal.com' , 995 )) # CTTP
10101052 services.append(edge_types.TCPService(' ctera.portal.com' , 443 )) # HTTPS
1011- result = edge.network.diagnose(services)
1053+ result = edge.network.diag. diagnose(services)
10121054 for result in results:
10131055 print (result.host, result.port, result.is_open)
10141056
10151057
1016- .. automethod :: cterasdk.edge.network.Network .iperf
1058+ .. automethod :: cterasdk.edge.network.Diagnostics .iperf
10171059 :noindex:
10181060
10191061.. code-block :: python
10201062
1021- edge.network.iperf(' 192.168.1.145' ) # iperf server: 192.168.1.145, threads: 1, measure upload over TCP port 5201
1063+ edge.network.diag. iperf(' 192.168.1.145' ) # iperf server: 192.168.1.145, threads: 1, measure upload over TCP port 5201
10221064
1023- edge.network.iperf(' 192.168.1.145' , port = 85201 , threads = 5 ) # Customized port and number of threads
1065+ edge.network.diag. iperf(' 192.168.1.145' , port = 85201 , threads = 5 ) # Customized port and number of threads
10241066
1025- edge.network.iperf(' 192.168.1.145' , direction = edge_enum.Traffic.Download) # Measure download speed
1067+ edge.network.diag. iperf(' 192.168.1.145' , direction = edge_enum.Traffic.Download) # Measure download speed
10261068
1027- edge.network.iperf(' 192.168.1.145' , protocol = edge_enum.IPProtocol.UDP ) # Use UDP
1069+ edge.network.diag. iperf(' 192.168.1.145' , protocol = edge_enum.IPProtocol.UDP ) # Use UDP
10281070
10291071
10301072 Antivirus
0 commit comments