Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
CIRCLE
/
agentdriver
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
1
Merge Requests
1
Wiki
Members
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
081bdf71
authored
Jun 20, 2014
by
Bach Dániel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add ssh key tasks
parent
3b828db2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
0 deletions
+21
-0
agentcelery.py
+21
-0
No files found.
agentcelery.py
View file @
081bdf71
...
...
@@ -80,6 +80,27 @@ def update(vm, data):
command
=
'update'
,
args
=
{
'data'
:
data
},
uuid
=
update
.
request
.
id
)
@celery.task
(
name
=
'agent.add_keys'
)
def
add_keys
(
vm
,
keys
):
logger
.
debug
(
'add_keys(
%
s)'
%
keys
)
reactor
.
connections
[
vm
]
.
send_command
(
command
=
'add_keys'
,
args
=
{
'keys'
:
keys
})
@celery.task
(
name
=
'agent.del_keys'
)
def
del_keys
(
vm
,
keys
):
logger
.
debug
(
'del_keys(
%
s)'
%
keys
)
reactor
.
connections
[
vm
]
.
send_command
(
command
=
'del_keys'
,
args
=
{
'keys'
:
keys
})
@celery.task
(
name
=
'agent.get_keys'
)
def
get_keys
(
vm
):
logger
.
debug
(
'get_keys()'
)
reactor
.
connections
[
vm
]
.
send_command
(
command
=
'get_keys'
,
args
=
{})
@celery.task
(
name
=
'vm.tasks.local_agent_tasks.agent_started'
)
def
agent_started
(
vm
):
print
vm
...
...
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