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
a5871282
authored
Feb 25, 2013
by
Bach Dániel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
devenv: jól szétbachtuk a devenvet, mindenki jön a másiknak egy sörrel :(
parent
8228841b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
200 additions
and
775 deletions
+200
-775
miscellaneous/devenv/nextinit.sh
+19
-15
miscellaneous/dump.json
+173
-756
one/models.py
+8
-4
No files found.
miscellaneous/devenv/nextinit.sh
View file @
a5871282
...
...
@@ -5,15 +5,13 @@ for i in cloudstore toplist django
do
sudo
stop
$i
||
true
done
set
-x
cd
/opt/webadmin/cloud
./manage.py syncdb
--noinput
./manage.py migrate
./manage.py loaddata miscellaneous/dump.json
./manage.py loaddata miscellaneous/devenv/dev.json
./manage.py update
./manage.py loaddata miscellaneous/devenv/dev.json
set
+x
sudo
apt-get install rabbitmq-server
sudo
rabbitmqctl delete_user guest
||
true
sudo
rabbitmqctl add_user nyuszi teszt
||
true
sudo
rabbitmqctl add_vhost django
||
true
sudo
rabbitmqctl set_permissions
-p
django nyuszi
'.*'
'.*'
'.*'
||
true
#Set up store server
rm
-rf
/var/www/
*
...
...
@@ -44,6 +42,18 @@ do
sudo
start
$i
done
set
-x
cd
/opt/webadmin/cloud
./manage.py syncdb
--noinput
./manage.py migrate
./manage.py loaddata miscellaneous/dump.json
./manage.py loaddata miscellaneous/devenv/dev.json
./manage.py update
./manage.py loaddata miscellaneous/devenv/dev.json
set
+x
cd
/opt/webadmin/cloud/miscellaneous/devenv
sudo
cp vimrc.local /etc/vim/vimrc.local
...
...
@@ -59,9 +69,3 @@ git config --global core.editor vim
true
sudo
apt-get install rabbitmq-server
sudo
rabbitmqctl delete_user guest
sudo
rabbitmqctl add_user nyuszi teszt
sudo
rabbitmqctl add_vhost django
sudo
rabbitmqctl set_permissions
-p
django nyuszi
'.*'
'.*'
'.*'
miscellaneous/dump.json
View file @
a5871282
...
...
@@ -138,13 +138,18 @@
"model"
:
"auth.user"
,
"fields"
:
{
"username"
:
"test"
,
"first_name"
:
"
T
eszt"
,
"last_name"
:
"
E
lek"
,
"first_name"
:
"
t
eszt"
,
"last_name"
:
"
e
lek"
,
"is_active"
:
true
,
"is_superuser"
:
true
,
"is_staff"
:
true
,
"last_login"
:
"2013-02-15T23:25:57Z"
,
"groups"
:
[],
"last_login"
:
"2013-02-25T18:32:39Z"
,
"groups"
:
[
3
,
4
,
1
,
2
],
"user_permissions"
:
[],
"email"
:
""
,
"date_joined"
:
"2013-01-16T12:36:01Z"
...
...
@@ -556,51 +561,6 @@
}
},
{
"pk"
:
11
,
"model"
:
"one.share"
,
"fields"
:
{
"group"
:
1
,
"name"
:
"Ubuntu 12s.04 desktop"
,
"created_at"
:
"2013-02-11T14:35:46Z"
,
"instance_limit"
:
10
,
"template"
:
17
,
"owner"
:
7
,
"per_user_limit"
:
1
,
"type"
:
"LAB"
,
"description"
:
""
}
},
{
"pk"
:
13
,
"model"
:
"one.share"
,
"fields"
:
{
"group"
:
1
,
"name"
:
"Ubuntu 12s.04 desktop"
,
"created_at"
:
"2013-02-12T10:05:08Z"
,
"instance_limit"
:
2
,
"template"
:
17
,
"owner"
:
7
,
"per_user_limit"
:
4
,
"type"
:
"LAB"
,
"description"
:
""
}
},
{
"pk"
:
15
,
"model"
:
"one.share"
,
"fields"
:
{
"group"
:
2
,
"name"
:
"Ubuntu 12s.04 desktop"
,
"created_at"
:
"2013-02-12T20:36:46Z"
,
"instance_limit"
:
10
,
"template"
:
17
,
"owner"
:
7
,
"per_user_limit"
:
1
,
"type"
:
"LAB"
,
"description"
:
""
}
},
{
"pk"
:
16
,
"model"
:
"one.share"
,
"fields"
:
{
...
...
@@ -639,97 +599,6 @@
},
{
"pk"
:
2
,
"model"
:
"one.disk"
,
"fields"
:
{
"name"
:
"template-10"
}
},
{
"pk"
:
3
,
"model"
:
"one.disk"
,
"fields"
:
{
"name"
:
"template-11-298"
}
},
{
"pk"
:
4
,
"model"
:
"one.disk"
,
"fields"
:
{
"name"
:
"template-12-300"
}
},
{
"pk"
:
5
,
"model"
:
"one.disk"
,
"fields"
:
{
"name"
:
"template-13-301"
}
},
{
"pk"
:
6
,
"model"
:
"one.disk"
,
"fields"
:
{
"name"
:
"template-14-303"
}
},
{
"pk"
:
7
,
"model"
:
"one.disk"
,
"fields"
:
{
"name"
:
"template-15-308"
}
},
{
"pk"
:
8
,
"model"
:
"one.disk"
,
"fields"
:
{
"name"
:
"template-16-309"
}
},
{
"pk"
:
9
,
"model"
:
"one.disk"
,
"fields"
:
{
"name"
:
"template-17-310"
}
},
{
"pk"
:
10
,
"model"
:
"one.disk"
,
"fields"
:
{
"name"
:
"template-19-318"
}
},
{
"pk"
:
11
,
"model"
:
"one.disk"
,
"fields"
:
{
"name"
:
"template-21-321"
}
},
{
"pk"
:
12
,
"model"
:
"one.disk"
,
"fields"
:
{
"name"
:
"template-29-326"
}
},
{
"pk"
:
13
,
"model"
:
"one.disk"
,
"fields"
:
{
"name"
:
"template-31-330"
}
},
{
"pk"
:
14
,
"model"
:
"one.disk"
,
"fields"
:
{
"name"
:
"template-32-331"
}
},
{
"pk"
:
2
,
"model"
:
"one.network"
,
"fields"
:
{
"name"
:
"VM-NET"
,
...
...
@@ -789,7 +658,7 @@
"state"
:
"NEW"
,
"owner"
:
1
,
"disk"
:
1
,
"public"
:
tru
e
,
"public"
:
fals
e
,
"network"
:
2
}
},
...
...
@@ -799,98 +668,13 @@
"fields"
:
{
"name"
:
"Windows 7"
,
"created_at"
:
"2013-01-31T10:11:21Z"
,
"description"
:
"
Ez j
\u
00f3 cuccos
"
,
"system"
:
"
Windows 7 Entersp
\u
00e1jzi 64 bites
"
,
"description"
:
""
,
"system"
:
""
,
"access_type"
:
"rdp"
,
"instance_type"
:
2
,
"state"
:
"
READY
"
,
"state"
:
"
NEW
"
,
"owner"
:
1
,
"disk"
:
1
,
"public"
:
true
,
"network"
:
2
}
},
{
"pk"
:
17
,
"model"
:
"one.template"
,
"fields"
:
{
"name"
:
"Ubuntu 12s.04 desktop"
,
"created_at"
:
"2013-02-10T21:45:05Z"
,
"description"
:
""
,
"system"
:
""
,
"access_type"
:
"nx"
,
"instance_type"
:
2
,
"state"
:
"READY"
,
"owner"
:
7
,
"disk"
:
9
,
"public"
:
false
,
"network"
:
2
}
},
{
"pk"
:
19
,
"model"
:
"one.template"
,
"fields"
:
{
"name"
:
"Ubuntu 12.04 desktop a"
,
"created_at"
:
"2013-02-12T14:45:50Z"
,
"description"
:
"h"
,
"system"
:
""
,
"access_type"
:
"nx"
,
"instance_type"
:
2
,
"state"
:
"READY"
,
"owner"
:
7
,
"disk"
:
10
,
"public"
:
false
,
"network"
:
2
}
},
{
"pk"
:
21
,
"model"
:
"one.template"
,
"fields"
:
{
"name"
:
"Windows 7asdasd"
,
"created_at"
:
"2013-02-12T20:31:13Z"
,
"description"
:
"Ez j
\u
00f3 cuccos
\u
00e9s nagy l
\u
00f3fasz"
,
"system"
:
"Windows 7 Entersp
\u
00e1jzi 64 bites"
,
"access_type"
:
"rdp"
,
"instance_type"
:
1
,
"state"
:
"READY"
,
"owner"
:
7
,
"disk"
:
11
,
"public"
:
false
,
"network"
:
2
}
},
{
"pk"
:
29
,
"model"
:
"one.template"
,
"fields"
:
{
"name"
:
"Ubuntu 12.04 desktop 22"
,
"created_at"
:
"2013-02-12T23:59:54Z"
,
"description"
:
""
,
"system"
:
""
,
"access_type"
:
"nx"
,
"instance_type"
:
3
,
"state"
:
"READY"
,
"owner"
:
7
,
"disk"
:
12
,
"public"
:
false
,
"network"
:
2
}
},
{
"pk"
:
32
,
"model"
:
"one.template"
,
"fields"
:
{
"name"
:
"Windows 7asdasd 30"
,
"created_at"
:
"2013-02-13T00:40:52Z"
,
"description"
:
"Ez j
\u
00f3 cuccos
\u
00e9s nagy l
\u
00f3fasz"
,
"system"
:
"Windows 7 Entersp
\u
00e1jzi 64 bites"
,
"access_type"
:
"rdp"
,
"instance_type"
:
1
,
"state"
:
"READY"
,
"owner"
:
7
,
"disk"
:
14
,
"public"
:
false
,
"network"
:
2
}
...
...
@@ -916,26 +700,6 @@
}
},
{
"pk"
:
310
,
"model"
:
"one.instance"
,
"fields"
:
{
"name"
:
"test Ubuntu 12s.04 desktop (53)"
,
"time_of_suspend"
:
null
,
"ip"
:
"10.9.1.15"
,
"created_at"
:
"2013-02-10T21:45:05Z"
,
"share"
:
null
,
"waiting"
:
false
,
"firewall_host"
:
null
,
"active_since"
:
null
,
"state"
:
"DONE"
,
"template"
:
17
,
"owner"
:
7
,
"time_of_delete"
:
null
,
"one_id"
:
53
,
"pw"
:
"WdwrHAxtPj"
}
},
{
"pk"
:
312
,
"model"
:
"one.instance"
,
"fields"
:
{
...
...
@@ -956,343 +720,227 @@
}
},
{
"pk"
:
3
1
4
,
"pk"
:
3
2
4
,
"model"
:
"one.instance"
,
"fields"
:
{
"name"
:
"test
Ubuntu 12s.04 desktop (5
7)"
,
"time_of_suspend"
:
"2013-02-1
2T15:00:35
Z"
,
"ip"
:
"10.9.1.
1
6"
,
"created_at"
:
"2013-02-12T
19:36:54
Z"
,
"share"
:
11
,
"name"
:
"test
Windows 7 (6
7)"
,
"time_of_suspend"
:
"2013-02-1
3T01:44:44
Z"
,
"ip"
:
"10.9.1.
2
6"
,
"created_at"
:
"2013-02-12T
22:33:49
Z"
,
"share"
:
null
,
"waiting"
:
false
,
"firewall_host"
:
null
,
"active_since"
:
null
,
"state"
:
"DONE"
,
"template"
:
1
7
,
"template"
:
1
0
,
"owner"
:
7
,
"time_of_delete"
:
"2013-02-27T
10:00:35
Z"
,
"one_id"
:
5
7
,
"pw"
:
"Y
LNvyFBMNa
"
"time_of_delete"
:
"2013-02-27T
20:44:44
Z"
,
"one_id"
:
6
7
,
"pw"
:
"Y
jQxeHaNkh
"
}
},
{
"pk"
:
315
,
"model"
:
"
one.instance
"
,
"pk"
:
1
,
"model"
:
"
school.person
"
,
"fields"
:
{
"name"
:
"test Ubuntu 12s.04 desktop (58)"
,
"time_of_suspend"
:
"2013-02-12T15:01:35Z"
,
"ip"
:
"10.9.1.17"
,
"created_at"
:
"2013-02-12T21:57:50Z"
,
"share"
:
11
,
"waiting"
:
false
,
"firewall_host"
:
null
,
"active_since"
:
null
,
"state"
:
"DONE"
,
"template"
:
17
,
"owner"
:
7
,
"time_of_delete"
:
"2013-02-27T10:01:35Z"
,
"one_id"
:
58
,
"pw"
:
"mfQk6wxMJB"
"code"
:
"root"
,
"user"
:
null
,
"language"
:
"hu"
}
},
{
"pk"
:
316
,
"model"
:
"
one.instance
"
,
"pk"
:
2
,
"model"
:
"
school.person
"
,
"fields"
:
{
"name"
:
"test Ubuntu 12s.04 desktop (59)"
,
"time_of_suspend"
:
"2013-02-12T15:05:22Z"
,
"ip"
:
"10.9.1.18"
,
"created_at"
:
"2013-02-12T22:33:18Z"
,
"share"
:
13
,
"waiting"
:
false
,
"firewall_host"
:
null
,
"active_since"
:
null
,
"state"
:
"DONE"
,
"template"
:
17
,
"owner"
:
7
,
"time_of_delete"
:
"2013-02-27T10:05:22Z"
,
"one_id"
:
59
,
"pw"
:
"fdrrRxm33W"
"code"
:
"bd"
,
"user"
:
null
,
"language"
:
"hu"
}
},
{
"pk"
:
3
17
,
"model"
:
"
one.instance
"
,
"pk"
:
3
,
"model"
:
"
school.person
"
,
"fields"
:
{
"name"
:
"test Ubuntu 12s.04 desktop (60)"
,
"time_of_suspend"
:
"2013-02-13T01:14:28Z"
,
"ip"
:
"10.9.1.19"
,
"created_at"
:
"2013-02-12T20:43:59Z"
,
"share"
:
13
,
"waiting"
:
false
,
"firewall_host"
:
null
,
"active_since"
:
null
,
"state"
:
"DONE"
,
"template"
:
17
,
"owner"
:
7
,
"time_of_delete"
:
"2013-02-27T20:14:42Z"
,
"one_id"
:
60
,
"pw"
:
"WZ6pQatURa"
"code"
:
"mate"
,
"user"
:
null
,
"language"
:
"hu"
}
},
{
"pk"
:
318
,
"model"
:
"
one.instance
"
,
"pk"
:
4
,
"model"
:
"
school.person
"
,
"fields"
:
{
"name"
:
"test Ubuntu 12.04 desktop a (61)"
,
"time_of_suspend"
:
"2013-02-12T19:45:50Z"
,
"ip"
:
"10.9.1.20"
,
"created_at"
:
"2013-02-12T23:25:17Z"
,
"share"
:
null
,
"waiting"
:
false
,
"firewall_host"
:
null
,
"active_since"
:
null
,
"state"
:
"DONE"
,
"template"
:
19
,
"owner"
:
7
,
"time_of_delete"
:
"2013-02-27T14:45:50Z"
,
"one_id"
:
61
,
"pw"
:
"zpYJBjErtQ"
"code"
:
"tarokkk"
,
"user"
:
null
,
"language"
:
"hu"
}
},
{
"pk"
:
320
,
"model"
:
"
one.instance
"
,
"pk"
:
5
,
"model"
:
"
school.person
"
,
"fields"
:
{
"name"
:
"test Ubuntu 12s.04 desktop (63)"
,
"time_of_suspend"
:
"2013-02-13T01:30:46Z"
,
"ip"
:
"10.9.1.22"
,
"created_at"
:
"2013-02-12T23:36:02Z"
,
"share"
:
null
,
"waiting"
:
false
,
"firewall_host"
:
null
,
"active_since"
:
null
,
"state"
:
"DONE"
,
"template"
:
17
,
"owner"
:
7
,
"time_of_delete"
:
"2013-02-27T20:30:46Z"
,
"one_id"
:
63
,
"pw"
:
"wZRvZZXbxd"
"code"
:
"opennebula"
,
"user"
:
null
,
"language"
:
"hu"
}
},
{
"pk"
:
321
,
"model"
:
"
one.instance
"
,
"pk"
:
6
,
"model"
:
"
school.person
"
,
"fields"
:
{
"name"
:
"test Windows 7asdasd (64)"
,
"time_of_suspend"
:
"2013-02-13T01:31:13Z"
,
"ip"
:
"10.9.1.23"
,
"created_at"
:
"2013-02-12T23:33:09Z"
,
"share"
:
null
,
"waiting"
:
false
,
"firewall_host"
:
null
,
"active_since"
:
null
,
"state"
:
"DONE"
,
"template"
:
21
,
"owner"
:
7
,
"time_of_delete"
:
"2013-02-27T20:31:13Z"
,
"one_id"
:
64
,
"pw"
:
"6y6Mbh779P"
"code"
:
"lennon"
,
"user"
:
null
,
"language"
:
"hu"
}
},
{
"pk"
:
324
,
"model"
:
"
one.instance
"
,
"pk"
:
7
,
"model"
:
"
school.person
"
,
"fields"
:
{
"name"
:
"test Windows 7 (67)"
,
"time_of_suspend"
:
"2013-02-13T01:44:44Z"
,
"ip"
:
"10.9.1.26"
,
"created_at"
:
"2013-02-12T22:33:49Z"
,
"share"
:
null
,
"waiting"
:
false
,
"firewall_host"
:
null
,
"active_since"
:
null
,
"state"
:
"DONE"
,
"template"
:
10
,
"owner"
:
7
,
"time_of_delete"
:
"2013-02-27T20:44:44Z"
,
"one_id"
:
67
,
"pw"
:
"YjQxeHaNkh"
"code"
:
"test"
,
"user"
:
7
,
"language"
:
"hu"
}
},
{
"pk"
:
326
,
"model"
:
"
one.instance
"
,
"pk"
:
8
,
"model"
:
"
school.person
"
,
"fields"
:
{
"name"
:
"test Ubuntu 12.04 desktop 22 (69)"
,
"time_of_suspend"
:
"2013-02-13T04:59:54Z"
,
"ip"
:
"10.9.1.27"
,
"created_at"
:
"2013-02-12T23:59:54Z"
,
"share"
:
null
,
"waiting"
:
false
,
"firewall_host"
:
null
,
"active_since"
:
null
,
"state"
:
"DONE"
,
"template"
:
29
,
"owner"
:
7
,
"time_of_delete"
:
"2013-02-27T23:59:54Z"
,
"one_id"
:
69
,
"pw"
:
"yXuM8pSNCZ"
"code"
:
"JI1M92"
,
"user"
:
null
,
"language"
:
"hu"
}
},
{
"pk"
:
9
,
"model"
:
"school.person"
,
"fields"
:
{
"code"
:
"TFDAZ6"
,
"user"
:
null
,
"language"
:
"hu"
}
},
{
"pk"
:
10
,
"model"
:
"school.person"
,
"fields"
:
{
"code"
:
"K7YLW5"
,
"user"
:
null
,
"language"
:
"hu"
}
},
{
"pk"
:
11
,
"model"
:
"school.person"
,
"fields"
:
{
"code"
:
"UYD1S5"
,
"user"
:
null
,
"language"
:
"hu"
}
},
{
"pk"
:
12
,
"model"
:
"school.person"
,
"fields"
:
{
"code"
:
"FFRUNU"
,
"user"
:
null
,
"language"
:
"hu"
}
},
{
"pk"
:
328
,
"model"
:
"
one.instance
"
,
"pk"
:
13
,
"model"
:
"
school.person
"
,
"fields"
:
{
"name"
:
"test Ubuntu 12s.04 desktop (71)"
,
"time_of_suspend"
:
"2013-02-13T05:14:35Z"
,
"ip"
:
"10.9.1.27"
,
"created_at"
:
"2013-02-13T00:15:24Z"
,
"share"
:
11
,
"waiting"
:
false
,
"firewall_host"
:
null
,
"active_since"
:
null
,
"state"
:
"DONE"
,
"template"
:
17
,
"owner"
:
7
,
"time_of_delete"
:
"2013-02-28T00:14:35Z"
,
"one_id"
:
71
,
"pw"
:
"KmP82kfFp6"
"code"
:
"HUT3L3"
,
"user"
:
null
,
"language"
:
"hu"
}
},
{
"pk"
:
329
,
"model"
:
"
one.instance
"
,
"pk"
:
14
,
"model"
:
"
school.person
"
,
"fields"
:
{
"name"
:
"test Ubuntu 12.04 desktop a (72)"
,
"time_of_suspend"
:
"2013-02-13T05:18:34Z"
,
"ip"
:
"10.9.1.27"
,
"created_at"
:
"2013-02-13T00:18:59Z"
,
"share"
:
null
,
"waiting"
:
false
,
"firewall_host"
:
null
,
"active_since"
:
null
,
"state"
:
"DONE"
,
"template"
:
19
,
"owner"
:
7
,
"time_of_delete"
:
"2013-02-28T00:18:34Z"
,
"one_id"
:
72
,
"pw"
:
"99czHqQFp6"
"code"
:
"ORL3EA"
,
"user"
:
null
,
"language"
:
"hu"
}
},
{
"pk"
:
331
,
"model"
:
"
one.instance
"
,
"pk"
:
15
,
"model"
:
"
school.person
"
,
"fields"
:
{
"name"
:
"test Windows 7asdasd 30 (74)"
,
"time_of_suspend"
:
"2013-02-13T05:40:52Z"
,
"ip"
:
"10.9.1.27"
,
"created_at"
:
"2013-02-13T00:40:52Z"
,
"share"
:
null
,
"waiting"
:
false
,
"firewall_host"
:
null
,
"active_since"
:
"2013-02-13T00:42:18Z"
,
"state"
:
"DONE"
,
"template"
:
32
,
"owner"
:
7
,
"time_of_delete"
:
"2013-02-28T00:40:52Z"
,
"one_id"
:
74
,
"pw"
:
"2YPTmTzHsR"
"code"
:
"B6AFNQ"
,
"user"
:
null
,
"language"
:
"hu"
}
},
{
"pk"
:
332
,
"model"
:
"
one.instance
"
,
"pk"
:
16
,
"model"
:
"
school.person
"
,
"fields"
:
{
"name"
:
"test Ubuntu 12s.04 desktop (75)"
,
"time_of_suspend"
:
"2013-02-13T05:42:34Z"
,
"ip"
:
"10.9.1.27"
,
"created_at"
:
"2013-02-13T00:42:34Z"
,
"share"
:
11
,
"waiting"
:
false
,
"firewall_host"
:
null
,
"active_since"
:
null
,
"state"
:
"DONE"
,
"template"
:
17
,
"owner"
:
7
,
"time_of_delete"
:
"2013-02-28T00:42:34Z"
,
"one_id"
:
75
,
"pw"
:
"RZfD72Jgmn"
"code"
:
"UKWBFI"
,
"user"
:
null
,
"language"
:
"hu"
}
},
{
"pk"
:
333
,
"model"
:
"
one.instance
"
,
"pk"
:
17
,
"model"
:
"
school.person
"
,
"fields"
:
{
"name"
:
"test Ubuntu 12s.04 desktop (76)"
,
"time_of_suspend"
:
"2013-02-13T05:54:47Z"
,
"ip"
:
"10.9.1.28"
,
"created_at"
:
"2013-02-13T00:54:47Z"
,
"share"
:
null
,
"waiting"
:
false
,
"firewall_host"
:
843
,
"active_since"
:
null
,
"state"
:
"DONE"
,
"template"
:
17
,
"owner"
:
7
,
"time_of_delete"
:
"2013-02-28T00:54:47Z"
,
"one_id"
:
76
,
"pw"
:
"HnYSzsMxZX"
"code"
:
"K2JL24"
,
"user"
:
null
,
"language"
:
"hu"
}
},
{
"pk"
:
347
,
"model"
:
"
one.instance
"
,
"pk"
:
1
,
"model"
:
"
school.semester
"
,
"fields"
:
{
"name"
:
"test Ubuntu 12s.04 desktop (79)"
,
"time_of_suspend"
:
null
,
"ip"
:
"10.9.1.31"
,
"created_at"
:
"2013-02-15T23:35:45Z"
,
"share"
:
11
,
"waiting"
:
false
,
"firewall_host"
:
null
,
"active_since"
:
null
,
"state"
:
"DONE"
,
"template"
:
17
,
"owner"
:
7
,
"time_of_delete"
:
null
,
"one_id"
:
79
,
"pw"
:
"6CaERLLwLg"
"start"
:
"2013-02-01"
,
"end"
:
"2013-06-01"
,
"name"
:
"asd"
}
},
{
"pk"
:
372
,
"model"
:
"
one.instance
"
,
"pk"
:
1
,
"model"
:
"
school.group
"
,
"fields"
:
{
"name"
:
"test Ubuntu 12s.04 desktop (104)"
,
"time_of_suspend"
:
"2013-02-19T23:34:19Z"
,
"ip"
:
"10.9.1.14"
,
"created_at"
:
"2013-02-19T18:34:19Z"
,
"share"
:
11
,
"waiting"
:
false
,
"firewall_host"
:
877
,
"active_since"
:
null
,
"state"
:
"ACTIVE"
,
"template"
:
17
,
"owner"
:
7
,
"time_of_delete"
:
"2013-03-06T18:34:19Z"
,
"one_id"
:
104
,
"pw"
:
"U4XAAEhDRT"
"course"
:
null
,
"semester"
:
1
,
"owners"
:
[],
"name"
:
"asd"
,
"members"
:
[]
}
},
{
"pk"
:
374
,
"model"
:
"
one.instance
"
,
"pk"
:
2
,
"model"
:
"
school.group
"
,
"fields"
:
{
"name"
:
"test Ubuntu 12s.04 desktop (105)"
,
"time_of_suspend"
:
"2013-02-19T23:43:17Z"
,
"ip"
:
"10.9.1.15"
,
"created_at"
:
"2013-02-19T18:43:17Z"
,
"share"
:
13
,
"waiting"
:
false
,
"firewall_host"
:
878
,
"active_since"
:
null
,
"state"
:
"PENDING"
,
"template"
:
17
,
"owner"
:
7
,
"time_of_delete"
:
"2013-03-06T18:43:17Z"
,
"one_id"
:
105
,
"pw"
:
"55W5neEvpx"
"course"
:
null
,
"semester"
:
1
,
"owners"
:
[
7
],
"name"
:
"asd"
,
"members"
:
[
1
,
2
,
3
,
4
,
5
,
6
,
7
,
8
,
9
,
10
,
11
,
12
,
13
,
14
,
15
,
16
,
17
]
}
},
{
...
...
@@ -2371,81 +2019,6 @@
}
},
{
"pk"
:
1262
,
"model"
:
"firewall.rule"
,
"fields"
:
{
"r_type"
:
"host"
,
"direction"
:
"1"
,
"vlan"
:
null
,
"description"
:
""
,
"proto"
:
"tcp"
,
"firewall"
:
null
,
"created_at"
:
"2013-02-13T00:54:47Z"
,
"extra"
:
""
,
"modified_at"
:
"2013-02-13T00:54:47Z"
,
"owner"
:
7
,
"accept"
:
true
,
"dport"
:
22284
,
"host"
:
843
,
"nat_dport"
:
22
,
"hostgroup"
:
null
,
"nat"
:
true
,
"foreign_network"
:
2
,
"sport"
:
null
,
"vlangroup"
:
null
}
},
{
"pk"
:
1263
,
"model"
:
"firewall.rule"
,
"fields"
:
{
"r_type"
:
"host"
,
"direction"
:
"1"
,
"vlan"
:
null
,
"description"
:
""
,
"proto"
:
"tcp"
,
"firewall"
:
null
,
"created_at"
:
"2013-02-19T18:40:00Z"
,
"extra"
:
""
,
"modified_at"
:
"2013-02-19T18:40:00Z"
,
"owner"
:
7
,
"accept"
:
true
,
"dport"
:
22270
,
"host"
:
877
,
"nat_dport"
:
22
,
"hostgroup"
:
null
,
"nat"
:
true
,
"foreign_network"
:
2
,
"sport"
:
null
,
"vlangroup"
:
null
}
},
{
"pk"
:
1264
,
"model"
:
"firewall.rule"
,
"fields"
:
{
"r_type"
:
"host"
,
"direction"
:
"1"
,
"vlan"
:
null
,
"description"
:
""
,
"proto"
:
"tcp"
,
"firewall"
:
null
,
"created_at"
:
"2013-02-19T18:43:17Z"
,
"extra"
:
""
,
"modified_at"
:
"2013-02-19T18:43:17Z"
,
"owner"
:
7
,
"accept"
:
true
,
"dport"
:
22271
,
"host"
:
878
,
"nat_dport"
:
22
,
"hostgroup"
:
null
,
"nat"
:
true
,
"foreign_network"
:
2
,
"sport"
:
null
,
"vlangroup"
:
null
}
},
{
"pk"
:
1
,
"model"
:
"firewall.vlan"
,
"fields"
:
{
...
...
@@ -4703,29 +4276,6 @@
}
},
{
"pk"
:
843
,
"model"
:
"firewall.host"
,
"fields"
:
{
"comment"
:
""
,
"vlan"
:
10
,
"reverse"
:
null
,
"created_at"
:
"2013-02-13T00:54:47Z"
,
"hostname"
:
"id-333_user-test"
,
"modified_at"
:
"2013-02-13T00:54:47Z"
,
"location"
:
""
,
"pub_ipv4"
:
"152.66.243.62"
,
"mac"
:
"02:00:0a:09:01:1c"
,
"shared_ip"
:
true
,
"ipv4"
:
"10.9.1.28"
,
"groups"
:
[
4
],
"ipv6"
:
"2001:738:2001:4031:9:1:28:0"
,
"owner"
:
7
,
"description"
:
""
}
},
{
"pk"
:
846
,
"model"
:
"firewall.host"
,
"fields"
:
{
...
...
@@ -4909,7 +4459,7 @@
"shared_ip"
:
true
,
"ipv4"
:
"10.9.1.111"
,
"groups"
:
[],
"ipv6"
:
"2
1001:738:2001:4031:9:1:
11:0"
,
"ipv6"
:
"2
001:738:2001:4031:9:1:1
11:0"
,
"owner"
:
7
,
"description"
:
""
}
...
...
@@ -4936,52 +4486,6 @@
}
},
{
"pk"
:
877
,
"model"
:
"firewall.host"
,
"fields"
:
{
"comment"
:
""
,
"vlan"
:
10
,
"reverse"
:
null
,
"created_at"
:
"2013-02-19T18:34:19Z"
,
"hostname"
:
"id-372_user-test"
,
"modified_at"
:
"2013-02-19T18:34:19Z"
,
"location"
:
""
,
"pub_ipv4"
:
"152.66.243.62"
,
"mac"
:
"02:00:0a:09:01:0e"
,
"shared_ip"
:
true
,
"ipv4"
:
"10.9.1.14"
,
"groups"
:
[
4
],
"ipv6"
:
"2001:738:2001:4031:9:1:14:0"
,
"owner"
:
7
,
"description"
:
""
}
},
{
"pk"
:
878
,
"model"
:
"firewall.host"
,
"fields"
:
{
"comment"
:
""
,
"vlan"
:
10
,
"reverse"
:
null
,
"created_at"
:
"2013-02-19T18:43:17Z"
,
"hostname"
:
"id-374_user-test"
,
"modified_at"
:
"2013-02-19T18:43:17Z"
,
"location"
:
""
,
"pub_ipv4"
:
"152.66.243.62"
,
"mac"
:
"02:00:0a:09:01:0f"
,
"shared_ip"
:
true
,
"ipv4"
:
"10.9.1.15"
,
"groups"
:
[
4
],
"ipv6"
:
"2001:738:2001:4031:9:1:15:0"
,
"owner"
:
7
,
"description"
:
""
}
},
{
"pk"
:
1
,
"model"
:
"firewall.firewall"
,
"fields"
:
{
...
...
@@ -6357,102 +5861,6 @@
}
},
{
"pk"
:
175
,
"model"
:
"firewall.record"
,
"fields"
:
{
"domain"
:
8
,
"name"
:
null
,
"created_at"
:
"2013-02-13T00:54:47Z"
,
"address"
:
null
,
"modified_at"
:
"2013-02-13T00:54:47Z"
,
"host"
:
843
,
"ttl"
:
600
,
"owner"
:
7
,
"type"
:
"A"
,
"description"
:
""
}
},
{
"pk"
:
176
,
"model"
:
"firewall.record"
,
"fields"
:
{
"domain"
:
8
,
"name"
:
null
,
"created_at"
:
"2013-02-13T00:54:47Z"
,
"address"
:
null
,
"modified_at"
:
"2013-02-13T00:54:47Z"
,
"host"
:
843
,
"ttl"
:
600
,
"owner"
:
7
,
"type"
:
"AAAA"
,
"description"
:
""
}
},
{
"pk"
:
177
,
"model"
:
"firewall.record"
,
"fields"
:
{
"domain"
:
8
,
"name"
:
null
,
"created_at"
:
"2013-02-19T18:40:00Z"
,
"address"
:
null
,
"modified_at"
:
"2013-02-19T18:40:00Z"
,
"host"
:
877
,
"ttl"
:
600
,
"owner"
:
7
,
"type"
:
"A"
,
"description"
:
""
}
},
{
"pk"
:
178
,
"model"
:
"firewall.record"
,
"fields"
:
{
"domain"
:
8
,
"name"
:
null
,
"created_at"
:
"2013-02-19T18:40:00Z"
,
"address"
:
null
,
"modified_at"
:
"2013-02-19T18:40:00Z"
,
"host"
:
877
,
"ttl"
:
600
,
"owner"
:
7
,
"type"
:
"AAAA"
,
"description"
:
""
}
},
{
"pk"
:
179
,
"model"
:
"firewall.record"
,
"fields"
:
{
"domain"
:
8
,
"name"
:
null
,
"created_at"
:
"2013-02-19T18:43:17Z"
,
"address"
:
null
,
"modified_at"
:
"2013-02-19T18:43:17Z"
,
"host"
:
878
,
"ttl"
:
600
,
"owner"
:
7
,
"type"
:
"A"
,
"description"
:
""
}
},
{
"pk"
:
180
,
"model"
:
"firewall.record"
,
"fields"
:
{
"domain"
:
8
,
"name"
:
null
,
"created_at"
:
"2013-02-19T18:43:17Z"
,
"address"
:
null
,
"modified_at"
:
"2013-02-19T18:43:17Z"
,
"host"
:
878
,
"ttl"
:
600
,
"owner"
:
7
,
"type"
:
"AAAA"
,
"description"
:
""
}
},
{
"pk"
:
1
,
"model"
:
"south.migrationhistory"
,
"fields"
:
{
...
...
@@ -6939,6 +6347,15 @@
}
},
{
"pk"
:
55
,
"model"
:
"south.migrationhistory"
,
"fields"
:
{
"applied"
:
"2013-02-25T18:31:52Z"
,
"app_name"
:
"firewall"
,
"migration"
:
"0028_auto__del_field_vlan_domain"
}
},
{
"pk"
:
56
,
"model"
:
"south.migrationhistory"
,
"fields"
:
{
...
...
one/models.py
View file @
a5871282
...
...
@@ -262,7 +262,7 @@ class Network(models.Model):
return
self
.
name
@staticmethod
def
update
():
def
update
(
delete
=
True
):
"""Get and register virtual networks from OpenNebula."""
import
subprocess
proc
=
subprocess
.
Popen
([
"/opt/occi.sh"
,
"network"
,
"list"
],
...
...
@@ -282,7 +282,8 @@ class Network(models.Model):
except
:
Network
(
id
=
id
,
name
=
name
)
.
save
()
l
.
append
(
id
)
cls
.
objects
.
exclude
(
id__in
=
l
)
.
delete
()
if
delete
:
Network
.
objects
.
exclude
(
id__in
=
l
)
.
delete
()
class
InstanceType
(
models
.
Model
):
...
...
@@ -575,7 +576,10 @@ class Instance(models.Model):
if
self
.
firewall_host
:
h
=
self
.
firewall_host
self
.
firewall_host
=
None
self
.
save
()
try
:
self
.
save
()
except
:
pass
h
.
delete
()
def
_update_vm
(
self
,
template
):
...
...
@@ -633,7 +637,7 @@ class Instance(models.Model):
def
check_if_is_save_as_done
(
self
):
if
self
.
state
!=
'DONE'
:
return
False
Disk
.
update
()
Disk
.
update
(
delete
=
False
)
imgname
=
"template-
%
d-
%
d"
%
(
self
.
template
.
id
,
self
.
id
)
disks
=
Disk
.
objects
.
filter
(
name
=
imgname
)
if
len
(
disks
)
!=
1
:
...
...
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