Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Gelencsér Szabolcs
/
agentdriver
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Wiki
Members
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
4338329f
authored
Nov 09, 2016
by
Szabolcs Gelencser
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add unimplemented deprovision task
parent
c947ae5b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
0 deletions
+31
-0
agentcelery.py
+31
-0
No files found.
agentcelery.py
View file @
4338329f
...
@@ -72,6 +72,37 @@ def send_command(vm, command, *args, **kwargs):
...
@@ -72,6 +72,37 @@ def send_command(vm, command, *args, **kwargs):
return
retval
return
retval
@celery.task
(
name
=
'agent.deprovision'
)
def
deprovision
(
vm_name
):
"""
Execute waagent deprovision command on already running vm
"""
#poller = compute_client.virtual_machine_extensions.create_or_update(
# GROUP_NAME,
# vm_name,
# "CustomScriptForLinux",
# azure.mgmt.compute.models.VirtualMachineExtension(
# location=REGION,
# publisher="Microsoft.OSTCExtensions",
# virtual_machine_extension_type="CustomScriptForLinux",
# type_handler_version="1.4",
# auto_upgrade_minor_version=True,
# settings={
# "commandToExecute": "waagent -force -deprovision+user"
# },
# ),
#)
#
#try:
# poller.wait()
# logging.info("ran deprovision on: '%s'" % vm_name)
#except Exception, e:
# logging.error("cloud not run deprovision on '%s'" % vm_name)
# raise e
logging
.
info
(
"TODO: implement this functionality"
)
pass
@celery.task
(
name
=
'agent.install_diagnostics_extension'
)
@celery.task
(
name
=
'agent.install_diagnostics_extension'
)
def
install_diagnostics_extension
(
vm_name
):
def
install_diagnostics_extension
(
vm_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