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

Shankar commented on JCLOUDS-133:
---------------------------------

Hi Andrew, 

I using the following version : 
                <dependency>
                        <groupId>org.jclouds.api</groupId>
                        <artifactId>openstack-nova</artifactId>
                        <version>1.6.0</version>
                </dependency>

Here is the relevant code :
compute = context.getComputeService();

Set <? extends ComputeMetadata > nodes = compute.listNodes();
for (ComputeMetadata computeMetadata : nodes) {
....
// here is where I want to get the intance type. 
// however, I don't see a method using computeMetadata

}

Am I doing something wrong here ? 
                
> need a method to get the intance type (eg. m1.tiny) from the computeMetadata 
> -----------------------------------------------------------------------------
>
>                 Key: JCLOUDS-133
>                 URL: https://issues.apache.org/jira/browse/JCLOUDS-133
>             Project: jclouds
>          Issue Type: Improvement
>          Components: jclouds-labs-openstack
>    Affects Versions: 1.6.0
>         Environment: Openstack
>            Reporter: Shankar
>              Labels: openstack
>             Fix For: 1.6.1
>
>
> When I dump the contents of an instance of ComputeMetadata, I see that the 
> instance type - in this case m1.tiny, exists as a part of "hardware" . I'd 
> like to have a method to get to the "hardware"
> Here is an example :
> {id=......, hardware={id=RegionOne/1, providerId=1, name=m1.tiny, 
> location={scope=ZONE, id=RegionOne, description=RegionOne, 
> parent=openstack-nova}, ......}
> Can we have a method as shown below : 
> getHardware.getName();

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to