pybvc.netconfdev.vrouter package¶
Submodules¶
pybvc.netconfdev.vrouter.firewall module¶
@authors: Sergei Garbuzov @status: Development @version: 1.1.0
firewall.py: Firewall specific properties and access methods
-
class
pybvc.netconfdev.vrouter.firewall.DataplaneInterfaceFirewall(ifName)¶ -
add_in_policy(policy_name)¶
-
add_out_policy(policy_name)¶
-
get_name()¶
-
get_payload()¶
-
get_url_extension()¶
-
tagnode= None¶ Firewall options
-
to_json()¶
-
-
class
pybvc.netconfdev.vrouter.firewall.DataplaneInterfaceFirewallOptions¶ Class representing Firewall options (inbound/outbound forwarding rules) Helper class of the ‘DataplaneInterfaceFirewall’ class
-
add_in_policy(policy_name)¶
-
add_out_policy(policy_name)¶
-
inlist= None¶ Outbound forwarding rules
-
to_json()¶
-
-
class
pybvc.netconfdev.vrouter.firewall.Firewall(name)¶ A class that defines a Firewall.
-
add_rule(rule)¶ Add a rule to Firewall. :param rule: Rule to be added to Firewall.
pybvc.netconfdev.vrouter.vrouter5600.Rule
-
get_payload()¶
-
get_rules()¶ Return the Rules of a Firewall :return: Rules of the Firewall :rtype:
pybvc.netconfdev.vrouter.vrouter5600.Rules
-
get_url_extension()¶
-
to_json()¶ Return Firewall as JSON
-
to_string()¶ Return Firewall as a string
-
-
class
pybvc.netconfdev.vrouter.firewall.Object¶
-
class
pybvc.netconfdev.vrouter.firewall.Rule(number)¶ The class that defines a Rule. :param int number: The number for the Rule.
-
add_action(action)¶ Add an action to the Rule. :param string action: The action to be taken for the Rule: accept,
dropReturns: No return value
-
add_icmp_typename(typeName)¶ - Add typename for ICMP to Rule. If the packet matches this then the
- action is taken.
Parameters: typeName (string) – The ICMP type name to test packet against. Returns: No return value.
-
add_source_address(srcAddr)¶ - Add source address to Rule. If the packet matches this then the
- action is taken.
Parameters: srcAddr (string) – The IP address to match against the source IP of packet. Returns: No return value
-
to_json()¶ Return Rule as JSON
-
to_string()¶ Return Rule as string
-
pybvc.netconfdev.vrouter.interfaces module¶
@authors: Sergei Garbuzov @status: Development @version: 1.1.0
interfaces.py: Interface specific properties and access methods
-
class
pybvc.netconfdev.vrouter.interfaces.DataPlaneInterface(name)¶ Class representing a dataplane interface
-
address= None¶ Media Access Control (MAC) address
-
description= None¶ DHCPv6 options (container)
-
dhcpv6_options= None¶ IPv4 parameters (container)
-
disable= None¶ Virtual Interface (VIF) ID (list)
-
disable_link_detect= None¶ This interface bridge group (container)
-
ip= None¶ IPv6 parameters (container)
-
ipv6= None¶ Maximum Transmission Unit (MTU)
-
mac= None¶ Ignore link state changes
-
mtu= None¶ Disable interface
-
set_address(address)¶
-
set_bridge_group(TBD)¶
-
set_description(description)¶
-
set_dhcpv6_options(TBD)¶
-
set_disable(value)¶
-
set_disable_link_detect(value)¶
-
set_ipv4_options(TBD)¶
-
set_ipv6_options(TBD)¶
-
set_mac(mac)¶
-
set_mtu(mtu)¶
-
set_sflow(value)¶
-
set_vif(vif_id)¶
-
sflow= None¶ IP address (list)
-
tagnode= None¶ Description for the interface
-
to_json()¶ Return this object as JSON
-
to_string()¶ Return this object as a string
-
vif= None¶ Enable/Disable sflow for interface
-
-
class
pybvc.netconfdev.vrouter.interfaces.OpenVpnInterface(name)¶ Class representing an OpenVPN tunnel interface
-
auth= None¶ Hashing algorithm option enumeration: ‘md5’, ‘sha1’, ‘sha256’, ‘sha512’
-
description= None¶ OpenVPN authentication method (container)
-
device_type= None¶ File containing the secret key shared with remote end of tunnel
-
disable= None¶ Server-mode options (container)
-
encryption= None¶ Additional OpenVPN options (list)
-
get_payload()¶ Return this object as a payload for HTTP request
-
get_url_extension()¶
-
hash= None¶ Interface to be disabled
-
ip= None¶ IPv6 parameters (container)
-
local_address= None¶ Local port number to accept connections (range 1..65535)
-
local_host= None¶ IP address of remote end of tunnel
-
local_port= None¶ Local IP address to accept connections (all if not set)
-
mode= None¶ OpenVPN tunnel to be used as the default route (container)
-
openvpn_option= None¶ Local IP address or network address
-
protocol= None¶ IPv4 parameters (container)
-
remote_address= None¶ Remote port number to connect to
-
remote_host= None¶ Transport Layer Security (TLS) options (container)
-
remote_port= None¶ Remote host to connect to (dynamic if not set)
-
replace_default_route= None¶ OpenVPN communication protocol enumeration: ‘udp’, ‘tcp-passive’, ‘tcp-active’
-
server= None¶ OpenVPN interface device-type
-
set_description(description)¶
-
set_local_address(addr)¶
-
set_mode(mode)¶
-
set_remote_address(addr)¶
-
set_remote_host(addr)¶
-
set_tls_ca_cert_file(path)¶
-
set_tls_cert_file(path)¶
-
set_tls_crl_file(path)¶
-
set_tls_dh_file(path)¶
-
set_tls_key_file(path)¶
-
set_tls_role(role)¶
Data encryption algorithm option enumeration: ‘des’, ‘3des’, ‘bf128’, ‘bf256’, ‘aes128’, ‘aes192’,
‘aes256’
-
tagnode= None¶ Description for the interface
-
tls= None¶ OpenVPN mode of operation enumeration: ‘site-to-site’, ‘client’, ‘server’
-
to_json()¶ Return this object as JSON
-
to_string()¶ Return this object as a string
-
-
class
pybvc.netconfdev.vrouter.interfaces.TlsOptions¶ Transport Layer Security (TLS) options Helper class of the ‘OpenVpnInterface’ class
-
ca_cert_file= None¶ File containing certificate for this host
-
cert_file= None¶ File containing certificate revocation list (CRL) for this host
-
crl_file= None¶ File containing this host’s private key
-
dh_file= None¶ File containing certificate for Certificate Authority (CA)
-
role= None¶ File containing Diffie Hellman parameters (server only)
-
set_ca_cert_file(path)¶
-
set_cert_file(path)¶
-
set_crl_file(path)¶
-
set_dh_file(path)¶
-
set_key_file(path)¶
-
set_role(role)¶
-
-
class
pybvc.netconfdev.vrouter.interfaces.VirtualTunnelInterface(name)¶ Class representing a Virtual tunnel interface (VTI)
-
address= None¶ IPv4 parameters
-
description= None¶ Maximum Transmission Unit (MTU), range 68..9000
-
disable= None¶ IPv4 or IPv6 Prefixes
-
ip= None¶ IPv6 parameters
-
mtu= None¶ Disable this interface
-
set_address(address)¶
-
set_description(description)¶
-
set_disable(value)¶
-
set_mtu(mtu)¶
-
tagnode= None¶ Description for the interface
-
to_json()¶ Return this object as JSON
-
to_string()¶ Return this object as a string
-
pybvc.netconfdev.vrouter.protocols module¶
@authors: Sergei Garbuzov @status: Development @version: 1.1.0
protocols.py: Protocols specific properties and access methods
-
class
pybvc.netconfdev.vrouter.protocols.InterfaceRoute(ip_prefix)¶ Helper sub-class of the ‘Static’ class Interface based static route
-
disable_next_hop_interface(ifName)¶
-
enable_next_hop_interface(ifName)¶
-
set_next_hop_interface(ifName, disable=None, distance=None)¶
-
set_next_hop_interface_distance(ifName, distance)¶
-
tagnode= None¶ Next-hop interfaces
-
-
class
pybvc.netconfdev.vrouter.protocols.NextHopInterface(name)¶ Helper sub-class of the ‘InterfaceRoute’ class Next-hop interface
-
disable= None¶ Distance value for this route (range 1..255)
-
set_disable(value)¶
-
set_distance(value)¶
-
tagnode= None¶ Disable IPv4 interface static route
-
-
class
pybvc.netconfdev.vrouter.protocols.StaticRoute¶ Class representing static route parameters
-
arp= None¶ Interface based static route
-
get_payload()¶
-
get_url_extension()¶
-
interface_route= None¶ Interface based IPv6 static route (list)
-
interface_route6= None¶ Static route (list)
-
route= None¶ Static IPv6 route (list)
-
route6= None¶ Policy route table (range 1..128) (list)
-
set_interface_route(ip_prefix)¶
-
set_interface_route_next_hop_interface(ip_prefix, if_name, disable=None, distance=None)¶
-
to_json()¶ Return this object as JSON
-
to_string()¶ Return this object as a string
-
pybvc.netconfdev.vrouter.vpn module¶
@authors: Sergei Garbuzov @status: Development @version: 1.1.0
vpn.py: Virtual Private Network (VPN) specific properties and access methods
-
class
pybvc.netconfdev.vrouter.vpn.EspGroup(esp_grp_name)¶ Bases:
pybvc.netconfdev.vrouter.vpn.IpsecHelper sub-class for ‘Ipsec’ class
-
set_lifetime(lifetime)¶
-
set_proposal_encryption(proposal_num, encryption_cipher)¶
-
set_proposal_hash(proposal_num, hash_algorith)¶
-
-
class
pybvc.netconfdev.vrouter.vpn.EspProposal(proposal_num)¶ Bases:
pybvc.netconfdev.vrouter.vpn.EspGroupHelper sub-class for ‘EspGroup’ class
-
class
pybvc.netconfdev.vrouter.vpn.IkeGroup(ike_grp_name)¶ Bases:
pybvc.netconfdev.vrouter.vpn.IpsecHelper sub-class for ‘Ipsec’ class
-
set_lifetime(lifetime)¶
-
set_proposal_dh_group(proposal_num, dh_group)¶
-
set_proposal_encryption(proposal_num, encryption_cipher)¶
-
set_proposal_hash(proposal_num, hash_algorith)¶
-
-
class
pybvc.netconfdev.vrouter.vpn.IkeProposal(proposal_num)¶ Bases:
pybvc.netconfdev.vrouter.vpn.IkeGroupHelper sub-class for ‘IkeGroup’ class
-
class
pybvc.netconfdev.vrouter.vpn.IpSecAuthentication¶ Bases:
pybvc.netconfdev.vrouter.vpn.IpSecSettingsHelper sub-class of the ‘IpSecSettings’ class
-
set_ca_cert_file(path)¶
-
set_crl_file(path)¶
-
set_mode(mode)¶
-
set_secret(secret)¶
-
set_srv_cert_file(path)¶
-
set_srv_key_file(path)¶
-
set_srv_key_pswd(pswd)¶
-
-
class
pybvc.netconfdev.vrouter.vpn.IpSecCertificate¶ Bases:
pybvc.netconfdev.vrouter.vpn.IpSecAuthenticationHelper sub-class of the ‘IpSecAuthentication’ class
-
ca_cert_file= None¶ File containing the X.509 Certificate Revocation List (CRL)
-
crl_file= None¶ File containing the X.509 certificate for the remote access VPN server
-
server_cert_file= None¶ File containing the private key for the X.509 certificate for the remote access VPN server
-
server_key_file= None¶ Password that protects the private key
-
set_ca_cert_file(path)¶
-
set_crl_file(path)¶
-
set_srv_cert_file(path)¶
-
set_srv_key_file(path)¶
-
set_srv_key_pswd(pswd)¶
-
-
class
pybvc.netconfdev.vrouter.vpn.IpSecSettings¶ Bases:
pybvc.netconfdev.vrouter.vpn.RemoteAccessHelper sub-class of the ‘RemoteAccess’ class
-
set_mode(mode)¶
-
-
class
pybvc.netconfdev.vrouter.vpn.Ipsec¶ Bases:
pybvc.netconfdev.vrouter.vpn.VpnClass representing VPN IP security (IPsec) configuration Helper sub-class of the ‘Vpn’ class
-
auto_update= None¶ Option to disable requirement for unique IDs in the Security Database
-
disable_uniqreqids= None¶ Encapsulating Security Payload (ESP) groups (list of ‘EspGroup’ class instances)
-
esp_group= None¶ Internet Key Exchange (IKE) groups (list of ‘IkeGroup’ class instances)
-
ike_group= None¶ IPsec logging ‘enumeration: raw’, ‘crypt’, ‘parsing’, ‘emitting’, ‘control’, ‘private’, ‘all’
-
logging= None¶ Network Address Translation (NAT) networks
-
nat_networks= None¶ Network Address Translation (NAT) traversal enumeration: ‘enable’, ‘disable’
-
nat_traversal= None¶ VPN IPSec Profiles (list of IpSecProfile class instances)
-
profile= None¶ Site to site VPN (instance of ‘SiteToSite’ class)
-
set_auto_update(interval)¶
-
set_disable_uniqreqids()¶
-
set_nat_allow_network(ipnet)¶
-
set_nat_traversal(value)¶
-
-
class
pybvc.netconfdev.vrouter.vpn.L2tp¶ Bases:
pybvc.netconfdev.vrouter.vpn.VpnClass representing VPN Layer 2 Tunneling Protocol (L2TP) configuration Helper sub-class of the ‘Vpn’ class
-
class
pybvc.netconfdev.vrouter.vpn.Peer(peer_node)¶ Helper sub-class of the ‘SiteToSite’ class
-
set_auth_ca_cert_file(path)¶
-
set_auth_mode(mode)¶
-
set_auth_remote_id(remote_id)¶
-
set_auth_rsa_key_name(rsa_key_name)¶
-
set_auth_srv_cert_file(path)¶
-
set_auth_srv_key_file(path)¶
-
set_auth_srv_key_pswd(pswd)¶
-
set_default_esp_group(esp_group)¶
-
set_description(description)¶
-
set_ike_group(ike_group)¶
-
set_local_address(local_address)¶
-
set_tunnel_local_prefix(tunnel_id, local_prefix)¶
-
set_tunnel_remote_prefix(tunnel_id, remote_prefix)¶
-
-
class
pybvc.netconfdev.vrouter.vpn.PeerAuthentication¶ Bases:
pybvc.netconfdev.vrouter.vpn.PeerHelper sub-class of the ‘Peer’ class
-
set_auth_mode(mode)¶
-
set_ca_cert_file(path)¶
-
set_remote_id(remote_id)¶
-
set_rsa_key_name(rsa_key_name)¶
-
set_srv_cert_file(path)¶
-
set_srv_key_file(path)¶
-
set_srv_key_pswd(pswd)¶
-
-
class
pybvc.netconfdev.vrouter.vpn.PeerCertificate¶ Bases:
pybvc.netconfdev.vrouter.vpn.PeerAuthenticationHelper sub-class of the ‘PeerAuthentication’ class
-
ca_cert_file= None¶ Server key file and password to open it
-
cert_file= None¶ File containing the X.509 Certificate Revocation List (CRL)
-
key= None¶ File containing the X.509 certificate for this host
-
set_ca_cert_file(path)¶
-
set_crl_file(path)¶
-
set_srv_cert_file(path)¶
-
set_srv_key_file(path)¶
-
set_srv_key_pswd(pswd)¶
-
-
class
pybvc.netconfdev.vrouter.vpn.RemoteAccess¶ Bases:
pybvc.netconfdev.vrouter.vpn.L2tpHelper sub-class of the ‘L2tp’ class
-
set_auth_mode(mode)¶
-
set_client_ip_pool(start, end)¶
-
set_description(description)¶
-
set_dhcp_interface(interface)¶
-
set_ipsec_ca_cert_file(path)¶
-
set_ipsec_crl_file(path)¶
-
set_ipsec_mode(mode)¶
-
set_ipsec_srv_cert_file(path)¶
-
set_ipsec_srv_key_file(path)¶
-
set_ipsec_srv_key_pswd(pswd)¶
-
set_local_user(name, pswd)¶
-
set_mtu(mtu)¶
-
set_outside_address(ipaddr)¶
-
set_outside_nexthop(ipaddr)¶
-
set_primary_dns_server(ipaddr)¶
-
set_primary_wins_server(ipaddr)¶
-
set_secondary_dns_server(ipaddr)¶
-
set_secondary_wins_server(ipaddr)¶
-
set_server_ip_pool(start, end)¶
-
-
class
pybvc.netconfdev.vrouter.vpn.RemoteAccessAuthentication¶ Bases:
pybvc.netconfdev.vrouter.vpn.RemoteAccessHelper sub-class of the ‘RemoteAccess’ class
-
set_mode(mode)¶
-
set_user(name, pswd)¶
-
-
class
pybvc.netconfdev.vrouter.vpn.RsaKeys¶ Bases:
pybvc.netconfdev.vrouter.vpn.VpnClass representing RSA keys for VPN configuration Helper sub-class of the ‘Vpn’ class
-
set_local_key(path)¶
-
set_rsa_key(name, value)¶
-
-
class
pybvc.netconfdev.vrouter.vpn.SiteToSite¶ Bases:
pybvc.netconfdev.vrouter.vpn.IpsecHelper sub-class of the ‘Ipsec’ class
-
set_peer_auth_ca_cert_file(peer_node, path)¶
-
set_peer_auth_mode(peer_node, mode)¶
-
set_peer_auth_remote_id(peer_node, remote_id)¶
-
set_peer_auth_rsa_key_name(peer_node, rsa_key_name)¶
-
set_peer_auth_srv_cert_file(peer_node, path)¶
-
set_peer_auth_srv_key_file(peer_node, path)¶
-
set_peer_auth_srv_key_pswd(peer_node, pswd)¶
-
set_peer_default_esp_group(peer_node, esp_group)¶
-
set_peer_description(peer_node, description)¶
-
set_peer_ike_group(peer_node, ike_group)¶
-
set_peer_local_address(peer_node, local_address)¶
-
set_peer_tunnel_local_prefix(peer_node, tunnel_id, local_prefix)¶
-
set_peer_tunnel_remote_prefix(peer_node, tunnel_id, remote_prefix)¶
-
-
class
pybvc.netconfdev.vrouter.vpn.Tunnel(tunnel_id)¶ Bases:
pybvc.netconfdev.vrouter.vpn.PeerHelper sub-class of the ‘Peer’ class
-
set_local(local)¶
-
set_remote(remote)¶
-
-
class
pybvc.netconfdev.vrouter.vpn.Vpn¶ Class representing Virtual Private Network (VPN) configuration
-
get_payload()¶
-
get_url_extension()¶
-
set_ipsec(ipsec)¶
-
set_ipsec_esp_group_lifetime(esp_grp_name, lifetime)¶
-
set_ipsec_esp_group_proposal_encryption(esp_grp_name, proposal_num, encryption_cipher)¶
-
set_ipsec_esp_group_proposal_hash(esp_grp_name, proposal_num, hash_algorith)¶
-
set_ipsec_ike_group_lifetime(ike_grp_name, lifetime)¶
-
set_ipsec_ike_group_proposal_dh_group(ike_grp_name, proposal_num, dh_group)¶
-
set_ipsec_ike_group_proposal_encryption(ike_grp_name, proposal_num, encryption_cipher)¶
-
set_ipsec_ike_group_proposal_hash(ike_grp_name, proposal_num, hash_algorith)¶
-
set_ipsec_site_to_site_peer_auth_ca_cert_file(peer_node, path)¶
-
set_ipsec_site_to_site_peer_auth_mode(peer_node, auth_mode)¶
-
set_ipsec_site_to_site_peer_auth_remote_id(peer_node, remote_id)¶
-
set_ipsec_site_to_site_peer_auth_rsa_key_name(peer_node, rsa_key_name)¶
-
set_ipsec_site_to_site_peer_auth_srv_cert_file(peer_node, path)¶
-
set_ipsec_site_to_site_peer_auth_srv_key_file(peer_node, path)¶
-
set_ipsec_site_to_site_peer_auth_srv_key_pswd(peer_node, pswd)¶
-
set_ipsec_site_to_site_peer_default_esp_group(peer_node, esp_group)¶
-
set_ipsec_site_to_site_peer_description(peer_node, description)¶
-
set_ipsec_site_to_site_peer_ike_group(peer_node, ike_group)¶
-
set_ipsec_site_to_site_peer_local_address(peer_node, local_address)¶
-
set_ipsec_site_to_site_peer_tunnel_local_prefix(peer_node, tunnel, local_prefix)¶
-
set_ipsec_site_to_site_peer_tunnel_remote_prefix(peer_node, tunnel, remote_prefix)¶
-
set_l2tp(l2tp)¶
-
set_l2tp_remote_access_client_ip_pool(start, end)¶
-
set_l2tp_remote_access_description(description)¶
-
set_l2tp_remote_access_dhcp_interface(interface)¶
-
set_l2tp_remote_access_ipsec_auth_ca_cert_file(path)¶
-
set_l2tp_remote_access_ipsec_auth_crl_file(path)¶
-
set_l2tp_remote_access_ipsec_auth_mode(mode)¶
-
set_l2tp_remote_access_ipsec_auth_srv_cert_file(path)¶
-
set_l2tp_remote_access_ipsec_auth_srv_key_file(path)¶
-
set_l2tp_remote_access_ipsec_auth_srv_key_pswd(pswd)¶
-
set_l2tp_remote_access_mtu(mtu)¶
-
set_l2tp_remote_access_outside_address(ipaddr)¶
-
set_l2tp_remote_access_outside_nexthop(ipaddr)¶
-
set_l2tp_remote_access_primary_dns_server(ipaddr)¶
-
set_l2tp_remote_access_primary_wins_server(ipaddr)¶
-
set_l2tp_remote_access_secondary_dns_server(ipaddr)¶
-
set_l2tp_remote_access_secondary_wins_server(ipaddr)¶
-
set_l2tp_remote_access_server_ip_pool(start, end)¶
-
set_l2tp_remote_access_user(name, pswd)¶
-
set_l2tp_remote_access_user_auth_mode(mode)¶
-
set_local_key(path)¶
-
set_nat_allow_network(ipnet)¶
-
set_nat_traversal(value)¶
-
set_rsa_key(name, value)¶
-
set_rsa_keys(rsa_keys)¶
-
to_json()¶
-
pybvc.netconfdev.vrouter.vrouter5600 module¶
@authors: Sergei Garbuzov @status: Development @version: 1.1.0
vrouter5600.py: vRouter-5600 specific properties and communication methods
-
class
pybvc.netconfdev.vrouter.vrouter5600.VRouter5600(ctrl, name, ipAddr, portNum, adminName, adminPassword, tcpOnly=False)¶ Bases:
pybvc.controller.netconfnode.NetconfNodeClass that represents an instance of vRouter5600 (NETCONF capable server device).
param ctrl: pybvc.controller.controller.ControllerParameters: - name (string) – The name of the vrouter5600
- ipAddr (string) – The ip address for the vrouter5600
- portNum (int) – The port number to communicate NETCONF to the vrouter5600
- adminName (string) – The username to authenticate setup of the NETCONF communication
- adminPassword (string) – The password to authenticate setup of the NETCONF communication
- tcpOnly (boolean) – Use TCP only or not.
Returns: The newly created vrouter5600 instance.
Return type: -
add_firewall_instance_rule(fwInstance, fwRule)¶
-
add_modify_firewall_instance(fwInstance)¶ - Create a firewall on the VRouter5600.
param fwInstance: instance of the ‘Firewall’ class
Returns: A tuple: Status, None. Return type: instance of the Result class - STATUS.CONN_ERROR: If the controller did not respond. - STATUS.CTRL_INTERNAL_ERROR: If the controller responded but did not
provide any status.
STATUS.OK: Success. Result is valid.
- STATUS.HTTP_ERROR: If the controller responded with an error
status code.
-
delete_dataplane_interface_firewall(ifName)¶ - Delete both inbound and outbound firewalls for a
- dataplane interface on the VRouter5600.
param string ifName: The dataplane interface to attach a firewall.
Returns: A tuple: Status, Response from VRouter5600. Return type: instance of the Result class - STATUS.CONN_ERROR: If the controller did not respond. - STATUS.CTRL_INTERNAL_ERROR: If the controller responded but did
not provide any status.
STATUS.OK: Success. Result is valid.
- STATUS.HTTP_ERROR: If the controller responded with an error
status code.
-
delete_firewall_instance(fwInstance)¶ - Delete a firewall from the VRouter5600.
param fwInstance: Firewall :class:
Returns: A tuple: Status, None. Return type: instance of the Result class - STATUS.CONN_ERROR: If the controller did not respond. - STATUS.CTRL_INTERNAL_ERROR: If the controller responded but did not
provide any status.
STATUS.OK: Success. Result is valid.
STATUS.HTTP_ERROR: if the controller responded with an error status
. code.
-
delete_openvpn_interface_cfg(ifName)¶
-
delete_protocols_cfg(model_ref=None)¶
-
delete_protocols_static_cfg()¶ Delete protocols static configuration
-
delete_protocols_static_interface_route_cfg(ip_prefix)¶
-
delete_vpn_cfg()¶ Delete VPN configuration
-
get_cfg()¶ - Return configuration of the VRouter5600.
return: A tuple: Status, JSON for configuration.
Return type: instance of the Result class (containing configuration data) - STATUS.CONN_ERROR: If the controller did not respond.
- STATUS.CTRL_INTERNAL_ERROR: If the controller responded but did not
. provide any status. - STATUS.OK: Success. Result is valid. - STATUS.HTTP_ERROR: If the controller responded with an error . status code.
-
get_dataplane_interface_cfg(ifName)¶ - Return the configuration for a dataplane interface
- on the VRouter5600
param string ifName: The interface name of the interface for which configuration should be returned
Returns: A tuple: Status, configuration of dataplane interface Return type: instance of the Result class (containing configuration data) - STATUS.CONN_ERROR: If the controller did not respond. - STATUS.CTRL_INTERNAL_ERROR: If the controller responded but did not
provide any status.
STATUS.OK: Success. Result is valid.
- STATUS.HTTP_ERROR: If the controller responded with an error
status code.
-
get_dataplane_interfaces_cfg()¶ - Return the configuration for the dataplane interfaces
- on the VRouter5600
return: A tuple: Status, configuration of dataplane interfaces
Return type: instance of the Result class (containing configuration data) - STATUS.CONN_ERROR: If the controller did not respond. - STATUS.CTRL_INTERNAL_ERROR: If the controller responded but did not
- provide
any status.
STATUS.OK: Success. Result is valid.
- STATUS.HTTP_ERROR: If the controller responded with an error
status code.
-
get_dataplane_interfaces_list()¶ - Return a list of interfaces on the VRouter5600
return: A tuple: Status, list of interface names
Return type: instance of the Result class - STATUS.CONN_ERROR: If the controller did not respond. - STATUS.CTRL_INTERNAL_ERROR: If the controller responded but did
not provide any status.
STATUS.OK: Success. Result is valid.
- STATUS.HTTP_ERROR: If the controller responded with an error
status code.
-
get_firewall_instance_cfg(instance)¶ - Return configuration for a specific firewall on the VRouter5600.
- :param instance of the ‘Firewall’ class
Returns: A tuple: Status, JSON for firewall configuration. Return type: instance of the Result class (containing configuration data) - STATUS.CONN_ERROR: If the controller did not respond. - STATUS.CTRL_INTERNAL_ERROR: If the controller responded but did not
provide any status.
STATUS.OK: Success. Result is valid.
- STATUS.HTTP_ERROR: If the controller responded with an error
status code.
-
get_firewalls_cfg()¶ - Return firewall configuration of the VRouter5600.
return: A tuple: Status, JSON for firewall configuration.
Return type: instance of the Result class (containing configuration data) - STATUS.CONN_ERROR: If the controller did not respond. - STATUS.CTRL_INTERNAL_ERROR: If the controller responded but did
not provide any status.
STATUS.OK: Success. Result is valid.
- STATUS.HTTP_ERROR: If the controller responded with an error
status code.
-
get_interfaces_cfg()¶ - Return the configuration for the interfaces on the VRouter5600
return: A tuple: Status, configuration of the interfaces
Return type: instance of the Result class (containing configuration data) - STATUS.CONN_ERROR: If the controller did not respond. - STATUS.CTRL_INTERNAL_ERROR: If the controller responded but did not
provide any status.
STATUS.OK: Success. Result is valid.
- STATUS.HTTP_ERROR: If the controller responded with an error
status code.
-
get_interfaces_list()¶ - Get the list of interfaces on the VRouter5600.
return: A tuple: Status, list of interface names.
Return type: instance of the Result class - STATUS.CONN_ERROR: If the controller did not respond. - STATUS.CTRL_INTERNAL_ERROR: If the controller responded but did not
provide any status.
STATUS.OK: Success. Result is valid.
- STATUS.HTTP_ERROR: If the controller responded with an error
status code.
-
get_loopback_interface_cfg(ifName)¶ - Return the configuration for a single loopback interface
- on the VRouter5600
param string ifName: The interface name of the interface for which configuration should be returned
Returns: A tuple: Status, configuration of dataplane interface Return type: instance of the Result class (containing configuration data) - STATUS.CONN_ERROR: If the controller did not respond. - STATUS.CTRL_INTERNAL_ERROR: If the controller responded but did not
provide any status.
STATUS.OK: Success. Result is valid.
- STATUS.HTTP_ERROR: If the controller responded with an error
status code.
-
get_loopback_interfaces_cfg()¶ - Return the configuration for the loopback interfaces
- on the VRouter5600
return: A tuple: Status, configuration of loopback interfaces
Return type: instance of the Result class (containing configuration data) - STATUS.CONN_ERROR: If the controller did not respond. - STATUS.CTRL_INTERNAL_ERROR: If the controller responded but did not
provide any status.
STATUS.OK: Success. Result is valid.
- STATUS.HTTP_ERROR: If the controller responded with an error
status code.
-
get_loopback_interfaces_list()¶ - Return a list of loopback interfaces on the VRouter5600
return: A tuple: Status, list of loopback interface names
Return type: instance of the Result class - STATUS.CONN_ERROR: If the controller did not respond. - STATUS.CTRL_INTERNAL_ERROR: If the controller responded but did not
provide any status.
STATUS.OK: Success. Result is valid.
- STATUS.HTTP_ERROR: If the controller responded with an error
status code.
-
get_openvpn_interface_cfg(ifName)¶
-
get_openvpn_interfaces_cfg()¶
-
get_protocols_cfg(model_ref=None)¶
-
get_protocols_static_cfg()¶
-
get_protocols_static_interface_route_cfg(ip_prefix)¶
-
get_schema(schemaId, schemaVersion)¶ - Return a YANG model definition for the indicated schema
param string schemaId: id of schema
Parameters: schemaVersion (string) – version of the schema Returns: A tuple: Status, YANG model schema. Return type: instance of the Result class (containing YANG schema) - STATUS.CONN_ERROR: If the controller did not respond. Schema is
. empty. - STATUS.CTRL_INTERNAL_ERROR: If the controller responded but did not . provide any status. Schema is empty. - STATUS.OK: Success. Result is valid. - STATUS.DATA_NOT_FOUND: Data missing or in unexpected format. - STATUS.HTTP_ERROR: If the controller responded with an error . status code.
-
get_schemas()¶ - Return a list of YANG model schemas implemented on this VRouter5600
return: A tuple: Status, list of YANG model schemas for the VRouter5600.
Return type: - instance of the Result class (containing JSON listing
- information about the YANG schemas for the node)
- STATUS.CONN_ERROR: If the controller did not respond. List is empty.
- STATUS.CTRL_INTERNAL_ERROR: If the controller responded but did not
provide any status. List is empty.
STATUS.OK: Success. List is valid.
- STATUS.HTTP_ERROR: If the controller responded with an error
status code.
-
get_vpn_cfg()¶ - Return VPN configuration of the VRouter5600.
return: A tuple: Status, JSON for VPN configuration.
Return type: instance of the Result class (containing configuration data) - STATUS.CONN_ERROR: If the controller did not respond. - STATUS.CTRL_INTERNAL_ERROR: If the controller responded but did
not provide any status.
STATUS.OK: Success. Result is valid.
- STATUS.HTTP_ERROR: If the controller responded with an error
status code.
-
set_dataplane_interface_firewall(ifName, inboundFwName, outboundFwName)¶ - Set a firewall for inbound, outbound or both for a
- dataplane interface on the VRouter5600.
param string ifName: The dataplane interface to attache a firewall.
Parameters: - inboundFwName (string) – None or name of firewall on VRouter5600 to use for traffic inbound towards router.
- outboundFwName (string) – None or name of firewall on VRouter5600 to use for traffic outbound from router.
Returns: A tuple: Status, None.
Return type: instance of the Result class - STATUS.CONN_ERROR: if the controller did not respond. schema is
empty.
- STATUS.CTRL_INTERNAL_ERROR: if the controller responded but did not
provide any status. schema is empty.
STATUS.OK: Success. result is valid.
STATUS.HTTP_ERROR: if the controller responded with an error status code.
-
set_openvpn_interface_cfg(openvpn_interface)¶
-
set_protocols_static_route_cfg(static_route)¶
-
set_vpn_cfg(vpn)¶ - Create/update VPN configuration
param vpn: instance of the ‘Vpn’ class
Returns: A tuple: Status, None Return type: instance of the Result class - STATUS.CONN_ERROR: If the controller did not respond. - STATUS.CTRL_INTERNAL_ERROR: If the controller responded but did not
provide any status.
STATUS.OK: Success. Result is valid.
- STATUS.HTTP_ERROR: If the controller responded with an error
status code.
-
to_json()¶ Returns JSON representation of this object.
-
to_string()¶ Returns string representation of this object.
-
update_firewall_instance_rule(fwInstance, fwRule)¶