File tree Expand file tree Collapse file tree 6 files changed +8
-31
lines changed
Expand file tree Collapse file tree 6 files changed +8
-31
lines changed Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ endif::topdoc[]
2626. Verify new hostname 'h0stn4m3'
2727. Set hostname to '%h-%m'
2828. Verify hostname is %h-%m in running configuration
29- . Verify hostname format in operational, according to format
29+ . Verify hostname format in operational
3030
3131
3232<<<
Original file line number Diff line number Diff line change 1010
1111e.g. ix-01-01-01.
1212"""
13- import random
14- import string
1513import re
1614import infamy
1715
2018 env = infamy .Env ()
2119 target = env .attach ("target" , "mgmt" )
2220 tgtssh = env .attach ("target" , "mgmt" , "ssh" )
23- fmt = "%h-%m"
24- new = "h0stn4m3"
21+ FMT = "%h-%m"
22+ NEW = "h0stn4m3"
2523
2624 with test .step ("Set hostname to 'h0stn4m3'" ):
2725 target .put_config_dict ("ietf-system" , {
2826 "system" : {
29- "hostname" : new ,
27+ "hostname" : NEW ,
3028 }
3129 })
3230
3331 with test .step ("Verify new hostname 'h0stn4m3'" ):
3432 running = target .get_config_dict ("/ietf-system:system" )
35- assert running ["system" ]["hostname" ] == new
33+ assert running ["system" ]["hostname" ] == NEW
3634
3735 with test .step ("Set hostname to '%h-%m'" ):
3836 target .put_config_dict ("ietf-system" , {
3937 "system" : {
40- "hostname" : fmt ,
38+ "hostname" : FMT ,
4139 }
4240 })
4341
4442 with test .step ("Verify hostname is %h-%m in running configuration" ):
4543 running = target .get_config_dict ("/ietf-system:system" )
46- if running ["system" ]["hostname" ] != fmt :
44+ if running ["system" ]["hostname" ] != FMT :
4745 test .fail ()
4846
49- with test .step ("Verify hostname format in operational, according to format " ):
47+ with test .step ("Verify hostname format in operational" ):
5048 cmd = tgtssh .runsh ("sed -n s/^DEFAULT_HOSTNAME=//p /etc/os-release" )
5149 default = cmd .stdout .rstrip ()
5250
Original file line number Diff line number Diff line change 11#!/usr/bin/env python3
2- #
3- # Verify that a simple web server container can be configured to run
4- # with host networking, on port 80. Operation is verified using a
5- # simple GET request for index.html and checking for a key phrase.
6- #
7- # The RPC actions: stop + start, and restart are also verified.
8- #
92"""
103Container basic
114
Original file line number Diff line number Diff line change 11#!/usr/bin/env python3
2- #
3- # Verify connectivity with a simple web server container from behind a
4- # docker0 bridge. As an added twist, this test also verifies content
5- # mounts, i.e., custom index.html from running-config.
6- #
72"""
83Container with bridge network
94
Original file line number Diff line number Diff line change 11#!/usr/bin/env python3
2- #
3- # Verify connectivity with a simple web server container that's been
4- # given a physical interface instead of an end of a VETH pair.
5- #
62"""
73Container with physical interface
84
95Verify connectivity with a simple web server container that's been
106given a physical interface instead of an end of a VETH pair.
117"""
12- import base64
138import infamy
149from infamy .util import until , to_binary
1510
Original file line number Diff line number Diff line change 11#!/usr/bin/env python3
2- #
3- # Verify connectivity with a simple web server container from behind a
4- # regular bridge, a VETH pair connects the container to the bridge.
5- #
62r"""
73Container with VETH pair
84
You can’t perform that action at this time.
0 commit comments