Skip to content

Commit 7469872

Browse files
committed
Fix print Error & Release version 0.3.0
1 parent f33b8d6 commit 7469872

File tree

5 files changed

+38
-12
lines changed

5 files changed

+38
-12
lines changed

netests/data_models/netests_detailed.yml

+18
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,24 @@ config:
110110
ping:
111111
test: True
112112

113+
vlan:
114+
test: True
115+
options:
116+
compare:
117+
id: True
118+
name: False
119+
vrf_name: False
120+
ipv4_addresses: False
121+
ipv6_addresses: False
122+
assigned_ports: False
123+
print:
124+
id: True
125+
name: True
126+
vrf_name: True
127+
ipv4_addresses: True
128+
ipv6_addresses: True
129+
assigned_ports: True
130+
113131
vrf:
114132
test: False
115133
options:

netests/protocols/ip.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def to_json(self):
4242
return ret
4343
else:
4444
return {
45-
"ip_address": str(self.ip_address),
45+
"ip_address": self.ip_address,
4646
"netmask": self.netmask
4747
}
4848

netests/protocols/vlan.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,9 @@ def to_json(self):
5959
if self.options.get(PRINT_OPTION_KEY).get('vrf_name', True):
6060
ret['vrf_name'] = self.vrf_name
6161
if self.options.get(PRINT_OPTION_KEY).get('ipv4_addresses', True):
62-
ret['ipv4_addresses'] = self.ipv4_addresses
62+
ret['ipv4_addresses'] = self.ipv4_addresses.to_json()
6363
if self.options.get(PRINT_OPTION_KEY).get('ipv6_addresses', True):
64-
ret['ipv6_addresses'] = self.ipv6_addresses
64+
ret['ipv6_addresses'] = self.ipv6_addresses.to_json()
6565
if self.options.get(PRINT_OPTION_KEY).get('assigned_ports', True):
6666
ret['assigned_ports'] = self.assigned_ports
6767
return ret

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "netests"
3-
version = "0.2.2"
3+
version = "0.3.0"
44
description = "Test your Network"
55
authors = ["Dylan Hamel <[email protected]>"]
66
maintainers = ["Netests Team <[email protected]>"]

tests/features/steps/data_models_tests.py

+16-8
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ def step_impl(context):
1212
[
1313
"./netests/welcome.py",
1414
"--show-data-model",
15-
"bgp"]
15+
"bgp"
16+
]
1617
)
1718

1819
@then(u'I print BGP data model')
@@ -31,7 +32,8 @@ def step_impl(context):
3132
[
3233
"./netests/welcome.py",
3334
"--show-data-model",
34-
"cdp"]
35+
"cdp"
36+
]
3537
)
3638

3739

@@ -51,7 +53,8 @@ def step_impl(context):
5153
[
5254
"./netests/welcome.py",
5355
"--show-data-model",
54-
"facts"]
56+
"facts"
57+
]
5558
)
5659

5760

@@ -71,7 +74,8 @@ def step_impl(context):
7174
[
7275
"./netests/welcome.py",
7376
"--show-data-model",
74-
"lldp"]
77+
"lldp"
78+
]
7579
)
7680

7781

@@ -91,7 +95,8 @@ def step_impl(context):
9195
[
9296
"./netests/welcome.py",
9397
"--show-data-model",
94-
"ospf"]
98+
"ospf"
99+
]
95100
)
96101

97102

@@ -111,7 +116,8 @@ def step_impl(context):
111116
[
112117
"./netests/welcome.py",
113118
"--show-data-model",
114-
"ping"]
119+
"ping"
120+
]
115121
)
116122

117123

@@ -131,7 +137,8 @@ def step_impl(context):
131137
[
132138
"./netests/welcome.py",
133139
"--show-data-model",
134-
"vlan"]
140+
"vlan"
141+
]
135142
)
136143

137144

@@ -151,7 +158,8 @@ def step_impl(context):
151158
[
152159
"./netests/welcome.py",
153160
"--show-data-model",
154-
"vrf"]
161+
"vrf"
162+
]
155163
)
156164

157165

0 commit comments

Comments
 (0)