-
Notifications
You must be signed in to change notification settings - Fork 23.7k
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
Devel ios vrf submode #41659
Devel ios vrf submode #41659
Conversation
The test
The test
|
The test
The test
|
3e3626a
to
a944249
Compare
The test
|
5c7452a
to
101beed
Compare
The test
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good
subcfg = '\n'.join(subcfg.children) | ||
matches = re.findall(r'route-target\s+export\s+(.+)', subcfg, re.M) | ||
return matches | ||
except KeyError: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In case of KeyError, why are you returning empty list. If nothing specific, can you please use pass
as used in other Ansible modules as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello @justjais
OK done, I was testing the len() of the export_match and the import_match this is why I returned a list. However I changed this and used pass like you asked me.
Thanks for your support.
matches = re.findall(r'route-target\s+import\s+(.+)', subcfg, re.M) | ||
return matches | ||
except KeyError: | ||
return [] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above: In case of KeyError, empty list returned.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello @justjais
OK done, I was testing the len() of the export_match and the import_match this is why I returned a list. However I changed this and used pass like you asked me.
Thanks for your support.
subcfg = '\n'.join(subcfg.children) | ||
matches = re.findall(r'route-target\s+export\s+(.+)', subcfg, re.M) | ||
return matches | ||
except KeyError: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above: In case of KeyError, empty list returned.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello @justjais
OK done, I was testing the len() of the export_match and the import_match this is why I returned a list. However I changed this and used pass like you asked me.
Thanks for your support.
set_module_args(dict(name='test_8', rd='5:100', route_both=['3:100', '4:100'], route_export=['3:100', '4:100'])) | ||
self.execute_module(failed=True) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please let me know of the context for this change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello @justjais
you can use all the options [export *, import *, both *] in the same task. There is no more option that is exclusive. This is the way you can configure a router in BGP mode.
…nfiguration we have a list with 2 entries (import, export) while the input parameter has only one parameter which will be applied twice
…e remaining imdepotent. During the first implementation we did not take this into account, which did not correspond to the reality of the needs in production (to be able to use each parameter indifemently together)
ae533b4
to
42766cd
Compare
@clementtrebuchet Thank you! |
SUMMARY
This PR include 3 changes:
Fixes:
ISSUE TYPE
COMPONENT NAME
ios_vrf
ANSIBLE VERSION
ADDITIONAL INFORMATION