Skip to content

Commit f1a71ad

Browse files
committed
examples
1 parent 784fe27 commit f1a71ad

File tree

13 files changed

+5
-39
lines changed

13 files changed

+5
-39
lines changed

docs/fortigateapi/FortiGate.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ Usage
3535
USERNAME = "username"
3636
PASSWORD = "password"
3737
38-
fgt = FortiGate(host=HOST, username=USERNAME, password=PASSWORD)
38+
fgt = FortiGate(host=HOST, username=USERNAME, password=PASSWORD, logging_error=True)
3939
fgt.login() # login is optional
4040
4141
# FortiGate.post() - Create fortigate-object in the Fortigate

docs/fortigateapi/FortiGateAPI.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Usage
3030
USERNAME = "username"
3131
PASSWORD = "password"
3232
33-
api = FortiGateAPI(host=HOST, username=USERNAME, password=PASSWORD)
33+
api = FortiGateAPI(host=HOST, username=USERNAME, password=PASSWORD, logging_error=True)
3434
api.login() # login is optional
3535
3636
# Create address in the Fortigate

docs/fortigateapi/cmdb/firewall/address.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ Usage
4141
USERNAME = "username"
4242
PASSWORD = "password"
4343
44-
api = FortiGateAPI(host=HOST, username=USERNAME, password=PASSWORD)
44+
api = FortiGateAPI(host=HOST, username=USERNAME, password=PASSWORD, logging_error=True)
4545
api.login() # login is optional
4646
4747
# Create address in the Fortigate

docs/fortigateapi/cmdb/firewall/addrgrp.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ Usage
3737
USERNAME = "username"
3838
PASSWORD = "password"
3939
40-
api = FortiGateAPI(host=HOST, username=USERNAME, password=PASSWORD)
40+
api = FortiGateAPI(host=HOST, username=USERNAME, password=PASSWORD, logging_error=True)
4141
api.login() # login is optional
4242
4343
# Creates address and address-group in the Fortigate

docs/fortigateapi/cmdb/firewall/ippool.rst

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,8 @@ Usage
2323
- Check for presence of ip-pool in the Fortigate
2424
"""
2525
26-
import logging
27-
2826
from fortigate_api import FortiGateAPI
2927
30-
logging.getLogger().setLevel(logging.DEBUG)
31-
3228
HOST = "host"
3329
USERNAME = "username"
3430
PASSWORD = "password"

docs/fortigateapi/cmdb/firewall/policy.rst

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,18 +29,15 @@ Usage
2929
- Check for absence of policy in the Fortigate
3030
"""
3131
32-
import logging
3332
from pprint import pprint
3433
3534
from fortigate_api import FortiGateAPI
3635
37-
logging.getLogger().setLevel(logging.DEBUG)
38-
3936
HOST = "host"
4037
USERNAME = "username"
4138
PASSWORD = "password"
4239
43-
api = FortiGateAPI(host=HOST, username=USERNAME, password=PASSWORD)
40+
api = FortiGateAPI(host=HOST, username=USERNAME, password=PASSWORD, logging_error=True)
4441
4542
api.login() # login is optional
4643

docs/fortigateapi/cmdb/firewall_ipmacbinding/table.rst

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,8 @@ Usage
2323
- Check for absence of table in the Fortigate
2424
"""
2525
26-
import logging
27-
2826
from fortigate_api import FortiGateAPI
2927
30-
logging.getLogger().setLevel(logging.DEBUG)
31-
3228
HOST = "host"
3329
USERNAME = "username"
3430
PASSWORD = "password"

docs/fortigateapi/cmdb/system/external_resource.rst

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,8 @@ Usage
2323
- Checks for absence of external_resource in the Fortigate
2424
"""
2525
26-
import logging
27-
2826
from fortigate_api import FortiGateAPI
2927
30-
logging.getLogger().setLevel(logging.DEBUG)
31-
3228
HOST = "host"
3329
USERNAME = "username"
3430
PASSWORD = "password"

docs/fortigateapi/cmdb/system/interface.rst

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,10 @@ Usage
2323
- Check for presence of interface in the Fortigate
2424
"""
2525
26-
import logging
2726
from pprint import pprint
2827
2928
from fortigate_api import FortiGateAPI
3029
31-
logging.getLogger().setLevel(logging.DEBUG)
32-
3330
HOST = "host"
3431
USERNAME = "username"
3532
PASSWORD = "password"

docs/fortigateapi/cmdb/system/vdom.rst

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,10 @@ Usage
2222
- Check for presence of vdom in the Fortigate
2323
"""
2424
25-
import logging
2625
from pprint import pprint
2726
2827
from fortigate_api import FortiGateAPI
2928
30-
logging.getLogger().setLevel(logging.DEBUG)
31-
3229
HOST = "host"
3330
USERNAME = "username"
3431
PASSWORD = "password"

0 commit comments

Comments
 (0)