Skip to content

0.5.6 | Getting error when GET vdom=* or vdom=vd_1,vd_2,etc. #7

@jpforcioli

Description

@jpforcioli

Hi,

When the GET request is for something?vdom=* or something?vdom=vd_1,vd_2, we're getting the following
error message:

Response parser error: <class 'TypeError'> list indices must be integers or slices, not str

Test script:

"""
Test GET for multiple VDOMs
"""

from pyFGT.fortigate import FortiGate

IP = "10.210.34.121"
APIKEY = "r3487ymqG90sjr1GybdNbqtw5Q6jc8"

with FortiGate(
    IP,
    apikey=APIKEY,
    disable_request_warnings=True,
) as fgt:

    fgt.debug = True
    fgt.get(
        "cmdb/firewall/address",
#        "vdom=*",
        "vdom=root,vd_001"
    )
    fgt.debug = False

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions