Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Fukász Rómeó Ervin
/
cloud
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
51f7a578
authored
Jun 06, 2016
by
Czémán Arnold
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
firewall: fix network4 ips in tests
parent
31f1acaa
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
circle/firewall/tests/test_firewall.py
+5
-5
No files found.
circle/firewall/tests/test_firewall.py
View file @
51f7a578
...
@@ -77,13 +77,13 @@ class GetNewAddressTestCase(MockCeleryMixin, TestCase):
...
@@ -77,13 +77,13 @@ class GetNewAddressTestCase(MockCeleryMixin, TestCase):
d
=
Domain
(
name
=
'example.org'
,
owner
=
self
.
u1
)
d
=
Domain
(
name
=
'example.org'
,
owner
=
self
.
u1
)
d
.
save
()
d
.
save
()
# /29 = .1-.6 = 6 hosts/subnet + broadcast + network id
# /29 = .1-.6 = 6 hosts/subnet + broadcast + network id
self
.
vlan
=
Vlan
(
vid
=
1
,
name
=
'test'
,
network4
=
'10.0.0.
0
/29'
,
self
.
vlan
=
Vlan
(
vid
=
1
,
name
=
'test'
,
network4
=
'10.0.0.
1
/29'
,
network6
=
'2001:738:2001:4031::/80'
,
domain
=
d
,
network6
=
'2001:738:2001:4031::/80'
,
domain
=
d
,
owner
=
self
.
u1
)
owner
=
self
.
u1
)
self
.
vlan
.
clean
()
self
.
vlan
.
clean
()
self
.
vlan
.
save
()
self
.
vlan
.
save
()
self
.
vlan
.
host_set
.
all
()
.
delete
()
self
.
vlan
.
host_set
.
all
()
.
delete
()
for
i
in
[
1
]
+
range
(
3
,
6
):
for
i
in
range
(
3
,
6
):
Host
(
hostname
=
'h-
%
d'
%
i
,
mac
=
'01:02:03:04:05:
%02
d'
%
i
,
Host
(
hostname
=
'h-
%
d'
%
i
,
mac
=
'01:02:03:04:05:
%02
d'
%
i
,
ipv4
=
'10.0.0.
%
d'
%
i
,
vlan
=
self
.
vlan
,
ipv4
=
'10.0.0.
%
d'
%
i
,
vlan
=
self
.
vlan
,
owner
=
self
.
u1
)
.
save
()
owner
=
self
.
u1
)
.
save
()
...
@@ -114,7 +114,7 @@ class HostGetHostnameTestCase(MockCeleryMixin, TestCase):
...
@@ -114,7 +114,7 @@ class HostGetHostnameTestCase(MockCeleryMixin, TestCase):
self
.
d
=
Domain
(
name
=
'example.org'
,
owner
=
self
.
u1
)
self
.
d
=
Domain
(
name
=
'example.org'
,
owner
=
self
.
u1
)
self
.
d
.
save
()
self
.
d
.
save
()
Record
.
objects
.
all
()
.
delete
()
Record
.
objects
.
all
()
.
delete
()
self
.
vlan
=
Vlan
(
vid
=
1
,
name
=
'test'
,
network4
=
'10.0.0.
0
/24'
,
self
.
vlan
=
Vlan
(
vid
=
1
,
name
=
'test'
,
network4
=
'10.0.0.
1
/24'
,
network6
=
'2001:738:2001:4031::/80'
,
domain
=
self
.
d
,
network6
=
'2001:738:2001:4031::/80'
,
domain
=
self
.
d
,
owner
=
self
.
u1
,
network_type
=
'portforward'
,
owner
=
self
.
u1
,
network_type
=
'portforward'
,
snat_ip
=
'10.1.1.1'
)
snat_ip
=
'10.1.1.1'
)
...
@@ -194,13 +194,13 @@ class ReloadTestCase(MockCeleryMixin, TestCase):
...
@@ -194,13 +194,13 @@ class ReloadTestCase(MockCeleryMixin, TestCase):
self
.
u1
=
User
.
objects
.
create
(
username
=
'user1'
)
self
.
u1
=
User
.
objects
.
create
(
username
=
'user1'
)
self
.
u1
.
save
()
self
.
u1
.
save
()
d
=
Domain
.
objects
.
create
(
name
=
'example.org'
,
owner
=
self
.
u1
)
d
=
Domain
.
objects
.
create
(
name
=
'example.org'
,
owner
=
self
.
u1
)
self
.
vlan
=
Vlan
(
vid
=
1
,
name
=
'test'
,
network4
=
'10.0.0.
0
/29'
,
self
.
vlan
=
Vlan
(
vid
=
1
,
name
=
'test'
,
network4
=
'10.0.0.
1
/29'
,
snat_ip
=
'152.66.243.99'
,
snat_ip
=
'152.66.243.99'
,
network6
=
'2001:738:2001:4031::/80'
,
domain
=
d
,
network6
=
'2001:738:2001:4031::/80'
,
domain
=
d
,
owner
=
self
.
u1
,
network_type
=
'portforward'
,
owner
=
self
.
u1
,
network_type
=
'portforward'
,
dhcp_pool
=
'manual'
)
dhcp_pool
=
'manual'
)
self
.
vlan
.
save
()
self
.
vlan
.
save
()
self
.
vlan2
=
Vlan
(
vid
=
2
,
name
=
'pub'
,
network4
=
'10.1.0.
0
/29'
,
self
.
vlan2
=
Vlan
(
vid
=
2
,
name
=
'pub'
,
network4
=
'10.1.0.
1
/29'
,
network6
=
'2001:738:2001:4032::/80'
,
domain
=
d
,
network6
=
'2001:738:2001:4032::/80'
,
domain
=
d
,
owner
=
self
.
u1
,
network_type
=
'public'
)
owner
=
self
.
u1
,
network_type
=
'public'
)
self
.
vlan2
.
save
()
self
.
vlan2
.
save
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment