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

Implement Locking/Unlocking adom #17

Closed
dasTor opened this issue Aug 16, 2022 · 0 comments · Fixed by #23
Closed

Implement Locking/Unlocking adom #17

dasTor opened this issue Aug 16, 2022 · 0 comments · Fixed by #23

Comments

@dasTor
Copy link
Contributor

dasTor commented Aug 16, 2022

Hey,

thanks for your library. I am currently using an extension, which others may also use:

def un_or_lock_adom(method):
    url = "/dvmdb/adom/{}/workspace/{}".format(fortimngr.adom, method)

    payload = \
        {
            "method": "exec",
            "params":
                [
                    {
                        "url": url
                    }
                ],
        }

    fortimngr.custom_api(payload)

def lock_adom():
    return un_or_lock_adom("lock")

def unlock_adom():
    return un_or_lock_adom("unlock")

Maybe the lock and unlock methods would be useful on the FortiManager object?

dasTor added a commit to dasTor/pyFortimanagerAPI that referenced this issue Jan 9, 2023
add:
- lock_adom
- unlock_adom

when using workspace mode, an adom has to be locked to
make any changes to objects or policies

Closes akshaymane920#17
akshaymane920 added a commit that referenced this issue Jan 15, 2023
lock_adom and unlock_adom #17
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.

1 participant