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 source interface parameter to ios_logging #49766
Conversation
@FedericoOlivieri, just so you are aware we have a dedicated Working Group for network. |
The test
|
The test
|
The test
|
@FedericoOlivieri Thanks a lot for this feature PR. The same option is defined as the |
for consistency with nxos module
@NilashishC I have updated the code as required. I have noticed 2 things that they don't work as expected and I might need for you support because I cannot figure out what is wrong:
|
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.
@FedericoOlivieri There appears to be a couple of different issues with the changes you made. Have a look at https://www.diffchecker.com/776O6EV0. I have made the required changes for this parameter to be idempotent.
Also, please note that configuring a logging interface should be a separate task and should not be combined with other parameters such as host
in order for the module to function properly(i.e, be idempotent).
A brief example would be:
tasks:
- name: Configure Interface
ios_logging:
interface: GigabitEthernet0/1
state: present
- name: Configure Host
ios_logging:
dest: host
name: 8.8.8.8
state: present
Edit: A comment below demonstrates the same with aggregate
.
@NilashishC Thanks for your help. Just a question as I cannot figure out from the code: why the source interface has to be put in a separate task and not with the others? |
@FedericoOlivieri The way the module currently works is - the So for the following output of
If we specify host and interface configurations in the same task(without using aggregate),
In essence, that would be a single dictionary with both the configurations. Evidently, in this scenario, idempotency would not be preserved. A better approach to this would be using
|
Thanks for the explanation. :) |
@FedericoOlivieri It would be great if you could make the suggested changes so that we can go ahead and merge this PR. Thanks! |
@NilashishC Which changes are we talking about? I understand you amended the code :) Is that right? |
@FedericoOlivieri Actually, I did not amend the code. Based on your work, I pointed to the places which needs changes. A commit including those changes and some tests would be great! |
@FedericoOlivieri Greetings, just checking in on this - are you still supporting this PR? If so please let us know, else we will close this. Thanks! |
@FedericoOlivieri This pullrequest is waiting for your response. Please respond or the pullrequest will be closed. |
SUMMARY
Add arguments to support source interface for logging host
ISSUE TYPE
COMPONENT NAME
ios_logging