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

Add validation if proper x-constraint name not specified #528

Open
alakendu opened this issue Apr 26, 2022 · 0 comments
Open

Add validation if proper x-constraint name not specified #528

alakendu opened this issue Apr 26, 2022 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@alakendu
Copy link
Contributor

alakendu commented Apr 26, 2022

Version information
https://github.com/open-traffic-generator/snappi-ixnetwork/releases/tag/v0.7.8

Describe the bug
x-constraint will use to identify referential integrity targets. User may specify any string without following grammar. It will better to validate if that is string is proper x-constraint

We need validation as ipv4_name set as p1_eth1.name which is invalid

p1_d1 = config.devices.device(name='p1_d1')[-1]
p1_eth1 = p1_d1.ethernets.ethernet(port_name="p1")[-1]
p1_eth1.name = 'p1_eth1'
p1_ip1 = p1_eth1.ipv4_addresses.ipv4(name='p1_ip1',
                                     address='20.20.20.2',
                                     gateway='20.20.20.1')[-1]
p1_bgp = p1_d1.bgp
p1_bgp_iface = (p1_bgp.ipv4_interfaces
                .v4interface(ipv4_name=p1_eth1.name)[-1])

To Reproduce
This will end up with several exception which will not pinpoint exact issue.

Expected behavior
solution should raise exception for incorrect x-constraint

Additional context
It will better if we incorporate similar validation within snappi and gosnappi

@alakendu alakendu added the bug Something isn't working label Apr 26, 2022
@alakendu alakendu changed the title Add validation if proper x-constraint name specified Add validation if proper x-constraint name not specified Apr 26, 2022
@indraniBh indraniBh assigned indraniBh and dipendughosh and unassigned indraniBh Nov 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants