org.jclouds.byon.functions
Class NodesFromYaml

java.lang.Object
  extended by org.jclouds.byon.functions.NodesFromYaml
All Implemented Interfaces:
com.google.common.base.Function<InputStream,Map<String,Node>>

@Singleton
public class NodesFromYaml
extends Object
implements com.google.common.base.Function<InputStream,Map<String,Node>>

Parses the following syntax.

 nodes:
     - id: cluster-1:
       name: cluster-1
       description: xyz
       hostname: cluster-1.mydomain.com
       os_arch: x86
       os_family: linux
       os_description: redhat
       os_version: 5.3
       group: hadoop
       tags:
           - vanilla
       username: kelvin
       credential: password_or_rsa
         or
       credential_url: password_or_rsa_file ex. resource:///id_rsa will get the classpath /id_rsa; file://path/to/id_rsa
       sudo_password: password
 

Author:
Kelvin Kakugawa

Nested Class Summary
static class NodesFromYaml.Config
          Type-safe config class for YAML
 
Constructor Summary
NodesFromYaml()
           
 
Method Summary
 Map<String,Node> apply(InputStream source)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.google.common.base.Function
equals
 

Constructor Detail

NodesFromYaml

public NodesFromYaml()
Method Detail

apply

public Map<String,Node> apply(InputStream source)
Specified by:
apply in interface com.google.common.base.Function<InputStream,Map<String,Node>>


Copyright © 2009-2011 jclouds. All Rights Reserved.