Documentation
¶
Overview ¶
Palo Alto SSH includes all things relate to Palo Alto devices using SSH
Index ¶
- func ParseActionFromPolicyMatch(s string) (string, error)
- func ParseInterfaceFromFIB(s string) (string, error)
- func ParseZoneFromInterface(s string) (string, error)
- func ShowInterfaceCmd(Intrfc string) string
- func TestRouteFibLookupCmd(vr, dip string) string
- func TestSecurityPolicyMatchCmd(cfg [7]string) (result string, err error)
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseActionFromPolicyMatch ¶
ParseActionFromPolicyMatch gets an XML then parses it and returns to get only the Action part of given Test Security Policy Match result
func ParseInterfaceFromFIB ¶
ParseInterfaceFromFIB gets an XML then parses it and returns to get only interface name.
func ParseZoneFromInterface ¶
ParseZoneFromInterface gets an XML then parses it and returns to get only Zone name of the given interface.
func ShowInterfaceCmd ¶
ShowInterfaceCmd generates the command 'show interface <interface>' on the given <interface>. Intrfc is Interface Name
Example ¶
cmd := ShowInterfaceCmd("ae1.1345") fmt.Println(cmd)
Output: show interface ae1.1345
func TestRouteFibLookupCmd ¶
TestRouteFibLookupCmd generates the command 'test routing fib-lookup virtual-router <virtual-router> ip <ip-address>' on the given <virtual-router> and <ip-address>. This function gets: dip is Destination IP vr is Virtual Router
Example ¶
cmd := TestRouteFibLookupCmd("default", "192.168.1.1") fmt.Println(cmd)
Output: test routing fib-lookup virtual-router default ip 192.168.1.1
func TestSecurityPolicyMatchCmd ¶
TestSecurityPolicyMatchCmd generates the command ' test security-policy-match protocol 6 from <source-zone> to <destination-zone> source <source-ip-address> destination <destination-ip-address> destination-port <destination-port> application <application-name>. This function gets cfg which is an 7-cell array in which: cfg[0] is Protocol Number (e.g. 6) cfg[1] is Source Zone cfg[2] is Destination Zone cfg[3] is Source IP cfg[4] is Destination IP cfg[5] is Destination Port cfg[6] is Application
Example ¶
// cfg[0] is Protocol Number (e.g. 6) // cfg[1] is Source Zone // cfg[2] is Destination Zone // cfg[3] is Source IP // cfg[4] is Destination IP // cfg[5] is Destination Port // cfg[6] is Application var cfg [7]string cfg[0] = "6" cfg[1] = "ZONE1" cfg[2] = "ZONE2" cfg[3] = "192.168.0.1" cfg[4] = "172.16.0.1" cfg[5] = "22" cfg[6] = "ssh" cmd, _ := TestSecurityPolicyMatchCmd(cfg) fmt.Println(cmd)
Output: test security-policy-match protocol 6 from ZONE1 to ZONE2 source 192.168.0.1 destination 172.16.0.1 destination-port 22 application ssh
Types ¶
This section is empty.