Skip to content

Instantly share code, notes, and snippets.

@ffeldhaus
Created October 2, 2012 17:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ffeldhaus/3821245 to your computer and use it in GitHub Desktop.
Save ffeldhaus/3821245 to your computer and use it in GitHub Desktop.
rOCCI 3.0 alpha example
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