-
-
Notifications
You must be signed in to change notification settings - Fork 12
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
changing ip_address param to expect list #246
Conversation
Hello, very first time attempting to contribute, please don't be shy to let me know if I missed performing something correctly in the contribution process. Thanks for your work! |
I think you will need to update the type of the subnet_mask too. |
I think you are right that the change will be needed there as well. I do not have a use case to test that change and left it out of my request due to that |
Hi @daarrn ! Thank you for the pull request. I'll try to take a look at it this weekend and provide feedback. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #246 +/- ##
===========================================
- Coverage 100.00% 93.69% -6.31%
===========================================
Files 33 64 +31
Lines 106 2205 +2099
===========================================
+ Hits 106 2066 +1960
- Misses 0 139 +139
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
@daarrn I tested this on a couple of VMs on my laptop on two different subnets with different subnet masks, and I can confirm you would have to change the subnet mask parameter to a list too. |
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 addition to the comments:
- The documentation in
plugins\modules\ag_listener.py
will need to be updated to match the type changes (failed sanity check here). - Can you update the tests to use lists in addition to single strings (
tests\integration\targets\win_ag_listener\tasks\main.yml
)
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.
I think you will need to update the type of the subnet_mask too.
I think you are right that the change will be needed there as well. I do not have a use case to test that change and left it out of my request due to that
Yeah, all three of these should be lists to be consistent with the inputs in DBATools:
- IP Address
- Subnet IP
- Subnet Mask
most recent commit contains changes to include all parameters expecting lists to be defined as lists
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.
ip_address = @{type = 'list'; elements='str'; required = $false }
Per the [sanity check](https://github.com/lowlydba/lowlydba.sqlserver/actions/runs/9006650802/job/25120714271?pr=246#step:4:935), the [type of elements](https://github.com/ansible/ansible/pull/66386#issuecomment-589717074) should be specified too (I assume this is the right syntax, but verify)
most recent commit includes defining the element type when using list
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.
- fixed the expected type of the ip_address, subnet_ip, and subnet_mask parameters to be lists instead of strings (lowlydba.sqlserver.ag_listener)
added suggested changes
…ng element type 2) updated fragment to be inclusive of all changes
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.
The sanity checks are still failing due to the list changes not being updated in the ag_listener.py
documentation file.
whoops, yup. Updated document file, thank you! |
Docs Build 📝Thank you for contribution!✨ This PR has been merged and the docs are now incorporated into |
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 as far as passing tests, just missing using the lists the tests:
- Can you update the tests to use lists in addition to single strings (
tests\integration\targets\win_ag_listener\tasks\main.yml
)
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.
@lowlydba I updated the tests as well as some examples of the command call to properly use lists instead of single strings or comma separated strings
Looks great! Thanks again for the enhancement, this is a very nice upgrade. |
Description
changing spec options, ip_address parameter is being changed from a 'str' type to a 'list' type
fixes issue #245
How Has This Been Tested?
validated the change using a local collection of lowlydba and was able to successfully create a multi subnet ag listener when the ip_address parameter was expecting a list
Types of changes
Checklist:
version_added
property.