-
Notifications
You must be signed in to change notification settings - Fork 38
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
Added VIPGRP functions matching *-AddressGroup* #89
Conversation
Thanks !, it will make a quick review, do you have try all cmdlet ? |
Yes, I've tested the full cmdlet suite. Not extensively, but I've done tests on everything on my FW setup. I've made amendments based on changes requested, but I am not familiar with whether these changes have now been re-submitted into this for approval again or if my "request review" has just been done on the older commit? I saw it re-do the automated checks so I assume at some level those updates have made it here. (sorry for being such a newbie on github and contributions) |
Thanks Brett ! it will make some test (i think no before next week) You can also update README.(md) for add example ;-) There is no yet unit test (but it is on my roadmap for next release...) |
Thanks, i will try this week ! |
[string]$name, | ||
[Parameter (Mandatory = $true)] | ||
[string[]]$member, | ||
[Parameter (Mandatory = $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.
interface is really needed ?
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 check the API docs to confirm it's shown as mandatory there? I am pretty sure that you can't define it without a bound interface via GUI/CLI... just checked and confirmed that Interface is required:
config firewall vipgrp
edit "Brett_Test"
(Brett_Test) # next
Attribute 'interface' MUST be set.
Command fail. Return code 1
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.
it is no specified on API :-/
after, we can use the same idea like for VIP cmdlet (and also GUI), set any by default https://github.com/FortiPower/PowerFGT/blob/master/PowerFGT/Public/cmdb/firewall/vip.ps1#L49
} | ||
$vipgrp | add-member -name "member" -membertype NoteProperty -Value $members | ||
|
||
if ( $PsBoundParameters.ContainsKey('interface') ) { |
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.
if interface is really needed, you need to remove this if
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.
OK, but functionally it works, because there always will be an interface, this tests true always.
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.
(so a more correct statement would be "if interface is really needed, you should remove this redundant if")
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.
amendment complete
d04ddc0
to
aa5e8ec
Compare
Hi @poundy can you look if it is ok for you ? (i have some test and fix some issue found with when write test...) @CedricMoreau, can look review too ? |
Just commenting in here because I am kind of stuck at the moment, not really understanding the push-pull status here on what I can use to test. |
Hi @poundy, i prepare to merge soon this patch (and why i have fix a typo and rebase change!) |
I am happy to load again and add to my (production) tests if that helps; I have been using it in the original form I originally committed although vipgrps aren't something I create a lot of! |
README.md
Outdated
@@ -21,6 +21,7 @@ With this module (version 0.4.1) you can manage: | |||
- System Global (Get) | |||
- [VDOM](#VDOM) (Get) | |||
- [Virtual IP](#Virtual-IP) (Get/Add/Remove object type static-nat) | |||
- VirtualIPGroup (Add/Get/Copy/Set/Remove and Add/Remove Member) |
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.
Use the same format as the one above
Added example for backing up the configuration
Initial commit; untested
Added Confirm-FGTVipGroup for VipGroup operations
AddFGTFirewallVipGroup requires interface in creation
revert unnecessary change
Feedback from PR
Updated base readme.md with VIPGRP related functions list. Did not expand on use caes for vipgrp.
updated based on mandatory INTERFACE property, nullifying the need for a test
and also it is not a string array for interface
Thanks @poundy and sorry for delay ;-) |
No description provided.