Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Requirement: Python SDK for Windows Azure #17

Open
lee212 opened this issue Apr 4, 2013 · 6 comments
Open

Requirement: Python SDK for Windows Azure #17

lee212 opened this issue Apr 4, 2013 · 6 comments
Labels

Comments

@lee212
Copy link
Contributor

lee212 commented Apr 4, 2013

We are using Windows Azure in flask cm.
Go and download SDKs in your local machine to execute 'azure' command tool on linux shell.
Downloads sdk

Without the installation of the SDK, users will face the following errors:

Traceback (most recent call last):
  File "flask_cm/server.py", line 10, in <module>
    from cloudmesh.cloudmesh import cloudmesh
  File "./cloudmesh/cloudmesh.py", line 20, in <module>
    from azure.cm_azure import cm_azure as azure 
  File "./cloudmesh/azure/cm_azure.py", line 15, in <module>
    from sh import azure as _azure
ImportError: cannot import name azure

We probably are able to use client libraries by downloading it. pip install azure supports client libraries. Please refer: Install Python and the SDK

@lee212
Copy link
Contributor Author

lee212 commented Apr 4, 2013

@ppnewaskar
Copy link
Contributor

you will actually need Windows Azure Command-Line Tools for Mac and Linux to make this work http://www.windowsazure.com/en-us/develop/nodejs/how-to-guides/command-line-tools/#Download

@laszewsk
Copy link
Member

laszewsk commented Apr 5, 2013

I do not think that this assessment is correct.

if you do a pip install either on osx, linux or other computer of azure (do it in virtual env)

you can find under site packages the azure dir. if you go in it you find several pure python functions that can be used to access azure directly from python.

The reason way you used the command line toll is

a) it is well documented
b) the python azure SDK is not well documented (e.g. you have to go to the code)
c) it is easy to use sh and the azure commandline client and for your purpose this was apparently enough

here is evidence that python can most likely be used without the use of the command line tools. I took those from the service management service in azure SDK:

def create_virtual_machine_deployment(self, service_name, deployment_name, deployment_slot, label, role_name, system_config, os_virtual_hard_disk, network_config=None, availability_set_name=None, data_virtual_hard_disks=None, role_size=None, role_type='PersistentVMRole'):

def list_os_images(self):

On Apr 4, 2013, at 6:34 PM, ppnewaskar [email protected] wrote:

you will actually need Windows Azure Command-Line Tools for Mac and Linux to make this work http://www.windowsazure.com/en-us/develop/nodejs/how-to-guides/command-line-tools/#Download


Reply to this email directly or view it on GitHub.

@lee212
Copy link
Contributor Author

lee212 commented Apr 22, 2013

Just following up on the installing Azure Command-Line Tools for Linux, I was guided to install nodejs and npm (nodejs package manager) from here: Node.js HOWTO: Install Node+NPM as user (not root) under Unix OSes

The benefit of this instruction is that sudo is not needed.

@laszewsk
Copy link
Member

with virtualenv sudo is not needed

@ghost ghost assigned ppnewaskar May 14, 2013
@laszewsk
Copy link
Member

i think i put a try except around it so we do not need azure to be present.

we may want to do this with the other cloud libs also.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants