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

Allow unnamed Firewall Policy #75

Closed
chrisvanmeer opened this issue Feb 1, 2020 · 7 comments · Fixed by #78 or #165
Closed

Allow unnamed Firewall Policy #75

chrisvanmeer opened this issue Feb 1, 2020 · 7 comments · Fixed by #78 or #165

Comments

@chrisvanmeer
Copy link

Hi, could you please make the firewall policy name not required? Or let me know how to disable the name property from being required

@alagoutte
Copy link
Contributor

Hi,

Yes, for the moment, the policy name is required...

You can try to set mandatory to false here https://github.com/FortiPower/PowerFGT/blob/master/PowerFGT/Public/cmdb/firewall/policy.ps1#L65

Remove check test https://github.com/FortiPower/PowerFGT/blob/master/PowerFGT/Public/cmdb/firewall/policy.ps1#L115

and comment add the name of on policy https://github.com/FortiPower/PowerFGT/blob/master/PowerFGT/Public/cmdb/firewall/policy.ps1#L158

it will look for next release to add support of unnamed policy

@alagoutte alagoutte changed the title Firewall policy name Allow unnamed Firewall Policy Feb 2, 2020
@alagoutte
Copy link
Contributor

it is working ?

@chrisvanmeer
Copy link
Author

Well, I am a beginning Powershell scripter, I don't know how to modify an existing module (I installed your Module through psgallery) and use it locally. For now I fix it by using a counter and using that in the name.

@alagoutte
Copy link
Contributor

Well, I am a beginning Powershell scripter, I don't know how to modify an existing module (I installed your Module through psgallery) and use it locally. For now I fix it by using a counter and using that in the name.

Ok, you need to modified directly module :
C:\Users\MyUser\Documents\WindowsPowerShell\Modules

(Replace MyUser by your user)

@chrisvanmeer
Copy link
Author

Thanks, for me the location is /root/.local/share/powershell/Modules (running my code inside of a VSCode Powershell container). Modifying the files you said worked, but has to be redone after a container rebuild in this setup.

@alagoutte
Copy link
Contributor

alagoutte commented Feb 4, 2020

Thanks, for me the location is /root/.local/share/powershell/Modules (running my code inside of a VSCode Powershell container). Modifying the files you said worked, but has to be redone after a container rebuild in this setup.

Yes...
the container is public ?

i will make change for next release

@alagoutte
Copy link
Contributor

alagoutte commented May 14, 2020

Reopen because i found a issue with policy return...

and i need to write Tests for this case...

@alagoutte alagoutte reopened this May 14, 2020
alagoutte added a commit to alagoutte/PowerFGT that referenced this issue Feb 28, 2022
alagoutte added a commit that referenced this issue Mar 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants