I'm working on adding ~85 networks into an group. Some of the networks may already exist, and I'm OK with the duplicate for this process.
If I use SmartConsole CLI to add the group and networks below, some fail when they are already present with the same subnet/mask. In SmartConsole if I manually create the same network I am able to accept the use of more than one network with the same network/mask combination and move forward.
My question is, how can we accept the use of another network/subnet with a different name to be created and accepted, just like we would in SmartConsole by manually creating the network? Basically when the validation fails with the 1 warning, the network object never gets created or added to the group. I'm looking for some sort of an "accept warning" flag to create the new network in the script even if one exists already with a different name.
> add group name CORE_NETWORKS
> add network name network_10.2.15.0_b27 subnet 10.2.15.0 mask-length 27 groups CORE_NETWORKS
> add network name network_10.2.1.0_b24 subnet 10.2.1.0 mask-length 24 groups CORE_NETWORKS
code: "err_validation_failed"
message: "Validation failed with 1 warning"
warnings:
- message: "More than one network have the same IP 10.2.1.0/255.255.255.0"
> add network name network_10.2.6.0_b24 subnet 10.2.6.0 mask-length 24 groups CORE_NETWORKS
code: "err_validation_failed"
message: "Validation failed with 1 warning"
warnings:
- message: "More than one network have the same IP 10.2.6.0/255.255.255.0"
> add network name network_10.2.7.0_b24 subnet 10.2.7.0 mask-length 24 groups CORE_NETWORKS
From the commands above, just for testing and to articulate this in a post, the group is created. Out of the 4x networks attempted to be created only 2x are and added to the group.
![Capture.JPG Capture.JPG](https://community.checkpoint.com/t5/image/serverpage/image-id/2648i278C2FF4AFEFB04E/image-size/large?v=v2&px=999)