Skip to content

system

System objects

ALLOW_ACCESS_TYPE module-attribute #

ALLOW_ACCESS_TYPE = Literal[
    "https",
    "ping",
    "ssh",
    "snmp",
    "http",
    "telnet",
    "fgfm",
    "auto-ipsec",
    "radius-acct",
    "probe-response",
    "capwap",
    "dnp",
    "ftm",
    "fabric",
    "speed-test",
    "icond",
]

ENABLE_DISABLE module-attribute #

ENABLE_DISABLE = Literal['disable', 'enable']

INTERFACE_BFD_TYPE module-attribute #

INTERFACE_BFD_TYPE = Literal['global', 'enable', 'disable']

INTERFACE_MODE_TYPE module-attribute #

INTERFACE_MODE_TYPE = Literal['static', 'dhcp', 'pppoe', 'pppoa', 'ipoa', 'eoa']

INTERFACE_ROLE_TYPE module-attribute #

INTERFACE_ROLE_TYPE = Literal['lan', 'wan', 'dmz', 'undefined']

INTERFACE_SPEED_TYPE module-attribute #

INTERFACE_SPEED_TYPE = Literal[
    "auto",
    "10full",
    "10half",
    "100full",
    "100half",
    "1000full",
    "1000half",
    "10000full",
    "1000auto",
    "10000auto",
    "40000full",
    "100Gfull",
    "25000full",
    "50000full",
    "40000auto",
    "25000auto",
    "100Gauto",
    "2500auto",
    "400Gfull",
    "400Gauto",
    "5000auto",
    "50000auto",
    "200Gfull",
    "200Gauto",
    "100auto",
]

INTERFACE_STATUS_TYPE module-attribute #

INTERFACE_STATUS_TYPE = Literal['down', 'up']

INTERFACE_STPFORWARD_MODE_TYPE module-attribute #

INTERFACE_STPFORWARD_MODE_TYPE = Literal['rpl-all-ext-id', 'rpl-bridge-ext-id', 'rpl-nothing']

INTERFACE_TYPE_TYPE module-attribute #

INTERFACE_TYPE_TYPE = Literal[
    "physical",
    "vlan",
    "aggregate",
    "redundant",
    "tunnel",
    "wireless",
    "vdom-link",
    "loopback",
    "switch",
    "hard-switch",
    "hdlc",
    "vap-switch",
    "wl-mesh",
    "fortilink",
    "switch-vlan",
    "fctrl-trunk",
    "tdm",
    "fext-wan",
    "vxlan",
    "emac-vlan",
    "geneve",
    "ssl",
    "lan-extension",
]

INTERFACE_VLAN_PROTO_TYPE module-attribute #

INTERFACE_VLAN_PROTO_TYPE = Literal['8021q', '8021ad']

LACP_MODE_TYPE module-attribute #

LACP_MODE_TYPE = Literal['static', 'passive', 'active']

LACP_SPEED_TYPE module-attribute #

LACP_SPEED_TYPE = Literal['slow', 'fast']

LLDP_MODE_TYPE module-attribute #

LLDP_MODE_TYPE = Literal['disable', 'enable', 'vdom']

PERMIT_DENY module-attribute #

PERMIT_DENY = Literal['deny', 'allow']

SMS_SERVER module-attribute #

SMS_SERVER = Literal['fortiguard', 'custom']

TWO_FACTOR module-attribute #

TWO_FACTOR = Literal['disable', 'fortitoken', 'email', 'sms', 'fortitoken-cloud']

TWO_FACTOR_AUTH module-attribute #

TWO_FACTOR_AUTH = Literal['fortitoken', 'email', 'sms']

TWO_FACTOR_NOTIFY module-attribute #

TWO_FACTOR_NOTIFY = Literal['email', 'sms']

DeviceInterface #

Bases: InterfaceFields, FMGObject

Interface object

Attributes:

Name Type Description
ac_name

PPPoE server name

aggregate
aggregate_type

Type of aggregation

algorithm

Frame distribution algorithm

alias Optional[str]

Alias will be displayed with the interface name to make it easier to distinguish

allowaccess Optional[Union[ALLOW_ACCESS_TYPE, List[ALLOW_ACCESS_TYPE]]]

Permitted types of management access to this interface

annex Optional[Union[ALLOW_ACCESS_TYPE, List[ALLOW_ACCESS_TYPE]]]
ap_discover Optional[Union[ALLOW_ACCESS_TYPE, List[ALLOW_ACCESS_TYPE]]]

Enable/disable automatic registration of unknown FortiAP devices

arpforward Optional[ENABLE_DISABLE]

Enable/disable ARP forwarding

atm_protocol Optional[ENABLE_DISABLE]

ATM protocol

auth_cert Optional[ENABLE_DISABLE]

HTTPS server certificate

auth_portal_addr Optional[ENABLE_DISABLE]

Address of captive portal.

auth_type Optional[ENABLE_DISABLE]

PPP authentication type to use

auto_auth_extension_device Optional[ENABLE_DISABLE]

Enable/disable automatic authorization of dedicated Fortinet extension device on this interface.

bandwidth_measure_time Optional[ENABLE_DISABLE]

Bandwidth measure time

bfd Optional[INTERFACE_BFD_TYPE]

Bidirectional Forwarding Detection (BFD) settings

bfd_desired_min_tx Optional[INTERFACE_BFD_TYPE]

BFD desired minimal transmit interval

bfd_detect_mult Optional[INTERFACE_BFD_TYPE]

BFD detection multiplier

bfd_required_min_rx Optional[INTERFACE_BFD_TYPE]

BFD required minimal receive interval

broadcast_forticlient_discovery Optional[INTERFACE_BFD_TYPE]
broadcast_forward Optional[ENABLE_DISABLE]

Enable/disable broadcast forwarding

interface Optional[Union[DeviceInterface, List[DeviceInterface], Union[str, List[str]]]]

Specify interface for operation (URL var)

color Optional[Union[DeviceInterface, List[DeviceInterface], Union[str, List[str]]]]

standardize_secondaryip #

standardize_secondaryip(value)

Accept schema subtable rows as well as the legacy address shorthand.

Source code in pyfortinet/fmg_api/system.py
@field_validator("secondaryip")
def standardize_secondaryip(cls, value):
    """Accept schema subtable rows as well as the legacy address shorthand."""
    if value is None:
        return value
    if isinstance(value, list) and all(isinstance(row, _system_interface.InterfaceSecondaryip) for row in value):
        return value
    return cls.standardize_subnet(value)

standardize_subnet #

standardize_subnet(v)

validator: x.x.x.x/y.y.y.y -> x.x.x.x/y

API use this list form: ["1.2.3.4", "255.255.255.0"] Human use this form: "1.2.3.4/24"

Source code in pyfortinet/fmg_api/system.py
@field_validator("ip", "management_ip")
def standardize_subnet(cls, v):
    """validator: x.x.x.x/y.y.y.y -> x.x.x.x/y

    API use this list form: ["1.2.3.4", "255.255.255.0"]
    Human use this form: "1.2.3.4/24"
    """
    if v is None:
        return None
    if isinstance(v, list):
        return IPv4Interface("/".join(v)).compressed
    else:
        return IPv4Interface(v).compressed

DeviceZone #

Bases: FMGObject

Device zone

SystemAdmin #

Bases: FMGObject

System administrator

Attributes:

Name Type Description
accprofile Optional[Union[str, List[str]]]
accprofile-override Optional[Union[str, List[str]]]
allow-remove-admin-session Optional[Union[str, List[str]]]
comments Optional[str]
email-to str

This administrator's email address.

force-password-change str

Enable/disable force password change on next login.

fortitoken str

This administrator's FortiToken serial number.

guest-auth str

Enable/disable guest authentication.

guest-lang str

Guest management portal language.

guest-usergroups str

Select guest user groups.

gui-default-dashboard-template str

The default dashboard template.

gui-ignore-invalid-signature-version str

FortiOS image build version to ignore invalid signature warning for.

gui-ignore-release-overview-version str

FortiOS version to ignore release overview prompt for.

history0 list(str
history1 list(str
ip6-trusthost1 str

Any IPv6 address from which the administrator can connect to the FortiGate unit. Default allows access from any IPv6 address.

ip6-trusthost2 str

Any IPv6 address from which the administrator can connect to the FortiGate unit. Default allows access from any IPv6 address.

ip6-trusthost3 str

Any IPv6 address from which the administrator can connect to the FortiGate unit. Default allows access from any IPv6 address.

ip6-trusthost4 str

Any IPv6 address from which the administrator can connect to the FortiGate unit. Default allows access from any IPv6 address.

ip6-trusthost5 str

Any IPv6 address from which the administrator can connect to the FortiGate unit. Default allows access from any IPv6 address.

ip6-trusthost6 str

Any IPv6 address from which the administrator can connect to the FortiGate unit. Default allows access from any IPv6 address.

ip6-trusthost7 str

Any IPv6 address from which the administrator can connect to the FortiGate unit. Default allows access from any IPv6 address.

ip6-trusthost8 str

Any IPv6 address from which the administrator can connect to the FortiGate unit. Default allows access from any IPv6 address.

ip6-trusthost9 str

Any IPv6 address from which the administrator can connect to the FortiGate unit. Default allows access from any IPv6 address.

ip6-trusthost10 str

Any IPv6 address from which the administrator can connect to the FortiGate unit. Default allows access from any IPv6 address.

name str

Username.

password str

Admin user password.

password-expire str

Password expire time.

peer-auth str

Set to enable peer certificate authentication (for HTTPS admin access).

peer-group str

Name of peer group defined under config user group which has PKI members. Used for peer certificate authentication (for HTTPS admin access).

radius-vdom-override str
remote-auth str

Enable/disable authentication using a remote RADIUS, LDAP, or TACACS+ server.

remote-group str

User group name used for remote auth.

schedule Optional[str]

Firewall schedule used to restrict when the administrator can log in. No schedule means no restrictions.

sms-custom-server Optional[str]

Custom SMS server to send SMS messages to.

sms-phone Optional[str]

Phone number on which the administrator receives SMS messages.

sms-server Optional[str]

Send SMS messages using the FortiGuard SMS server or a custom server.

ssh-certificate Optional[str]

Select the certificate to be used by the FortiGate for authentication with an SSH client.

ssh-public-key1 Optional[str]

Public key of an SSH client. The client is authenticated without being asked for credentials. Create the public-private key pair in the SSH client application.

ssh-public-key2 Optional[str]

Public key of an SSH client. The client is authenticated without being asked for credentials. Create the public-private key pair in the SSH client application.

ssh-public-key3 Optional[str]

Public key of an SSH client. The client is authenticated without being asked for credentials. Create the public-private key pair in the SSH client application.

trusthost1 Optional[Union[str, List[str]]]

Any IPv4 address or subnet address and netmask from which the administrator can connect to the FortiGate unit. Default allows access from any IPv4 address.

trusthost2 Optional[Union[str, List[str]]]

Any IPv4 address or subnet address and netmask from which the administrator can connect to the FortiGate unit. Default allows access from any IPv4 address.

trusthost3 Optional[Union[str, List[str]]]

Any IPv4 address or subnet address and netmask from which the administrator can connect to the FortiGate unit. Default allows access from any IPv4 address.

trusthost4 Optional[Union[str, List[str]]]

Any IPv4 address or subnet address and netmask from which the administrator can connect to the FortiGate unit. Default allows access from any IPv4 address.

trusthost5 Optional[Union[str, List[str]]]

Any IPv4 address or subnet address and netmask from which the administrator can connect to the FortiGate unit. Default allows access from any IPv4 address.

trusthost6 Optional[Union[str, List[str]]]

Any IPv4 address or subnet address and netmask from which the administrator can connect to the FortiGate unit. Default allows access from any IPv4 address.

trusthost7 Optional[Union[str, List[str]]]

Any IPv4 address or subnet address and netmask from which the administrator can connect to the FortiGate unit. Default allows access from any IPv4 address.

trusthost8 Optional[Union[str, List[str]]]

Any IPv4 address or subnet address and netmask from which the administrator can connect to the FortiGate unit. Default allows access from any IPv4 address.

trusthost9 Optional[Union[str, List[str]]]

Any IPv4 address or subnet address and netmask from which the administrator can connect to the FortiGate unit. Default allows access from any IPv4 address.

trusthost10 Optional[Union[str, List[str]]]

Any IPv4 address or subnet address and netmask from which the administrator can connect to the FortiGate unit. Default allows access from any IPv4 address.

two-factor Optional[Union[str, List[str]]]

Enable/disable two-factor authentication.

two-factor-authentication Optional[Union[str, List[str]]]

Authentication method by FortiToken Cloud.

two-factor-notification Optional[Union[str, List[str]]]

Notification method for user activation by FortiToken Cloud.

vdom Optional[Union[str, VDOM, List[Union[str, VDOM]]]]

Virtual domain(s) that the administrator can access.

vdom-override Optional[Union[str, VDOM, List[Union[str, VDOM]]]]

Enable to use the names of VDOMs provided by the remote authentication server to control the VDOMs that this administrator can access.

wildcard Optional[ENABLE_DISABLE]

Enable/disable wildcard RADIUS authentication.

serialize_vdom #

serialize_vdom(value: Union[str, VDOM, list[Union[str, VDOM]]]) -> list[str]

Serialize the schema's VDOM name array, including object-reference inputs.

Source code in pyfortinet/fmg_api/system.py
@field_serializer("vdom", when_used="unless-none")
def serialize_vdom(self, value: Union[str, VDOM, list[Union[str, VDOM]]]) -> list[str]:
    """Serialize the schema's VDOM name array, including object-reference inputs."""
    values = value if isinstance(value, list) else [value]
    return [item.name if isinstance(item, VDOM) else item for item in values]