diff --git a/oxi/interfaces/models/templates/mikrotik.ttp b/oxi/interfaces/models/templates/mikrotik.ttp index 47b5028..b170f44 100644 --- a/oxi/interfaces/models/templates/mikrotik.ttp +++ b/oxi/interfaces/models/templates/mikrotik.ttp @@ -28,9 +28,9 @@ add address={{ ip_address | _start_ }}/{{ mask }} interface={{ name }} network={ ## not disabled and comment with/without quotes add address={{ ip_address | _start_ }}/{{ mask }} comment={{ description | ORPHRASE | exclude("disabled=") | strip('"')}} interface={{ name }} network={{ network }} ## 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 -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 }} diff --git a/pyproject.toml b/pyproject.toml index c497e2d..9b9700f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "oxipy" -version = "0.1.1" +version = "0.1.3" description = "Python client for Oxidized API with TTP-based config parsing" readme = "README.md" license = "Apache-2.0" diff --git a/tests/fixtures/mikrotik/config.expected.json b/tests/fixtures/mikrotik/config.expected.json index 319a67a..0cf1a84 100644 --- a/tests/fixtures/mikrotik/config.expected.json +++ b/tests/fixtures/mikrotik/config.expected.json @@ -28,7 +28,7 @@ }, { "interface": "ether4", - "shutdown": false, + "shutdown": true, "ip_address": "100.10.10.1", "mask": 24, "description": null