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
f3cf1fb8
authored
Sep 02, 2013
by
tarokkk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
initial manager commit
parent
8940acd9
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
64 additions
and
0 deletions
+64
-0
manager/manager.py
+41
-0
manager/mancelery.py
+19
-0
manager/vmdriver_stub.py
+4
-0
No files found.
manager/manager.py
0 → 100755
View file @
f3cf1fb8
#!/usr/bin/env python
from
mancelery
import
celery
@celery.task
def
create_vm
():
'''Create new virtual machine from VM class.
'''
# Get info from scheduler (free sapce, node with enough cpu and ram)
# Create hard drives (storage)
# Create machine (vmdriver)
# Estabilish network connection (vmdriver)
# Resume machine (vmdriver)
pass
def
delete
():
pass
def
save_as
():
pass
def
suspend
():
pass
def
resume
():
pass
def
restart
():
pass
def
reset
():
pass
manager/mancelery.py
0 → 100755
View file @
f3cf1fb8
#!/usr/bin/env python
from
celery
import
Celery
from
kombu
import
Queue
,
Exchange
from
socket
import
gethostname
HOSTNAME
=
gethostname
()
celery
=
Celery
(
'manager'
,
backend
=
'amqp'
,
broker
=
'amqp://cloud:test@10.9.1.31/vmdriver'
,
include
=
[
'vmdriver_stub'
])
celery
.
conf
.
update
(
CELERY_QUEUES
=
(
Queue
(
HOSTNAME
+
'.man'
,
Exchange
(
'manager'
,
type
=
'direct'
),
routing_key
=
"manager"
),
)
)
manager/vmdriver_stub.py
0 → 100755
View file @
f3cf1fb8
#!/usr/bin/env pyhon
#Stubs for vmdriver
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