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
d0ae883e
authored
Jun 13, 2013
by
Bach Dániel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
firewall, one: random fixes
parent
a0658ef3
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
2 deletions
+7
-2
.gitignore
+3
-0
Makefile
+1
-0
firewall/fw.py
+0
-2
one/models.py
+3
-0
No files found.
.gitignore
View file @
d0ae883e
...
@@ -51,3 +51,6 @@ client.crt
...
@@ -51,3 +51,6 @@ client.crt
client.key
client.key
miscellaneous/store-server/store.config
miscellaneous/store-server/store.config
celerybeat-schedule
celerybeat.pid
Makefile
View file @
d0ae883e
...
@@ -15,6 +15,7 @@ po:
...
@@ -15,6 +15,7 @@ po:
for
i
in
*
/
;
do
cd
$$
i
;
../manage.py makemessages
--all
-d
djangojs
||
true
;
cd
..
;
done
for
i
in
*
/
;
do
cd
$$
i
;
../manage.py makemessages
--all
-d
djangojs
||
true
;
cd
..
;
done
migrate
:
migrate
:
./manage.py syncdb
||
true
./manage.py migrate
./manage.py migrate
generatestatic
:
$(jsfiles) one/static/style/style.css
generatestatic
:
$(jsfiles) one/static/style/style.css
...
...
firewall/fw.py
View file @
d0ae883e
...
@@ -17,7 +17,6 @@ class Firewall:
...
@@ -17,7 +17,6 @@ class Firewall:
RULES
=
None
RULES
=
None
RULES_NAT
=
[]
RULES_NAT
=
[]
vlans
=
None
vlans
=
None
dmz
=
None
pub
=
None
pub
=
None
hosts
=
None
hosts
=
None
fw
=
None
fw
=
None
...
@@ -269,7 +268,6 @@ class Firewall:
...
@@ -269,7 +268,6 @@ class Firewall:
self
.
IPV6
=
IPV6
self
.
IPV6
=
IPV6
self
.
vlans
=
models
.
Vlan
.
objects
.
all
()
self
.
vlans
=
models
.
Vlan
.
objects
.
all
()
self
.
hosts
=
models
.
Host
.
objects
.
all
()
self
.
hosts
=
models
.
Host
.
objects
.
all
()
self
.
dmz
=
models
.
Vlan
.
objects
.
get
(
name
=
'DMZ'
)
self
.
pub
=
models
.
Vlan
.
objects
.
get
(
name
=
'PUB'
)
self
.
pub
=
models
.
Vlan
.
objects
.
get
(
name
=
'PUB'
)
self
.
fw
=
models
.
Firewall
.
objects
.
all
()
self
.
fw
=
models
.
Firewall
.
objects
.
all
()
self
.
ipt_filter
()
self
.
ipt_filter
()
...
...
one/models.py
View file @
d0ae883e
...
@@ -101,6 +101,7 @@ class UserCloudDetails(models.Model):
...
@@ -101,6 +101,7 @@ class UserCloudDetails(models.Model):
def
set_quota
(
sender
,
instance
,
created
,
**
kwargs
):
def
set_quota
(
sender
,
instance
,
created
,
**
kwargs
):
try
:
if
not
StoreApi
.
userexist
(
instance
.
user
.
username
):
if
not
StoreApi
.
userexist
(
instance
.
user
.
username
):
try
:
try
:
password
=
instance
.
smb_password
password
=
instance
.
smb_password
...
@@ -115,6 +116,8 @@ def set_quota(sender, instance, created, **kwargs):
...
@@ -115,6 +116,8 @@ def set_quota(sender, instance, created, **kwargs):
else
:
else
:
StoreApi
.
set_quota
(
instance
.
user
.
username
,
StoreApi
.
set_quota
(
instance
.
user
.
username
,
instance
.
disk_quota
*
1024
)
instance
.
disk_quota
*
1024
)
except
:
pass
post_save
.
connect
(
set_quota
,
sender
=
UserCloudDetails
)
post_save
.
connect
(
set_quota
,
sender
=
UserCloudDetails
)
...
...
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