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

Support for policies #122

Open
elijahgagne opened this issue May 17, 2017 · 4 comments
Open

Support for policies #122

elijahgagne opened this issue May 17, 2017 · 4 comments

Comments

@elijahgagne
Copy link
Contributor

I am interested in adding support for policies. They are managed at https://localhost/mgmt/tm/ltm/policy/.

I've written a few functions to manage policies that are specific to my use cases. I'd be willing to make that generic and fill out the areas I haven't covered yet. This might result in creating the following functions

New-Policy
Get-Policy
Set-Policy
Remove-Policy

New-PolicyRule
Get-PolicyRule
Set-PolicyRule
Remove-PolicyRule

New-PolicyRuleAction
Get-PolicyRuleAction
Set-PolicyRuleAction
Remove-PolicyRuleAction

New-PolicyRuleCondition
Get-PolicyRuleCondition
Set-PolicyRuleCondition
Remove-PolicyRuleCondition

Would this be worth working on?

@joel74
Copy link
Owner

joel74 commented May 20, 2017

Hi, Elijah, it sounds like a good addition to the module, but I'm not experienced enough with policies to say one way or another if this is the best way to structure the functions or not. It looks like actions and conditions are tied to policy rules, but I'm guessing that it would be simpler to define a rule action or condition and assign it to a policy rule, than to modify a policy rule and in the process have to create actions and conditions. But again, this is not my area of expertise. If someone else wants to weigh in, please do.

@kleinsmk
Copy link

@elijahgagne

I've got a few generic ASM policy functions I wrote as well for getting and setting portions of existing policies. Would you be able to share you code / provide insight on how you got them to work in the existing f5-ltm framework?

@elijahgagne
Copy link
Contributor Author

@kleinsmk https://gist.github.com/elijahgagne/a962ad36ec9244de87c5dd1e1bbdcf1c shows what I've been using. That code expects a credential instead of using the F5Session like this module. That gist may disappear in a few days.

@kleinsmk
Copy link

@elijahgagne Thanks a ton. It's nice to not have to rewrite some of these. I've got no idea why F5 hasn't provided these for APM, ASM and other large portions of in their python SDK. It isn't too terribly hard to figure out the JSON object required to use the REST API but its a lot nicer to have native cmdlets.

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

No branches or pull requests

3 participants