Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Gelencsér Szabolcs
/
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
828b5255
authored
Jun 14, 2014
by
Bach Dániel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix flake8 errors
parent
7e278a2c
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
8 additions
and
8 deletions
+8
-8
circle/circle/urls.py
+1
-1
circle/firewall/models.py
+2
-2
circle/firewall/tests/test_firewall.py
+1
-1
circle/network/tables.py
+2
-2
circle/vm/models/common.py
+2
-2
No files found.
circle/circle/urls.py
View file @
828b5255
...
...
@@ -30,7 +30,7 @@ admin.autodiscover()
urlpatterns
=
patterns
(
''
,
#url(r'^$', TemplateView.as_view(template_name='base.html')),
#
url(r'^$', TemplateView.as_view(template_name='base.html')),
# Examples:
# url(r'^$', 'circle.views.home', name='home'),
...
...
circle/firewall/models.py
View file @
828b5255
...
...
@@ -52,7 +52,7 @@ class Rule(models.Model):
Others set address translation or other free-form iptables parameters.
"""
CHOICES_type
=
((
'host'
,
'host'
),
(
'firewall'
,
'firewall'
),
(
'vlan'
,
'vlan'
))
(
'vlan'
,
'vlan'
))
CHOICES_proto
=
((
'tcp'
,
'tcp'
),
(
'udp'
,
'udp'
),
(
'icmp'
,
'icmp'
))
CHOICES_dir
=
((
'out'
,
_
(
'out'
)),
(
'in'
,
_
(
'in'
)))
CHOICES_action
=
((
'accept'
,
_
(
'accept'
)),
(
'drop'
,
_
(
'drop'
)),
...
...
@@ -820,7 +820,7 @@ class Domain(models.Model):
class
Record
(
models
.
Model
):
CHOICES_type
=
((
'A'
,
'A'
),
(
'CNAME'
,
'CNAME'
),
(
'AAAA'
,
'AAAA'
),
(
'MX'
,
'MX'
),
(
'NS'
,
'NS'
),
(
'PTR'
,
'PTR'
),
(
'TXT'
,
'TXT'
))
(
'MX'
,
'MX'
),
(
'NS'
,
'NS'
),
(
'PTR'
,
'PTR'
),
(
'TXT'
,
'TXT'
))
name
=
models
.
CharField
(
max_length
=
40
,
validators
=
[
val_domain
],
blank
=
True
,
null
=
True
,
verbose_name
=
_
(
'name'
))
domain
=
models
.
ForeignKey
(
'Domain'
,
verbose_name
=
_
(
'domain'
))
...
...
circle/firewall/tests/test_firewall.py
View file @
828b5255
...
...
@@ -319,7 +319,7 @@ class ReloadTestCase(TestCase):
'tcp'
,
public
=
1000
,
private
=
22
)
def
test_periodic_task
(
self
):
#TODO
#
TODO
with
patch
(
'firewall.tasks.local_tasks.cache'
)
as
cache
:
self
.
test_host_add_port
()
self
.
test_host_add_port2
()
...
...
circle/network/tables.py
View file @
828b5255
...
...
@@ -120,7 +120,7 @@ class RecordTable(Table):
fields
=
(
'type'
,
'fqdn'
,
'host'
,
'address'
,
'ttl'
,
'host'
,
'owner'
,
)
sequence
=
(
'type'
,
'fqdn'
,
)
#order_by = 'name'
#
order_by = 'name'
class
SmallRecordTable
(
Table
):
...
...
@@ -131,7 +131,7 @@ class SmallRecordTable(Table):
attrs
=
{
'class'
:
'table table-striped table-bordered'
}
fields
=
(
'type'
,
'fqdn'
,
'host'
,
'address'
,
)
sequence
=
(
'type'
,
'fqdn'
,
)
#order_by = '-type'
#
order_by = '-type'
orderable
=
False
...
...
circle/vm/models/common.py
View file @
828b5255
...
...
@@ -55,8 +55,8 @@ class NamedBaseResourceConfig(BaseResourceConfigModel, TimeStampedModel):
"""Pre-created, named base resource configurations.
"""
name
=
CharField
(
max_length
=
50
,
unique
=
True
,
verbose_name
=
_
(
'name'
),
help_text
=
_
(
'Name of base resource configuration.'
))
verbose_name
=
_
(
'name'
),
help_text
=
_
(
'Name of base resource configuration.'
))
class
Meta
:
app_label
=
'vm'
...
...
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