Update Mikrotik template to use 'shutdown' attribute for interface management
- Replaced 'disabled' with 'shutdown' in the Mikrotik template to align with the new interface state management. - Updated expected configuration JSON to set 'shutdown' to true for accurate testing and validation of interface configurations.
This commit is contained in:
@@ -28,9 +28,9 @@ add address={{ ip_address | _start_ }}/{{ mask }} interface={{ name }} network={
|
|||||||
## not disabled and comment with/without quotes
|
## not disabled and comment with/without quotes
|
||||||
add address={{ ip_address | _start_ }}/{{ mask }} comment={{ description | ORPHRASE | exclude("disabled=") | strip('"')}} interface={{ name }} network={{ network }}
|
add address={{ ip_address | _start_ }}/{{ mask }} comment={{ description | ORPHRASE | exclude("disabled=") | strip('"')}} interface={{ name }} network={{ network }}
|
||||||
## disabled no comment
|
## disabled no comment
|
||||||
add address={{ ip_address | _start_ }}/{{ mask }} disabled={{ disabled | replace("yes","True") | strip('"')}} interface={{ name }} network={{ network }}
|
add address={{ ip_address | _start_ }}/{{ mask }} disabled={{ shutdown | replace("yes","True") | strip('"')}} interface={{ name }} network={{ network }}
|
||||||
## disabled with comment with/without quotes
|
## disabled with comment with/without quotes
|
||||||
add address={{ ip_address | _start_ }}/{{ mask }} comment={{ description | ORPHRASE | exclude("disabled=") | strip('"') }} disabled={{ disabled }} interface={{ name }} network={{ network }}
|
add address={{ ip_address | _start_ }}/{{ mask }} comment={{ description | ORPHRASE | exclude("disabled=") | strip('"') }} disabled={{ shutdown | replace("yes","True") | strip('"')}} interface={{ name }} network={{ network }}
|
||||||
</group>
|
</group>
|
||||||
|
|
||||||
<group name="vlans">
|
<group name="vlans">
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|||||||
|
|
||||||
[project]
|
[project]
|
||||||
name = "oxipy"
|
name = "oxipy"
|
||||||
version = "0.1.1"
|
version = "0.1.3"
|
||||||
description = "Python client for Oxidized API with TTP-based config parsing"
|
description = "Python client for Oxidized API with TTP-based config parsing"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
license = "Apache-2.0"
|
license = "Apache-2.0"
|
||||||
|
|||||||
2
tests/fixtures/mikrotik/config.expected.json
vendored
2
tests/fixtures/mikrotik/config.expected.json
vendored
@@ -28,7 +28,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"interface": "ether4",
|
"interface": "ether4",
|
||||||
"shutdown": false,
|
"shutdown": true,
|
||||||
"ip_address": "100.10.10.1",
|
"ip_address": "100.10.10.1",
|
||||||
"mask": 24,
|
"mask": 24,
|
||||||
"description": null
|
"description": null
|
||||||
|
|||||||
Reference in New Issue
Block a user