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
8f8e50e0
authored
Mar 30, 2015
by
Kálmán Viktor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
network: explicitly specify form fields when possible
parent
253bce91
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
12 deletions
+23
-12
circle/dashboard/forms.py
+3
-2
circle/network/forms.py
+20
-10
No files found.
circle/dashboard/forms.py
View file @
8f8e50e0
...
...
@@ -1605,7 +1605,7 @@ class DataStoreForm(ModelForm):
class
Meta
:
model
=
DataStore
exclude
=
(
)
fields
=
(
"name"
,
"path"
,
"hostname"
,
)
class
DiskForm
(
ModelForm
):
...
...
@@ -1617,4 +1617,5 @@ class DiskForm(ModelForm):
class
Meta
:
model
=
Disk
exclude
=
()
fields
=
(
"name"
,
"filename"
,
"datastore"
,
"type"
,
"bus"
,
"size"
,
"base"
,
"dev_num"
,
"destroyed"
,
"is_ready"
,
)
circle/network/forms.py
View file @
8f8e50e0
...
...
@@ -69,7 +69,8 @@ class BlacklistItemForm(ModelForm):
class
Meta
:
model
=
BlacklistItem
exclude
=
()
fields
=
(
"ipv4"
,
"host"
,
"expires_at"
,
"whitelisted"
,
"reason"
,
"snort_message"
,
)
class
DomainForm
(
ModelForm
):
...
...
@@ -91,7 +92,7 @@ class DomainForm(ModelForm):
class
Meta
:
model
=
Domain
exclude
=
(
)
fields
=
(
"name"
,
"ttl"
,
"owner"
,
)
class
FirewallForm
(
ModelForm
):
...
...
@@ -107,7 +108,7 @@ class FirewallForm(ModelForm):
class
Meta
:
model
=
Firewall
exclude
=
(
)
fields
=
(
"name"
,
)
class
GroupForm
(
ModelForm
):
...
...
@@ -129,7 +130,7 @@ class GroupForm(ModelForm):
class
Meta
:
model
=
Group
exclude
=
(
)
fields
=
(
"name"
,
"description"
,
"owner"
,
)
class
HostForm
(
ModelForm
):
...
...
@@ -169,7 +170,9 @@ class HostForm(ModelForm):
class
Meta
:
model
=
Host
exclude
=
()
fields
=
(
"hostname"
,
"reverse"
,
"mac"
,
"vlan"
,
"shared_ip"
,
"ipv4"
,
"ipv6"
,
"external_ipv4"
,
"description"
,
"location"
,
"comment"
,
"owner"
,
)
class
RecordForm
(
ModelForm
):
...
...
@@ -196,7 +199,8 @@ class RecordForm(ModelForm):
class
Meta
:
model
=
Record
exclude
=
()
fields
=
(
"type"
,
"host"
,
"name"
,
"domain"
,
"address"
,
"ttl"
,
"description"
,
"owner"
,
)
class
RuleForm
(
ModelForm
):
...
...
@@ -236,7 +240,10 @@ class RuleForm(ModelForm):
class
Meta
:
model
=
Rule
exclude
=
()
fields
=
(
"direction"
,
"description"
,
"foreign_network"
,
"dport"
,
"sport"
,
"weight"
,
"proto"
,
"extra"
,
"action"
,
"owner"
,
"nat"
,
"nat_external_port"
,
"nat_external_ipv4"
,
"vlan"
,
"vlangroup"
,
"host"
,
"hostgroup"
,
"firewall"
,
)
class
SwitchPortForm
(
ModelForm
):
...
...
@@ -259,7 +266,7 @@ class SwitchPortForm(ModelForm):
class
Meta
:
model
=
SwitchPort
exclude
=
(
)
fields
=
(
"untagged_vlan"
,
"tagged_vlans"
,
"description"
,
)
class
VlanForm
(
ModelForm
):
...
...
@@ -313,7 +320,10 @@ class VlanForm(ModelForm):
widgets
=
{
'ipv6_template'
:
widgets
.
TextInput
,
}
exclude
=
()
fields
=
(
"name"
,
"vid"
,
"network_type"
,
"managed"
,
"network4"
,
"snat_to"
,
"snat_ip"
,
"dhcp_pool"
,
"network6"
,
"ipv6_template"
,
"host_ipv6_prefixlen"
,
"domain"
,
"reverse_domain"
,
"description"
,
"comment"
,
"owner"
,
)
class
VlanGroupForm
(
ModelForm
):
...
...
@@ -337,4 +347,4 @@ class VlanGroupForm(ModelForm):
class
Meta
:
model
=
VlanGroup
exclude
=
(
)
fields
=
(
"name"
,
"vlans"
,
"description"
,
"owner"
,
)
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