Created
November 9, 2011 12:57
-
-
Save xlson/1351346 to your computer and use it in GitHub Desktop.
Listing node metadata on ec2 with jclouds
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@GrabResolver(name='jclouds snapshot', root='https://oss.sonatype.org/content/repositories/snapshots') | |
@Grab('org.jclouds:jclouds-allcompute:1.3.0-SNAPSHOT') | |
import org.jclouds.compute.ComputeServiceContextFactory | |
def accesskeyid = '...' | |
def secretkey = '...' | |
def context = new ComputeServiceContextFactory().createContext("aws-ec2", accesskeyid, secretkey) | |
def nodes = context.getComputeService().listNodes() | |
nodes.each{ println it.userMetadata } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment