Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
CIRCLE
/
cloud
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
94
Merge Requests
10
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
1b373927
authored
Jul 24, 2013
by
Kálmán Viktor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
firewall: private get_name into property
parent
5fa500ad
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
firewall/models.py
+3
-2
No files found.
firewall/models.py
View file @
1b373927
...
@@ -642,7 +642,8 @@ class Record(models.Model):
...
@@ -642,7 +642,8 @@ class Record(models.Model):
else
:
else
:
self
.
_validate_wo_host
()
self
.
_validate_wo_host
()
def
__get_name
(
self
):
@property
def
fqdn
(
self
):
if
self
.
host
and
self
.
type
!=
'MX'
:
if
self
.
host
and
self
.
type
!=
'MX'
:
if
self
.
type
in
[
'A'
,
'AAAA'
]:
if
self
.
type
in
[
'A'
,
'AAAA'
]:
return
self
.
host
.
get_fqdn
()
return
self
.
host
.
get_fqdn
()
...
@@ -670,7 +671,7 @@ class Record(models.Model):
...
@@ -670,7 +671,7 @@ class Record(models.Model):
return
self
.
address
return
self
.
address
def
get_data
(
self
):
def
get_data
(
self
):
name
=
self
.
__get_name
()
name
=
self
.
fqdn
address
=
self
.
__get_address
()
address
=
self
.
__get_address
()
if
self
.
host
and
self
.
type
==
'AAAA'
and
not
self
.
host
.
ipv6
:
if
self
.
host
and
self
.
type
==
'AAAA'
and
not
self
.
host
.
ipv6
:
return
None
return
None
...
...
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