Created
October 2, 2012 17:10
-
-
Save ffeldhaus/3821245 to your computer and use it in GitHub Desktop.
rOCCI 3.0 alpha example
This file contains 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
1.9.3p194 :001 > require 'occi' | |
=> true | |
1.9.3p194 :002 > compute=Occi::Core::Entity.new 'http://schemas.ogf.org/occi/infrastructure#compute' | |
http://schemas.ogf.org/occi/infrastructure | |
=> { | |
"kind": "http://schemas.ogf.org/occi/infrastructure#compute" | |
} | |
1.9.3p194 :003 > compute.cores=5 | |
=> 5 | |
1.9.3p194 :004 > compute | |
=> { | |
"kind": "http://schemas.ogf.org/occi/infrastructure#compute", | |
"attributes": { | |
"occi": { | |
"compute": { | |
"cores": 5 | |
} | |
} | |
} | |
} | |
1.9.3p194 :005 > compute.class | |
=> Occi::Infrastructure::Compute |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment