diff --git a/changelogs/fragments/272-additional_mpls_path_support.yml b/changelogs/fragments/272-additional_mpls_path_support.yml new file mode 100644 index 0000000..594ea53 --- /dev/null +++ b/changelogs/fragments/272-additional_mpls_path_support.yml @@ -0,0 +1,2 @@ +minor_changes: + - api_info, api_modify - add support for paths ``/mpls interface``, ``/mpls ldp accept-filter``, ``/mpls ldp advertise-filter`` and ``mpls ldp interface`` (https://github.com/ansible-collections/community.routeros/pull/272). \ No newline at end of file diff --git a/plugins/module_utils/_api_data.py b/plugins/module_utils/_api_data.py index 4718a63..9945a2c 100644 --- a/plugins/module_utils/_api_data.py +++ b/plugins/module_utils/_api_data.py @@ -3613,13 +3613,13 @@ PATHS = { ), ('mpls', 'interface'): APIData( unversioned=VersionedAPIData( - unknown_mechanism=True, - # primary_keys=('default', ), + fully_understood=True, fields={ - 'default': KeyInfo(), - 'disabled': KeyInfo(), - 'interface': KeyInfo(), + 'disabled': KeyInfo(default=False), + 'comment': KeyInfo(can_disable=True, remove_value=''), + 'interface': KeyInfo(required=True), 'mpls-mtu': KeyInfo(), + 'info': KeyInfo(can_disable=True), }, ), ), @@ -3659,6 +3659,47 @@ PATHS = { )), ], ), + ('mpls', 'ldp', 'accept-filter'): APIData( + unversioned=VersionedAPIData( + fully_understood=True, + fields={ + 'accept': KeyInfo(can_disable=True), + 'disabled': KeyInfo(default=False), + 'comment': KeyInfo(can_disable=True, remove_value=''), + 'neighbor': KeyInfo(can_disable=True), + 'prefix': KeyInfo(can_disable=True), + 'vrf': KeyInfo(can_disable=True), + }, + ), + ), + ('mpls', 'ldp', 'advertise-filter'): APIData( + unversioned=VersionedAPIData( + fully_understood=True, + fields={ + 'advertise': KeyInfo(default=''), + 'disabled': KeyInfo(default=False), + 'comment': KeyInfo(can_disable=True, remove_value=''), + 'neighbor': KeyInfo(), + 'prefix': KeyInfo(), + 'vrf': KeyInfo(), + }, + ), + ), + ('mpls', 'ldp', 'interface'): APIData( + unversioned=VersionedAPIData( + fully_understood=True, + fields={ + 'disabled': KeyInfo(default=False), + 'comment': KeyInfo(can_disable=True, remove_value=''), + 'accept-dynamic-neighbors': KeyInfo(can_disable=True), + 'afi': KeyInfo(can_disable=True), + 'hello-interval': KeyInfo(can_disable=True), + 'hold-time': KeyInfo(can_disable=True), + 'interface': KeyInfo(required=True), + 'transport-addresses': KeyInfo(can_disable=True), + }, + ), + ), ('port', 'firmware'): APIData( unversioned=VersionedAPIData( single_value=True, diff --git a/plugins/modules/api_info.py b/plugins/modules/api_info.py index bbb0bd1..c2260a9 100644 --- a/plugins/modules/api_info.py +++ b/plugins/modules/api_info.py @@ -175,7 +175,11 @@ options: - ipv6 route - ipv6 settings - mpls + - mpls interface - mpls ldp + - mpls ldp accept-filter + - mpls ldp advertise-filter + - mpls ldp interface - port firmware - port remote-access - ppp aaa diff --git a/plugins/modules/api_modify.py b/plugins/modules/api_modify.py index 87a1184..5224d68 100644 --- a/plugins/modules/api_modify.py +++ b/plugins/modules/api_modify.py @@ -184,7 +184,11 @@ options: - ipv6 route - ipv6 settings - mpls + - mpls interface - mpls ldp + - mpls ldp accept-filter + - mpls ldp advertise-filter + - mpls ldp interface - port firmware - port remote-access - ppp aaa