From 31c89add26dd83f7f48b6ee58edb6506be8b24d7 Mon Sep 17 00:00:00 2001 From: David Cruz Date: Wed, 18 Sep 2024 13:34:36 -0700 Subject: [PATCH] Remove config type diff --- README.md | 5 ----- cmd/firewall/get_config_xml.go | 10 +++------- 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 5450ea4..79c7687 100644 --- a/README.md +++ b/README.md @@ -114,11 +114,6 @@ Print effective running configuration at specified XPath: ```sh > panos-cli firewall get config xml --type "effective-running" --xpath "mgt-config" fw01.example.com ``` - -Print running and candidate configuration differences: -```sh -> panos-cli firewall get config xml --type "diff" fw01.example.com -``` ### *panos-cli firewall run commands* (Linux and macOS only) Execute the `show system info` and `show arp all` commands on fw01.example.com: ```sh diff --git a/cmd/firewall/get_config_xml.go b/cmd/firewall/get_config_xml.go index 124bdc7..a1901a3 100644 --- a/cmd/firewall/get_config_xml.go +++ b/cmd/firewall/get_config_xml.go @@ -53,11 +53,7 @@ Examples: # Print effective running configuration at specified XPath: - > panos-cli firewall get config xml --type 'effective-running' --xpath 'mgt-config' fw01.example.com - - # Print running and candidate configuration differences: - - > panos-cli firewall get config xml --type 'diff' fw01.example.com`, + > panos-cli firewall get config xml --type 'effective-running' --xpath 'mgt-config' fw01.example.com`, Run: func(cmd *cobra.Command, args []string) { // Ensure at least one host is specified hosts = cmd.Flags().Args() @@ -79,7 +75,7 @@ Examples: } } - if !slices.Contains([]string{"candidate", "diff", "effective-running", "merged", "pushed-shared-policy", "pushed-template", "running", "synced", "synced-diff"}, configType) { + if !slices.Contains([]string{"candidate", "effective-running", "merged", "pushed-shared-policy", "pushed-template", "running", "synced", "synced-diff"}, configType) { cmd.Help() fmt.Printf("\ninvalid configuration type\n") os.Exit(1) @@ -146,7 +142,7 @@ func init() { getConfigXmlCmd.Flags().StringVar(&user, "user", user, "PAN admin user") getConfigXmlCmd.Flags().StringVar(&password, "password", password, "password for PAN user") getConfigXmlCmd.Flags().StringVarP(&xpath, "xpath", "x", ".", "xpath of the node to retrieve (for use with configuration types 'effective-running' and 'running')") - getConfigXmlCmd.Flags().StringVarP(&configType, "type", "t", "running", "type of configuration to retrieve (candidate, diff, effective-running, merged, pushed-shared-policy, pushed-template, running, synced, synced-diff)") + getConfigXmlCmd.Flags().StringVarP(&configType, "type", "t", "running", "type of configuration to retrieve (candidate, effective-running, merged, pushed-shared-policy, pushed-template, running, synced, synced-diff)") } func getConfigXml(ch chan<- configuration, fw string, userFlagSet bool, xpath string) {