Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Gyuricska Milán
/
cloud
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
a4c74821
authored
May 13, 2013
by
Bach Dániel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
celery: code formatting
parent
bf61b653
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
miscellaneous/celery/opennebula_celery.py
+4
-4
No files found.
miscellaneous/celery/opennebula_celery.py
View file @
a4c74821
...
@@ -5,7 +5,7 @@ from celery import Celery, task
...
@@ -5,7 +5,7 @@ from celery import Celery, task
import
time
,
re
import
time
,
re
import
socket
import
socket
import
sys
import
sys
import
tempfile
,
os
,
stat
,
re
,
base64
,
struct
,
logging
import
tempfile
,
os
,
stat
,
re
,
base64
,
struct
,
logging
from
celery.contrib
import
rdb
from
celery.contrib
import
rdb
...
@@ -85,7 +85,7 @@ def t(name, instance_type, disk_id, network_id, ctx):
...
@@ -85,7 +85,7 @@ def t(name, instance_type, disk_id, network_id, ctx):
from
xml.dom.minidom
import
parse
,
parseString
from
xml.dom.minidom
import
parse
,
parseString
try
:
try
:
x
=
parseString
(
out
)
x
=
parseString
(
out
)
return
{
return
{
'one_id'
:
int
(
x
.
getElementsByTagName
(
"ID"
)[
0
]
.
childNodes
[
0
]
.
nodeValue
),
'one_id'
:
int
(
x
.
getElementsByTagName
(
"ID"
)[
0
]
.
childNodes
[
0
]
.
nodeValue
),
'interfaces'
:
[
'interfaces'
:
[
{
{
...
@@ -107,7 +107,7 @@ def t(one_id, new_img):
...
@@ -107,7 +107,7 @@ def t(one_id, new_img):
@task
(
name
=
"one.tasks.UpdateDiskTask"
)
@task
(
name
=
"one.tasks.UpdateDiskTask"
)
def
t
():
def
t
():
f
=
tempfile
.
NamedTemporaryFile
(
delete
=
False
)
f
=
tempfile
.
NamedTemporaryFile
(
delete
=
False
)
f
.
close
()
f
.
close
()
out
=
''
out
=
''
proc
=
subprocess
.
Popen
([
"/opt/occi.sh storage list >
%
s"
%
f
.
name
],
proc
=
subprocess
.
Popen
([
"/opt/occi.sh storage list >
%
s"
%
f
.
name
],
...
@@ -132,7 +132,7 @@ def t():
...
@@ -132,7 +132,7 @@ def t():
@task
(
name
=
"one.tasks.UpdateNetworkTask"
)
@task
(
name
=
"one.tasks.UpdateNetworkTask"
)
def
t
():
def
t
():
f
=
tempfile
.
NamedTemporaryFile
(
delete
=
False
)
f
=
tempfile
.
NamedTemporaryFile
(
delete
=
False
)
f
.
close
()
f
.
close
()
out
=
''
out
=
''
proc
=
subprocess
.
Popen
([
"/opt/occi.sh network list >
%
s"
%
f
.
name
],
proc
=
subprocess
.
Popen
([
"/opt/occi.sh network list >
%
s"
%
f
.
name
],
...
...
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