You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jclouds.apache.org by Subhadip Bagui <i....@gmail.com> on 2014/09/22 15:34:38 UTC

passing the name while creating a volume in aws-ec2 using jclouds

Hi All,

I'm using the below code part to create a volume in ec2 using jclouds api.

            EC2Api ec2Api = computeServiceContext.unwrapApi(EC2Api.class);
            LOG.info("initialized ec2 api for volume creation");

            org.jclouds.ec2.domain.Volume volume = ec2Api
                    .getElasticBlockStoreApi()
                    .get()
                    .createVolumeInAvailabilityZone("ap-southeast-1b", size);
            responseTemplate.setJobId(volume.getId());
            responseTemplate.setCreationTime(volume.getCreateTime());
            responseTemplate.setZoneId(volume.getAvailabilityZone());

Now there is no option to pass the name of the volume while creating. But I
want to list the volumes with respect to volume name in my api. Please let
me know if there is anyway to pass the volume name while creating volume
and get the volume name in volume details while using describeVolume.

Also the aws api *describeVolumesInRegion
<http://demobox.github.io/jclouds-maven-site-1.5.8/1.5.8/jclouds-multi/apidocs/org/jclouds/ec2/services/ElasticBlockStoreAsyncClient.html#describeVolumesInRegion(java.lang.String,
java.lang.String...)>*(String
<http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true>
 region, String
<http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true>
... volumeIds)  doesn't provide the volume name even set from amazon ui
after volume creation.

Please help how to create volume with specified name and list the same also.


Regards,
Subhadip

-------------------------------------------------------------------------------------------------------------------

Re: passing the name while creating a volume in aws-ec2 using jclouds

Posted by Jeremy Daggett <je...@RACKSPACE.COM>.
Hi Subhadip,

The dev lists are only for the internal development of jclouds. For
questions like this, please submit them to the community user list [1] in
the future. Thanks!

/jd

[1] https://jclouds.apache.org/community/

On 9/22/14, 6:34 AM, "Subhadip Bagui" <i....@gmail.com> wrote:

>Hi All,
>
>I'm using the below code part to create a volume in ec2 using jclouds api.
>
>            EC2Api ec2Api = computeServiceContext.unwrapApi(EC2Api.class);
>            LOG.info("initialized ec2 api for volume creation");
>
>            org.jclouds.ec2.domain.Volume volume = ec2Api
>                    .getElasticBlockStoreApi()
>                    .get()
>                    .createVolumeInAvailabilityZone("ap-southeast-1b",
>size);
>            responseTemplate.setJobId(volume.getId());
>            responseTemplate.setCreationTime(volume.getCreateTime());
>            responseTemplate.setZoneId(volume.getAvailabilityZone());
>
>Now there is no option to pass the name of the volume while creating. But
>I
>want to list the volumes with respect to volume name in my api. Please let
>me know if there is anyway to pass the volume name while creating volume
>and get the volume name in volume details while using describeVolume.
>
>Also the aws api *describeVolumesInRegion
><http://demobox.github.io/jclouds-maven-site-1.5.8/1.5.8/jclouds-multi/api
>docs/org/jclouds/ec2/services/ElasticBlockStoreAsyncClient.html#describeVo
>lumesInRegion(java.lang.String,
>java.lang.String...)>*(String
><http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-ext
>ernal=true>
> region, String
><http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-ext
>ernal=true>
>... volumeIds)  doesn't provide the volume name even set from amazon ui
>after volume creation.
>
>Please help how to create volume with specified name and list the same
>also.
>
>
>Regards,
>Subhadip
>
>--------------------------------------------------------------------------
>-----------------------------------------


Re: passing the name while creating a volume in aws-ec2 using jclouds

Posted by Jeremy Daggett <je...@RACKSPACE.COM>.
EBS volumes do not have names associated with them. If you want to name
it, you would do so by attaching a ³name² tag [1][2] to the EBS volume
using the jclouds EC2 TagApi [3].

HTH!

/jd

[1] 
http://docs.aws.amazon.com/AWSEC2/latest/APIReference/ApiReference-query-Cr
eateTags.html

[2] 
http://stackoverflow.com/questions/12797622/how-to-name-an-ec2-ebs-volume-i
n-aws-console
[3] 
https://github.com/jclouds/jclouds/blob/master/apis/ec2/src/main/java/org/j
clouds/ec2/features/TagApi.java#L81

On 9/25/14, 11:52 PM, "Andrew Phillips" <an...@apache.org> wrote:

>>> want to list the volumes with respect to volume name in my api. Please
>>>let
>>> me know if there is anyway to pass the volume name while creating
>>>volume
>
>Since the Volume domain object [1] does not even contain a property
>"name", I suspect there is unfortunately currently no way to do this,
>no.
>
>Looking at the underlying API call documentation [2], I don't see any
>mention of a "name" property, though. Could you indicate which of the
>returned properties you would expect to be treated as the name?
>
>ap
>
>[1] 
>http://javadocs.jclouds.cloudbees.net/org/jclouds/ec2/domain/Volume.html
>[2]  
>http://docs.aws.amazon.com/AWSEC2/latest/APIReference/ApiReference-query-C
>reateVolume.html


Re: FW: passing the name while creating a volume in aws-ec2 using jclouds

Posted by Andrew Phillips <an...@apache.org>.
>> want to list the volumes with respect to volume name in my api. Please let
>> me know if there is anyway to pass the volume name while creating volume

Since the Volume domain object [1] does not even contain a property  
"name", I suspect there is unfortunately currently no way to do this,  
no.

Looking at the underlying API call documentation [2], I don't see any  
mention of a "name" property, though. Could you indicate which of the  
returned properties you would expect to be treated as the name?

ap

[1] http://javadocs.jclouds.cloudbees.net/org/jclouds/ec2/domain/Volume.html
[2]  
http://docs.aws.amazon.com/AWSEC2/latest/APIReference/ApiReference-query-CreateVolume.html

FW: passing the name while creating a volume in aws-ec2 using jclouds

Posted by Jeremy Daggett <je...@RACKSPACE.COM>.
Forwarding to the user@ list...

On 9/22/14, 6:34 AM, "Subhadip Bagui" <i....@gmail.com> wrote:

>Hi All,
>
>I'm using the below code part to create a volume in ec2 using jclouds api.
>
>            EC2Api ec2Api = computeServiceContext.unwrapApi(EC2Api.class);
>            LOG.info("initialized ec2 api for volume creation");
>
>            org.jclouds.ec2.domain.Volume volume = ec2Api
>                    .getElasticBlockStoreApi()
>                    .get()
>                    .createVolumeInAvailabilityZone("ap-southeast-1b",
>size);
>            responseTemplate.setJobId(volume.getId());
>            responseTemplate.setCreationTime(volume.getCreateTime());
>            responseTemplate.setZoneId(volume.getAvailabilityZone());
>
>Now there is no option to pass the name of the volume while creating. But
>I
>want to list the volumes with respect to volume name in my api. Please let
>me know if there is anyway to pass the volume name while creating volume
>and get the volume name in volume details while using describeVolume.
>
>Also the aws api *describeVolumesInRegion
><http://demobox.github.io/jclouds-maven-site-1.5.8/1.5.8/jclouds-multi/api
>docs/org/jclouds/ec2/services/ElasticBlockStoreAsyncClient.html#describeVo
>lumesInRegion(java.lang.String,
>java.lang.String...)>*(String
><http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-ext
>ernal=true>
> region, String
><http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-ext
>ernal=true>
>... volumeIds)  doesn't provide the volume name even set from amazon ui
>after volume creation.
>
>Please help how to create volume with specified name and list the same
>also.
>
>
>Regards,
>Subhadip
>
>--------------------------------------------------------------------------
>-----------------------------------------