community.general.ce_ospf_vrf (0.1.1) — module

Manages configuration of an OSPF VPN instance on HUAWEI CloudEngine switches.

Authors: Yang yang (@QijunPan)

preview | supported by community

Install collection

Install with ansible-galaxy collection install community.general:==0.1.1


Add to requirements.yml

  collections:
    - name: community.general
      version: 0.1.1

Description

Manages configuration of an OSPF VPN instance on HUAWEI CloudEngine switches.

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: ospf vrf module test
  hosts: cloudengine
  connection: local
  gather_facts: no
  vars:
    cli:
      host: "{{ inventory_hostname }}"
      port: "{{ ansible_ssh_port }}"
      username: "{{ username }}"
      password: "{{ password }}"
      transport: cli

  tasks:

  - name: Configure ospf route id
    ce_ospf_vrf:
      ospf: 2
      route_id: 2.2.2.2
      lsaointervalflag: False
      lsaointerval: 2
      provider: "{{ cli }}"

Inputs

    
vrf:
    default: _public_
    description:
    - Specifies the vpn instance which use ospf,length is 1 - 31. Valid values are a string.

ospf:
    description:
    - The ID of the ospf process. Valid values are an integer, 1 - 4294967295, the default
      value is 1.
    required: true

state:
    choices:
    - present
    - absent
    default: present
    description:
    - Specify desired state of the resource.

route_id:
    description:
    - Specifies the ospf private route id,. Valid values are a string, formatted as an
      IP address (i.e. "10.1.1.1") the length is 0 - 20.

bandwidth:
    description:
    - Specifies the reference bandwidth used to assign ospf cost. Valid values are an
      integer, in Mbps, 1 - 2147483648, the default value is 100.

lsaalflag:
    default: 'no'
    description:
    - Specifies the mode of timer to calculate interval of arrive LSA. If set the parameter
      but not specifies value, the default will be used. If true use general timer. If
      false use intelligent timer.
    type: bool

description:
    description:
    - Specifies the description information of ospf process.

spfinterval:
    description:
    - Specifies the interval to calculate SPF when use second level  timer. Valid value
      is an integer, in second, from 1 to 10.

lsaainterval:
    description:
    - Specifies the interval of arrive LSA when use the general timer. Valid value is
      an integer, in millisecond, from 0 to 10000.

lsaointerval:
    description:
    - Specifies the interval of originate LSA . Valid value is an integer, in second,
      from 0 to 10, the default value is 5.

spfintervalmi:
    description:
    - Specifies the interval to calculate SPF when use millisecond level  timer. Valid
      value is an integer, in millisecond, from 1 to 10000.

spfmaxinterval:
    description:
    - Specifies the max interval to calculate SPF when use intelligent timer. Valid value
      is an integer, in millisecond, from 1 to 20000, the default value is 5000.

lsaamaxinterval:
    description:
    - Specifies the max interval of arrive LSA when use the intelligent timer. Valid value
      is an integer, in millisecond, from 0 to 10000, the default value is 1000.

lsaomaxinterval:
    description:
    - Specifies the max interval of originate LSA . Valid value is an integer, in millisecond,
      from 1 to 10000, the default value is 5000.

spfholdinterval:
    description:
    - Specifies the hold interval to calculate SPF when use intelligent timer. Valid value
      is an integer, in millisecond, from 1 to 5000, the default value is 200.

spfintervaltype:
    choices:
    - intelligent-timer
    - timer
    - millisecond
    default: intelligent-timer
    description:
    - Specifies the mode of timer which used to calculate SPF. If set the parameter but
      noe specifies value, the default will be used. If is intelligent-timer, then use
      intelligent timer. If is timer, then use second level timer. If is millisecond,
      then use millisecond level timer.

lsaaholdinterval:
    description:
    - Specifies the hold interval of arrive LSA when use the intelligent timer. Valid
      value is an integer, in millisecond, from 0 to 10000, the default value is 500.

lsaoholdinterval:
    description:
    - Specifies the hold interval of originate LSA . Valid value is an integer, in millisecond,
      from 0 to 5000, the default value is 1000.

lsaointervalflag:
    default: 'no'
    description:
    - Specifies whether cancel the interval of LSA originate or not. If set the parameter
      but noe specifies value, the default will be used. true:cancel the interval of LSA
      originate, the interval is 0. false:do not cancel the interval of LSA originate.
    type: bool

spfstartinterval:
    description:
    - Specifies the start interval to calculate SPF when use intelligent timer. Valid
      value is an integer, in millisecond, from 1 to 1000, the default value is 50.

lsaastartinterval:
    description:
    - Specifies the start interval of arrive LSA when use the intelligent timer. Valid
      value is an integer, in millisecond, from 0 to 10000, the default value is 500.

lsaostartinterval:
    description:
    - Specifies the start interval of originate LSA . Valid value is an integer, in millisecond,
      from 0 to 1000, the default value is 500.

Outputs

changed:
  description: check to see if a change was made on the device
  returned: always
  sample: false
  type: bool
end_state:
  description: k/v pairs of configuration after module execution
  returned: verbose mode
  sample:
    bandwidthReference: '100'
    description: null
    lsaArrivalFlag: 'false'
    lsaArrivalHoldInterval: '500'
    lsaArrivalInterval: null
    lsaArrivalMaxInterval: '1000'
    lsaArrivalStartInterval: '500'
    lsaOriginateHoldInterval: '1000'
    lsaOriginateInterval: '2'
    lsaOriginateIntervalFlag: 'false'
    lsaOriginateMaxInterval: '5000'
    lsaOriginateStartInterval: '500'
    processId: '2'
    routerId: 2.2.2.2
    spfScheduleHoldInterval: '1000'
    spfScheduleInterval: null
    spfScheduleIntervalMillisecond: null
    spfScheduleIntervalType: intelligent-timer
    spfScheduleMaxInterval: '10000'
    spfScheduleStartInterval: '500'
    vrfName: _public_
  type: dict
existing:
  description: k/v pairs of existing configuration
  returned: verbose mode
  sample:
    bandwidthReference: '100'
    description: null
    lsaArrivalFlag: 'false'
    lsaArrivalHoldInterval: '500'
    lsaArrivalInterval: null
    lsaArrivalMaxInterval: '1000'
    lsaArrivalStartInterval: '500'
    lsaOriginateHoldInterval: '1000'
    lsaOriginateInterval: '2'
    lsaOriginateIntervalFlag: 'false'
    lsaOriginateMaxInterval: '5000'
    lsaOriginateStartInterval: '500'
    processId: '2'
    routerId: 2.2.2.2
    spfScheduleHoldInterval: '1000'
    spfScheduleInterval: null
    spfScheduleIntervalMillisecond: null
    spfScheduleIntervalType: intelligent-timer
    spfScheduleMaxInterval: '10000'
    spfScheduleStartInterval: '500'
    vrfName: _public_
  type: dict
proposed:
  description: k/v pairs of parameters passed into module
  returned: verbose mode
  sample:
    bandwidth: '100'
    description: null
    lsaaholdinterval: '500'
    lsaainterval: null
    lsaalflag: 'False'
    lsaamaxinterval: '1000'
    lsaastartinterval: '500'
    lsaoholdinterval: '1000'
    lsaointerval: '2'
    lsaointervalflag: 'False'
    lsaomaxinterval: '5000'
    lsaostartinterval: '500'
    process_id: '2'
    route_id: 2.2.2.2
    spfholdinterval: '1000'
    spfinterval: null
    spfintervalmi: null
    spfintervaltype: intelligent-timer
    spfmaxinterval: '10000'
    spfstartinterval: '500'
    vrf: _public_
  type: dict
updates:
  description: commands sent to the device
  returned: always
  sample:
  - ospf 2
  type: list