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

Clone adom #34

Open
moustic999 opened this issue Sep 20, 2023 · 1 comment
Open

Clone adom #34

moustic999 opened this issue Sep 20, 2023 · 1 comment

Comments

@moustic999
Copy link

here is a new method that could be integrated which allow to clone an adom into a new one

def clone_adom(self, name):
"""
clone existing adom from the FortiManager into a new one
:param name: name of the new adom
:return: Response of status code with data in JSON Format
"""
payload = {
"method": "clone",
"params": [
{
"url": f"/dvmdb/adom/{self.adom}",
"data": {
"name": f"{name}"
}
}
]
}
payload.update({"session": self.sessionid})
clone_adom = self.session.post(url=self.base_url, json=payload)
return clone_adom.json()

@akshaymane920
Copy link
Owner

Great!, Can you verify in your test lab and check if working well, Please create a PR for this, if all okay We can include this.

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

2 participants