akshaymane920 / pyFortimanagerAPI

A wrapper for FortiManager API
https://akshaymane920.github.io/pyFortimanagerAPI/
MIT License
31 stars 34 forks source link

Clone adom #34

Open moustic999 opened 1 year ago

moustic999 commented 1 year ago

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 commented 1 year ago

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.