Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Gelencsér Szabolcs
/
circlestack
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
6b20ceba
authored
Mar 01, 2014
by
Bach Dániel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
firewall: rename firewall fields
parent
79d910dc
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
11 additions
and
9 deletions
+11
-9
circle/dashboard/fixtures/node.json
+0
-1
circle/firewall/admin.py
+2
-2
circle/firewall/migrations/0045_auto__del_field_host_pub_ipv4__add_field_host_external_ipv4__del_field.py
+0
-0
circle/firewall/migrations/0046_auto__chg_field_rule_priority.py
+0
-0
circle/firewall/models.py
+0
-0
circle/firewall/tasks/local_tasks.py
+1
-1
circle/firewall/tests/test_firewall.py
+2
-2
circle/network/forms.py
+2
-1
circle/network/tables.py
+2
-1
circle/network/templates/network/columns/host-rule.html
+2
-1
No files found.
circle/dashboard/fixtures/node.json
View file @
6b20ceba
...
...
@@ -33,7 +33,6 @@
"hostname"
:
"devenv"
,
"modified_at"
:
"2014-02-24T15:55:01.412Z"
,
"location"
:
""
,
"pub_ipv4"
:
null
,
"mac"
:
"11:22:33:44:55:66"
,
"shared_ip"
:
false
,
"ipv4"
:
"10.7.0.96"
,
...
...
circle/firewall/admin.py
View file @
6b20ceba
...
...
@@ -16,7 +16,7 @@ class RecordInline(contrib.admin.TabularInline):
class
HostAdmin
(
admin
.
ModelAdmin
):
list_display
=
(
'hostname'
,
'vlan'
,
'ipv4'
,
'ipv6'
,
'
pub
_ipv4'
,
'mac'
,
list_display
=
(
'hostname'
,
'vlan'
,
'ipv4'
,
'ipv6'
,
'
external
_ipv4'
,
'mac'
,
'shared_ip'
,
'owner'
,
'description'
,
'reverse'
,
'list_groups'
)
ordering
=
(
'hostname'
,
)
...
...
@@ -49,7 +49,7 @@ class VlanAdmin(admin.ModelAdmin):
class
RuleAdmin
(
admin
.
ModelAdmin
):
list_display
=
(
'r_type'
,
'color_desc'
,
'owner'
,
'extra'
,
'direction'
,
'accept'
,
'proto'
,
'sport'
,
'dport'
,
'nat'
,
'nat_
d
port'
,
'used_in'
)
'nat_
external_
port'
,
'used_in'
)
list_filter
=
(
'vlan'
,
'owner'
,
'direction'
,
'accept'
,
'proto'
,
'nat'
)
...
...
circle/firewall/migrations/0045_auto__del_field_host_pub_ipv4__add_field_host_external_ipv4__del_field.py
0 → 100644
View file @
6b20ceba
This diff is collapsed.
Click to expand it.
circle/firewall/migrations/0046_auto__chg_field_rule_priority.py
0 → 100644
View file @
6b20ceba
This diff is collapsed.
Click to expand it.
circle/firewall/models.py
View file @
6b20ceba
This diff is collapsed.
Click to expand it.
circle/firewall/tasks/local_tasks.py
View file @
6b20ceba
...
...
@@ -48,7 +48,7 @@ def periodic_task():
@celery.task
def
reloadtask
(
type
=
'Host'
):
def
reloadtask
(
type
=
'Host'
,
timeout
=
15
):
reload
=
{
'Host'
:
[
'dns'
,
'dhcp'
,
'firewall'
],
'Record'
:
[
'dns'
],
...
...
circle/firewall/tests/test_firewall.py
View file @
6b20ceba
...
...
@@ -96,12 +96,12 @@ class HostGetHostnameTestCase(TestCase):
self
.
vlan
.
save
()
self
.
h
=
Host
(
hostname
=
'h'
,
mac
=
'01:02:03:04:05:00'
,
ipv4
=
'10.0.0.1'
,
vlan
=
self
.
vlan
,
owner
=
self
.
u1
,
shared_ip
=
True
,
pub
_ipv4
=
self
.
vlan
.
snat_ip
)
external
_ipv4
=
self
.
vlan
.
snat_ip
)
self
.
h
.
save
()
def
test_issue_93_wo_record
(
self
):
self
.
assertEqual
(
self
.
h
.
get_hostname
(
proto
=
'ipv4'
,
public
=
True
),
unicode
(
self
.
h
.
pub
_ipv4
))
unicode
(
self
.
h
.
external
_ipv4
))
def
test_issue_93_w_record
(
self
):
self
.
r
=
Record
(
name
=
'vm'
,
type
=
'A'
,
domain
=
self
.
d
,
owner
=
self
.
u1
,
...
...
circle/network/forms.py
View file @
6b20ceba
...
...
@@ -167,7 +167,8 @@ class RuleForm(ModelForm):
'accept'
,
'owner'
,
'nat'
,
'nat_dport'
,
'nat_external_port'
,
'nat_external_ipv4'
,
),
Fieldset
(
'External'
,
...
...
circle/network/tables.py
View file @
6b20ceba
...
...
@@ -128,7 +128,8 @@ class RuleTable(Table):
model
=
Rule
attrs
=
{
'class'
:
'table table-striped table-hover table-condensed'
}
fields
=
(
'r_type'
,
'color_desc'
,
'owner'
,
'extra'
,
'direction'
,
'accept'
,
'proto'
,
'sport'
,
'dport'
,
'nat'
,
'nat_dport'
,
)
'accept'
,
'proto'
,
'sport'
,
'dport'
,
'nat'
,
'nat_external_port'
,
)
order_by
=
'direction'
...
...
circle/network/templates/network/columns/host-rule.html
View file @
6b20ceba
...
...
@@ -33,5 +33,6 @@
{% if record.nat %}
<span
class=
"label label-success"
>
NAT
[ {{ record.dport }}
<i
class=
"icon-arrow-right"
></i>
{{record.nat_dport}} ]
</span>
[ {{ record.dport }}
<i
class=
"icon-arrow-right"
></i>
{{record.nat_external_port}} ]
</span>
{% endif %}
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