Skip to content

Commit

Permalink
latest version on pip
Browse files Browse the repository at this point in the history
  • Loading branch information
akshaymane920 committed Oct 15, 2023
1 parent 98b959d commit b947388
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 19 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
setup(
name='pyFortiManagerAPI',
description='A Python wrapper for the FortiManager REST API',
version='0.2.1',
version='0.2.2',
py_modules=["pyFortiManagerAPI"],
package_dir={'': 'src'},
keywords=['FortiManager', 'RestAPI', 'API', 'FortiGate', 'Fortinet', "python", "FortiManager API",
Expand Down
18 changes: 0 additions & 18 deletions src/pyFortiManagerAPI.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
__author__ = "Akshay Mane"
__author__ = "Mathieu Millet"

import json
import os
Expand Down Expand Up @@ -967,23 +966,6 @@ def get_policies_assigned_to_device(self, device, vdom):
return req.json()["result"]

# Firewall Interfaces
def get_device_interfaces(self, device):
"""
Get interface details from the devices.
:param device: Specify name of the device.
"""
session = self.login()
payload = \
{
"method": "exec",
"params": [
{"url": "sys/proxy/json",
"data": {"target": [f"adom/{self.adom}/device/{device}"], "action": "get",
"resource": "/api/v2/monitor/system/interface/select?&global=1&include_vlan=1"}}]}
payload.update(session=self.sessionid)
get_interfaces = session.post(url=self.base_url, json=payload, verify=self.verify)
return get_interfaces.json()["result"]

def get_interfaces(self, device):
session = self.login()
payload = {"method": "get", "params": [{"url": f"pm/config/device/{device}/global/system/interface"}]}
Expand Down

0 comments on commit b947388

Please sign in to comment.