Skip to content

Commit 1b528b2

Browse files
committed
Add tests for Address Family
1 parent 9da35a4 commit 1b528b2

File tree

2 files changed

+182
-49
lines changed

2 files changed

+182
-49
lines changed

serveradmin/serverdb/fixtures/ip_addr_type.json

Lines changed: 128 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,10 @@
4141
},
4242
{
4343
"model": "serverdb.attribute",
44-
"pk": "ip_config",
44+
"pk": "ip_config_ipv4",
4545
"fields": {
4646
"type": "inet",
47+
"inet_address_family": "IPV4",
4748
"multi": false,
4849
"hovertext": "",
4950
"group": "other",
@@ -55,6 +56,73 @@
5556
"regexp": "\\A.*\\Z"
5657
}
5758
},
59+
{
60+
"model": "serverdb.attribute",
61+
"pk": "ip_config_ipv6",
62+
"fields": {
63+
"type": "inet",
64+
"inet_address_family": "IPV6",
65+
"multi": false,
66+
"hovertext": "",
67+
"group": "other",
68+
"help_link": null,
69+
"readonly": false,
70+
"target_servertype": null,
71+
"reversed_attribute": null,
72+
"clone": false,
73+
"regexp": "\\A.*\\Z"
74+
}
75+
},
76+
{
77+
"model": "serverdb.attribute",
78+
"pk": "supernet_no_af",
79+
"fields": {
80+
"type": "supernet",
81+
"multi": false,
82+
"hovertext": "",
83+
"group": "other",
84+
"help_link": null,
85+
"readonly": false,
86+
"target_servertype": "supernet",
87+
"reversed_attribute": null,
88+
"clone": false,
89+
"regexp": "\\A.*\\Z"
90+
}
91+
},
92+
{
93+
"model": "serverdb.attribute",
94+
"pk": "supernet_ipv4",
95+
"fields": {
96+
"type": "supernet",
97+
"inet_address_family": "IPV4",
98+
"multi": false,
99+
"hovertext": "",
100+
"group": "other",
101+
"help_link": null,
102+
"readonly": false,
103+
"target_servertype": "supernet",
104+
"reversed_attribute": null,
105+
"clone": false,
106+
"regexp": "\\A.*\\Z"
107+
}
108+
},
109+
{
110+
"model": "serverdb.attribute",
111+
"pk": "supernet_ipv6",
112+
"fields": {
113+
"type": "supernet",
114+
"inet_address_family": "IPV6",
115+
"multi": false,
116+
"hovertext": "",
117+
"group": "other",
118+
"help_link": null,
119+
"readonly": false,
120+
"target_servertype": "supernet",
121+
"reversed_attribute": null,
122+
"clone": false,
123+
"regexp": "\\A.*\\Z"
124+
}
125+
},
58126
{
59127
"model": "serverdb.attribute",
60128
"pk": "ip_config_new",
@@ -76,7 +144,7 @@
76144
"pk": 7,
77145
"fields": {
78146
"servertype": "loadbalancer",
79-
"attribute": "ip_config",
147+
"attribute": "ip_config_ipv4",
80148
"related_via_attribute": null,
81149
"consistent_via_attribute": null,
82150
"required": false,
@@ -89,7 +157,7 @@
89157
"pk": 9,
90158
"fields": {
91159
"servertype": "network",
92-
"attribute": "ip_config",
160+
"attribute": "ip_config_ipv4",
93161
"related_via_attribute": null,
94162
"consistent_via_attribute": null,
95163
"required": false,
@@ -102,7 +170,7 @@
102170
"pk": 12,
103171
"fields": {
104172
"servertype": "host",
105-
"attribute": "ip_config",
173+
"attribute": "ip_config_ipv4",
106174
"related_via_attribute": null,
107175
"consistent_via_attribute": null,
108176
"required": false,
@@ -114,8 +182,8 @@
114182
"model": "serverdb.servertypeattribute",
115183
"pk": 13,
116184
"fields": {
117-
"servertype": "other_network",
118-
"attribute": "ip_config",
185+
"servertype": "host",
186+
"attribute": "ip_config_ipv6",
119187
"related_via_attribute": null,
120188
"consistent_via_attribute": null,
121189
"required": false,
@@ -128,7 +196,7 @@
128196
"pk": 14,
129197
"fields": {
130198
"servertype": "host",
131-
"attribute": "ip_config_new",
199+
"attribute": "supernet_no_af",
132200
"related_via_attribute": null,
133201
"consistent_via_attribute": null,
134202
"required": false,
@@ -139,6 +207,58 @@
139207
{
140208
"model": "serverdb.servertypeattribute",
141209
"pk": 15,
210+
"fields": {
211+
"servertype": "host",
212+
"attribute": "supernet_ipv4",
213+
"related_via_attribute": null,
214+
"consistent_via_attribute": null,
215+
"required": false,
216+
"default_value": null,
217+
"default_visible": false
218+
}
219+
},
220+
{
221+
"model": "serverdb.servertypeattribute",
222+
"pk": 16,
223+
"fields": {
224+
"servertype": "other_network",
225+
"attribute": "ip_config_ipv4",
226+
"related_via_attribute": null,
227+
"consistent_via_attribute": null,
228+
"required": false,
229+
"default_value": null,
230+
"default_visible": false
231+
}
232+
},
233+
{
234+
"model": "serverdb.servertypeattribute",
235+
"pk": 17,
236+
"fields": {
237+
"servertype": "host",
238+
"attribute": "supernet_ipv6",
239+
"related_via_attribute": null,
240+
"consistent_via_attribute": null,
241+
"required": false,
242+
"default_value": null,
243+
"default_visible": false
244+
}
245+
},
246+
{
247+
"model": "serverdb.servertypeattribute",
248+
"pk": 18,
249+
"fields": {
250+
"servertype": "host",
251+
"attribute": "ip_config_new",
252+
"related_via_attribute": null,
253+
"consistent_via_attribute": null,
254+
"required": false,
255+
"default_value": null,
256+
"default_visible": false
257+
}
258+
},
259+
{
260+
"model": "serverdb.servertypeattribute",
261+
"pk": 19,
142262
"fields": {
143263
"servertype": "loadbalancer",
144264
"attribute": "ip_config_new",
@@ -151,7 +271,7 @@
151271
},
152272
{
153273
"model": "serverdb.servertypeattribute",
154-
"pk": 16,
274+
"pk": 20,
155275
"fields": {
156276
"servertype": "network",
157277
"attribute": "ip_config_new",

0 commit comments

Comments
 (0)