Commit 4338329f by Szabolcs Gelencser

Add unimplemented deprovision task

parent c947ae5b
......@@ -72,6 +72,37 @@ def send_command(vm, command, *args, **kwargs):
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')
def install_diagnostics_extension(vm_name):
"""
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment