pyFortimanagerAPI icon indicating copy to clipboard operation
pyFortimanagerAPI copied to clipboard

Clone adom

Open moustic999 opened this issue 1 year ago • 1 comments

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()

moustic999 avatar Sep 20 '23 08:09 moustic999