Zygimantass opened a new issue #1480:
URL: https://github.com/apache/libcloud/issues/1480


   ## Summary
   
   GCE driver throws NotImplementedError when calling deploy_node, however the 
provider matrix says this method is implemented (I couldn't find a mention of 
GCE + deploy_node anywhere in the codebase).
   
   ## Detailed Information
   
   Apache LibCloud version: 3.1.0
   OS: Ubuntu on WSL
   Python version: 3.6.9
   
   Code for reproduction:
   
   `from libcloud.compute.types import Provider
   from libcloud.compute.providers import get_driver
   from libcloud.compute.deployment import ScriptDeployment
   
   import uuid
   
   ComputeEngine = get_driver(Provider.GCE)
   
   driver = ComputeEngine('SERVICE_EMAIL', 'SERVICE_PK_FILE',
                          project="abcdef-999999", datacenter='europe-west1-b')
   print(driver)
   deploy_step = ScriptDeployment('echo whoami; date;')
   images = driver.list_images()
   sizes = driver.list_sizes()
   
   centos_image = [i for i in images if "centos-8" in i.name][0]
   size = [s for s in sizes if s.name == "f1-micro"][0]
   
   node = driver.deploy_node(deploy=deploy_step, name=str(uuid.uuid4()), 
image=centos_image, size=size)
   
   print('')
   print('Node: %s' % (node))
   print('')
   print('stdout: %s' % (deploy_step.stdout))
   print('stderr: %s' % (deploy_step.stderr))
   print('exit_code: %s' % (deploy_step.exit_status))`
   
   Logs:
   `
   (venv) root@root:orchestrator# python main.py
   <libcloud.compute.drivers.gce.GCENodeDriver object at 0x7f6c992d2400>
   Traceback (most recent call last):
     File "main.py", line 19, in <module>
       node = driver.deploy_node(deploy=deploy_step, name=str(uuid.uuid4()), 
image=centos_image, size=size)
     File 
"/orchestrator/venv/lib/python3.6/site-packages/libcloud/compute/base.py", line 
1125, in deploy_node
       'deploy_node not implemented for this driver')
   NotImplementedError: deploy_node not implemented for this driver
   `
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to