Skip to content

Commit

Permalink
Remove config type diff
Browse files Browse the repository at this point in the history
  • Loading branch information
David Cruz committed Sep 18, 2024
1 parent 7769c6a commit 31c89ad
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 12 deletions.
5 changes: 0 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 3 additions & 7 deletions cmd/firewall/get_config_xml.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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)
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit 31c89ad

Please sign in to comment.