fortinet.fortimanager.fmgr_switchcontroller_managedswitch_ports – Managed-switch port list.

Note

This plugin is part of the fortinet.fortimanager collection (version 2.0.1).

To install it use: ansible-galaxy collection install fortinet.fortimanager.

To use it in a playbook, specify: fortinet.fortimanager.fmgr_switchcontroller_managedswitch_ports.

New in version 2.10: of fortinet.fortimanager

Synopsis

  • This module is able to configure a FortiManager device.

  • Examples include all parameters and values which need to be adjusted to data sources before usage.

Parameters

Parameter Choices/Defaults Comments
adom
string / required
the parameter (adom) in requested url
bypass_validation
boolean
    Choices:
  • no ←
  • yes
only set to True when module schema diffs with FortiManager API structure, module continues to execute without validating parameters
managed-switch
string / required
the parameter (managed-switch) in requested url
rc_failed
list / elements=string
the rc codes list with which the conditions to fail will be overriden
rc_succeeded
list / elements=string
the rc codes list with which the conditions to succeed will be overriden
state
string / required
    Choices:
  • present
  • absent
the directive to create, update or delete an object
switchcontroller_managedswitch_ports
dictionary
the top level parameters set
allowed-vlans
string
Configure switch port tagged vlans
allowed-vlans-all
string
    Choices:
  • disable
  • enable
Enable/disable all defined vlans on this port.
arp-inspection-trust
string
    Choices:
  • untrusted
  • trusted
Trusted or untrusted dynamic ARP inspection.
bundle
string
    Choices:
  • disable
  • enable
Enable/disable Link Aggregation Group (LAG) bundling for non-FortiLink interfaces.
description
string
Description for port.
dhcp-snoop-option82-trust
string
    Choices:
  • disable
  • enable
Enable/disable allowance of DHCP with option-82 on untrusted interface.
dhcp-snooping
string
    Choices:
  • trusted
  • untrusted
Trusted or untrusted DHCP-snooping interface.
discard-mode
string
    Choices:
  • none
  • all-untagged
  • all-tagged
Configure discard mode for port.
edge-port
string
    Choices:
  • disable
  • enable
Enable/disable this interface as an edge port, bridging connections between workstations and/or computers.
igmp-snooping
string
    Choices:
  • disable
  • enable
Set IGMP snooping mode for the physical port interface.
igmps-flood-reports
string
    Choices:
  • disable
  • enable
Enable/disable flooding of IGMP reports to this interface when igmp-snooping enabled.
igmps-flood-traffic
string
    Choices:
  • disable
  • enable
Enable/disable flooding of IGMP snooping traffic to this interface.
lacp-speed
string
    Choices:
  • slow
  • fast
end Link Aggregation Control Protocol (LACP) messages every 30 seconds (slow) or every second (fast).
learning-limit
integer
Limit the number of dynamic MAC addresses on this Port (1 - 128, 0 = no limit, default).
lldp-profile
string
LLDP port TLV profile.
lldp-status
string
    Choices:
  • disable
  • rx-only
  • tx-only
  • tx-rx
LLDP transmit and receive status.
loop-guard
string
    Choices:
  • disabled
  • enabled
Enable/disable loop-guard on this interface, an STP optimization used to prevent network loops.
loop-guard-timeout
integer
Loop-guard timeout (0 - 120 min, default = 45).
max-bundle
integer
Maximum size of LAG bundle (1 - 24, default = 24)
mclag
string
    Choices:
  • disable
  • enable
Enable/disable multi-chassis link aggregation (MCLAG).
member-withdrawal-behavior
string
    Choices:
  • forward
  • block
Port behavior after it withdraws because of loss of control packets.
members
string
no description
min-bundle
integer
Minimum size of LAG bundle (1 - 24, default = 1)
mode
string
    Choices:
  • static
  • lacp-passive
  • lacp-active
LACP mode: ignore and do not send control messages, or negotiate 802.3ad aggregation passively or actively.
poe-pre-standard-detection
string
    Choices:
  • disable
  • enable
Enable/disable PoE pre-standard detection.
poe-status
string
    Choices:
  • disable
  • enable
Enable/disable PoE status.
port-name
string
Switch port name.
port-owner
string
Switch port name.
port-security-policy
string
Switch controller authentication policy to apply to this managed switch from available options.
port-selection-criteria
string
    Choices:
  • src-mac
  • dst-mac
  • src-dst-mac
  • src-ip
  • dst-ip
  • src-dst-ip
Algorithm for aggregate port selection.
qos-policy
string
Switch controller QoS policy from available options.
sample-direction
string
    Choices:
  • rx
  • tx
  • both
sFlow sample direction.
sflow-counter-interval
integer
sFlow sampler counter polling interval (1 - 255 sec).
sflow-sample-rate
integer
sFlow sampler sample rate (0 - 99999 p/sec).
sflow-sampler
string
    Choices:
  • disabled
  • enabled
Enable/disable sFlow protocol on this interface.
stp-bpdu-guard
string
    Choices:
  • disabled
  • enabled
Enable/disable STP BPDU guard on this interface.
stp-bpdu-guard-timeout
integer
BPDU Guard disabling protection (0 - 120 min).
stp-root-guard
string
    Choices:
  • disabled
  • enabled
Enable/disable STP root guard on this interface.
stp-state
string
    Choices:
  • disabled
  • enabled
Enable/disable Spanning Tree Protocol (STP) on this interface.
type
string
    Choices:
  • physical
  • trunk
Interface type: physical or trunk port.
untagged-vlans
string
Configure switch port untagged vlans
vlan
string
Assign switch ports to a VLAN.
workspace_locking_adom
string
the adom to lock for FortiManager running in workspace mode, the value can be global and others including root
workspace_locking_timeout
integer
Default:
300
the maximum time in seconds to wait for other user to release the workspace lock

Notes

Note

  • Running in workspace locking mode is supported in this FortiManager module, the top level parameters workspace_locking_adom and workspace_locking_timeout help do the work.

  • To create or update an object, use state present directive.

  • To delete an object, use state absent directive.

  • Normally, running one module can fail when a non-zero rc is returned. you can also override the conditions to fail or succeed with parameters rc_failed and rc_succeeded

Examples

- hosts: fortimanager-inventory
  collections:
    - fortinet.fortimanager
  connection: httpapi
  vars:
     ansible_httpapi_use_ssl: True
     ansible_httpapi_validate_certs: False
     ansible_httpapi_port: 443
  tasks:
   - name: Managed-switch port list.
     fmgr_switchcontroller_managedswitch_ports:
        bypass_validation: False
        workspace_locking_adom: <value in [global, custom adom including root]>
        workspace_locking_timeout: 300
        rc_succeeded: [0, -2, -3, ...]
        rc_failed: [-2, -3, ...]
        adom: <your own value>
        managed-switch: <your own value>
        state: <value in [present, absent]>
        switchcontroller_managedswitch_ports:
           allowed-vlans: <value of string>
           allowed-vlans-all: <value in [disable, enable]>
           arp-inspection-trust: <value in [untrusted, trusted]>
           bundle: <value in [disable, enable]>
           description: <value of string>
           dhcp-snoop-option82-trust: <value in [disable, enable]>
           dhcp-snooping: <value in [trusted, untrusted]>
           discard-mode: <value in [none, all-untagged, all-tagged]>
           edge-port: <value in [disable, enable]>
           igmp-snooping: <value in [disable, enable]>
           igmps-flood-reports: <value in [disable, enable]>
           igmps-flood-traffic: <value in [disable, enable]>
           lacp-speed: <value in [slow, fast]>
           learning-limit: <value of integer>
           lldp-profile: <value of string>
           lldp-status: <value in [disable, rx-only, tx-only, ...]>
           loop-guard: <value in [disabled, enabled]>
           loop-guard-timeout: <value of integer>
           max-bundle: <value of integer>
           mclag: <value in [disable, enable]>
           member-withdrawal-behavior: <value in [forward, block]>
           members: <value of string>
           min-bundle: <value of integer>
           mode: <value in [static, lacp-passive, lacp-active]>
           poe-pre-standard-detection: <value in [disable, enable]>
           poe-status: <value in [disable, enable]>
           port-name: <value of string>
           port-owner: <value of string>
           port-security-policy: <value of string>
           port-selection-criteria: <value in [src-mac, dst-mac, src-dst-mac, ...]>
           qos-policy: <value of string>
           sample-direction: <value in [rx, tx, both]>
           sflow-counter-interval: <value of integer>
           sflow-sample-rate: <value of integer>
           sflow-sampler: <value in [disabled, enabled]>
           stp-bpdu-guard: <value in [disabled, enabled]>
           stp-bpdu-guard-timeout: <value of integer>
           stp-root-guard: <value in [disabled, enabled]>
           stp-state: <value in [disabled, enabled]>
           type: <value in [physical, trunk]>
           untagged-vlans: <value of string>
           vlan: <value of string>

Return Values

Common return values are documented here, the following are the fields unique to this module:

Key Returned Description
request_url
string
always
The full url requested

Sample:
/sys/login/user
response_code
integer
always
The status of api request

response_message
string
always
The descriptive message of the api response

Sample:
OK.


Authors

  • Link Zheng (@chillancezen)

  • Jie Xue (@JieX19)

  • Frank Shen (@fshen01)

  • Hongbin Lu (@fgtdev-hblu)