Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug-08062022-2 "create-address-from-file", force group = yes, rewrite = yes #588

Open
nexusops opened this issue Jun 8, 2022 · 2 comments
Labels
invalid This doesn't seem right

Comments

@nexusops
Copy link
Contributor

nexusops commented Jun 8, 2022

Describe the bug

source file for the object creation contains the following. These objects already exist in the config
obj-8.8.8.8,6.6.6.6,main-range-1
obj-10.10.10.10,80.80.80.0/25,main-range-1

the script correctly creates SET commands to overwrite the two objects
set address "obj-8.8.8.8" ip-netmask 6.6.6.6/32
set address "obj-10.10.10.10" ip-netmask 80.80.80.0/25

however, it also creates DELETE commands to remove the old objects
delete address "obj-8.8.8.8" ip-netmask 8.8.8.8
delete address "obj-10.10.10.10" ip-netmask 10.10.10.10

these commands are not required, because the SET commands above replace the old object values, meaning objects with the old values no longer exist

Expected behavior

Do not generate the DELETE commands when object values are overwritten with SET commands

additional information shared via Slack

@nexusops nexusops added the bug Something isn't working label Jun 8, 2022
@swaschkut swaschkut added invalid This doesn't seem right and removed bug Something isn't working labels Jun 9, 2022
@swaschkut
Copy link
Contributor

until now, I see this as a cosmetically issue.

sending the following set command:

admin@PA-300-1# delete address "obj-8.8.8.8" ip-netmask 8.8.8.8
Invalid syntax.
[edit]                                                                                                                                                                            
admin@PA-300-1# delete address "obj-10.10.10.10" ip-netmask 10.10.10.10
Invalid syntax.

given back "Invalid syntax."

I am keeping this issue open, but I am setting it as 'invalid' not as 'bug'

@swaschkut
Copy link
Contributor

other example if field is not of same string:

admin@PA-300-1# delete rulebase security rules "test1" description test1
Invalid syntax.

Rule description was earlier set to a different value:
set rulebase security rules "test1" description "test1|test2 |sven2|test3 |sven3"

//This is from type=rule-merger if description from multiple rules get merged, and later on for each rule the description is planned to be deleted

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

2 participants