-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Joachim Wiberg <[email protected]>
- Loading branch information
Showing
6 changed files
with
109 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
=== Interface Description (ifAlias) | ||
==== Description | ||
Verify interface description (ifAlias) can be set on an interface and | ||
then be read back from the operational datastore. | ||
|
||
==== Topology | ||
ifdef::topdoc[] | ||
image::../../test/case/ietf_interfaces/ifalias/topology.svg[Interface Description (ifAlias) topology] | ||
endif::topdoc[] | ||
ifndef::topdoc[] | ||
ifdef::testgroup[] | ||
image::ifalias/topology.svg[Interface Description (ifAlias) topology] | ||
endif::testgroup[] | ||
ifndef::testgroup[] | ||
image::topology.svg[Interface Description (ifAlias) topology] | ||
endif::testgroup[] | ||
endif::topdoc[] | ||
==== Test sequence | ||
. Set up topology and attach to target DUT | ||
. Set up interface target:data with description | ||
. Verify description can be read back from operational | ||
|
||
|
||
<<< | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
#!/usr/bin/env python3 | ||
"""Interface Description (ifAlias) | ||
Verify interface description (ifAlias) can be set on an interface and | ||
then be read back from the operational datastore. | ||
""" | ||
import infamy | ||
import infamy.iface as iface | ||
|
||
with infamy.Test() as test: | ||
with test.step("Set up topology and attach to target DUT"): | ||
env = infamy.Env() | ||
target = env.attach("target", "mgmt") | ||
DESC = "Kilroy was here" | ||
|
||
with test.step("Set up interface target:data with description"): | ||
_, tport = env.ltop.xlate("target", "data") | ||
|
||
target.put_config_dict("ietf-interfaces", { | ||
"interfaces": { | ||
"interface": [ | ||
{ | ||
"name": tport, | ||
"description": DESC, | ||
"enabled": True, | ||
} | ||
] | ||
} | ||
}) | ||
|
||
with test.step("Verify description can be read back from operational"): | ||
text = iface.get_param(target, tport, "description") | ||
if text != DESC: | ||
test.fail() | ||
|
||
test.succeed() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../../infamy/topologies/1x2.dot |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.