[ 
https://issues.apache.org/jira/browse/LIBCLOUD-411?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13798226#comment-13798226
 ] 

Frederic Michaud commented on LIBCLOUD-411:
-------------------------------------------

any function return this  EC2NodeLocation in Node im supose to create two class 
 one include availability_zone  and another name availability_zone contain name.

this only because you transforme that in string in your function.  

if nodes return string take that in create_volume and it's ok 

this is in Create_volume:
 
        if location is not None:
            params['AvailabilityZone'] = location.availability_zone.name

change for:
       if location is not None:
            params['AvailabilityZone'] = location (location is string)



> I pass the result of node.extra.availability to create volume is't not work
> ---------------------------------------------------------------------------
>
>                 Key: LIBCLOUD-411
>                 URL: https://issues.apache.org/jira/browse/LIBCLOUD-411
>             Project: Libcloud
>          Issue Type: Bug
>          Components: Compute
>    Affects Versions: 0.13.0
>            Reporter: Frederic Michaud
>
> ec2 driver.
> I try to create volume in the same availability of my node but I have any 
> possibility to format that correctly:
> node.extra.get('availability') is the return of node creation in ec2 (suppose 
> that return good location)
> drive = 
> createVolume(ec2_conn,volumeName=file_sys,size=size,location=node.extra.get('availability'))
> explode with this stack
>   File 
> "C:\Python27\lib\site-packages\apache_libcloud-0.13.0-py2.7.egg\libcloud\compute\drivers\ec2.py",
>  line 686, in create_volume
>     params['AvailabilityZone'] = location.availability_zone.name
> AttributeError: 'str' object has no attribute 'availability_zone'
> in the node you return avalability but isn't not avalibility it's I don't no 
> but



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Reply via email to