Skip to content

Instantly share code, notes, and snippets.

View ffeldhaus's full-sized avatar

Florian Feldhaus ffeldhaus

View GitHub Profile
@ffeldhaus
ffeldhaus / gist:3821245
Created October 2, 2012 17:10
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
@ffeldhaus
ffeldhaus / gist:3748656
Created September 19, 2012 09:21
Error in OpenStack OCCI when rendering discovery interface in text/occi
Florians-MacBook-Pro-3:rOCCI ffeldhaus$ curl -v --cert /Users/ffeldhaus/.cert/florianfeldhaus.pem --capath /Users/ffeldhaus/.cert/grid-security/ -X GET -H 'Accept: text/occi' https://occi.cloud.gwdg.de:5000/-/
* About to connect() to occi.cloud.gwdg.de port 5000 (#0)
* Trying 141.5.96.16...
* connected
* Connected to occi.cloud.gwdg.de (141.5.96.16) port 5000 (#0)
Enter PEM pass phrase:
* successfully set certificate verify locations:
* CAfile: /opt/local/share/curl/curl-ca-bundle.crt
CApath: /Users/ffeldhaus/.cert/grid-security/
* SSLv3, TLS handshake, Client hello (1):
@ffeldhaus
ffeldhaus / README
Created September 13, 2012 22:00
OCCI Test Scenarios
The Cloud Standards Interoperability Plugfest Series (or "Cloud Plugfests"
for short) was originated by the OGF and SNIA in 2011 as a method to exchange
information and to encourage interoperability on implementations of cloud
standards. It has since expanded to include a variety of tools provided by
these organizations and by ETSI to support the community, and is open to
participation by other organizations.
This tool set hosted on the ogf.org site supports those community activities
and features that are in public view according to the terms of the Open Grid
Forum IPR. The community is welcome to make use of the tools and features
diff --git a/lib/occi/api/client.rb b/lib/occi/api/client.rb
index 13875ff..59ca9af 100644
--- a/lib/occi/api/client.rb
+++ b/lib/occi/api/client.rb
@@ -7,6 +7,7 @@ module OCCI
# HTTParty for raw HTTP requests
include HTTParty
+ debug_output $stderr
headers 'Accept' => 'application/occi+json,text/plain;q=0.5'
@ffeldhaus
ffeldhaus / gist:3407267
Created August 20, 2012 19:57
bundle install with puppet-rvm
exec { 'bundle install':
command => '/usr/local/rvm/bin/rvm 1.9.3@rocci-server do bundle install',
cwd => '/home/occi/rocci-server',
logoutput => true,
}
@ffeldhaus
ffeldhaus / gist:2225345
Created March 28, 2012 10:44
Logging with ActiveSupport
require 'sinatra'
require 'active_support'
require 'logger'
class SinatraTest < Sinatra::Application
class TestClass
def initialize
ActiveSupport::Notifications.instrument("log", :level => Logger::INFO, :message => "my message" )
end