occi-api 4.0.0.alpha.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (105) hide show
  1. data/.gitignore +15 -0
  2. data/.rspec +1 -0
  3. data/.travis.yml +43 -0
  4. data/.yardopts +1 -0
  5. data/AUTHORS +9 -0
  6. data/Gemfile +16 -0
  7. data/LICENSE +13 -0
  8. data/README.md +344 -0
  9. data/Rakefile +37 -0
  10. data/examples/dsl_example.rb +167 -0
  11. data/examples/x509auth_example.rb +161 -0
  12. data/ext/mkrf_conf.rb +34 -0
  13. data/features/cassettes/Create_an_OCCI_Resource/_http_http___141_5_99_69__text_plain_201_.yml +288 -0
  14. data/features/cassettes/Delete_an_OCCI_Resource/_http_http___141_5_99_69__text_plain_201_.yml +288 -0
  15. data/features/cassettes/Discovery_Interface/Retrieving_all_OCCI_Categories_supported_by_the_OCCI_Server/_http_http___141_5_99_69__application_json_200_.yml +333 -0
  16. data/features/cassettes/Discovery_Interface/Retrieving_all_OCCI_Categories_supported_by_the_OCCI_Server/_http_http___141_5_99_69__text_plain_200_.yml +529 -0
  17. data/features/cassettes/Discovery_Interface/Retrieving_all_OCCI_Categories_supported_by_the_OCCI_Server/_http_http___141_5_99_69__text_plain_200_action_.yml +288 -0
  18. data/features/cassettes/Miscellaneous_operation_on_an_OCCI_Resource/_http_http___141_5_99_69__text_plain_201_.yml +288 -0
  19. data/features/cassettes/Read_an_OCCI_Resource/_http_http___141_5_99_69__text_plain_201_.yml +288 -0
  20. data/features/cassettes/Update_an_OCCI_Resource/_http_http___141_5_99_69__text_plain_201_.yml +288 -0
  21. data/features/common/step_definitions/common_steps.rb +32 -0
  22. data/features/occi/core/create/create.feature +18 -0
  23. data/features/occi/core/create/step_definitions/create_steps.rb +0 -0
  24. data/features/occi/core/delete/delete.feature +18 -0
  25. data/features/occi/core/delete/step_definitions/delete_steps.rb +0 -0
  26. data/features/occi/core/discovery_interface/discovery_interface.feature +37 -0
  27. data/features/occi/core/discovery_interface/step_definitions/discovery_interface_steps.rb +19 -0
  28. data/features/occi/core/miscellaneous/miscellaneous.feature +18 -0
  29. data/features/occi/core/miscellaneous/step_definitions/miscellaneous_steps.rb +0 -0
  30. data/features/occi/core/read/read.feature +18 -0
  31. data/features/occi/core/read/step_definitions/read_steps.rb +0 -0
  32. data/features/occi/core/update/step_definitions/update_steps.rb +0 -0
  33. data/features/occi/core/update/update.feature +18 -0
  34. data/features/occi/infrastructure/create/create.feature +18 -0
  35. data/features/occi/infrastructure/create/step_definitions/create_steps.rb +0 -0
  36. data/features/support/env.rb +16 -0
  37. data/lib/occi/api/client/client_amqp.rb +766 -0
  38. data/lib/occi/api/client/client_base.rb +689 -0
  39. data/lib/occi/api/client/client_http.rb +541 -0
  40. data/lib/occi/api/client/errors/authn_error.rb +7 -0
  41. data/lib/occi/api/client/errors.rb +1 -0
  42. data/lib/occi/api/client/http/authn_plugins/base.rb +27 -0
  43. data/lib/occi/api/client/http/authn_plugins/basic.rb +22 -0
  44. data/lib/occi/api/client/http/authn_plugins/digest.rb +22 -0
  45. data/lib/occi/api/client/http/authn_plugins/dummy.rb +13 -0
  46. data/lib/occi/api/client/http/authn_plugins/keystone.rb +61 -0
  47. data/lib/occi/api/client/http/authn_plugins/x509.rb +46 -0
  48. data/lib/occi/api/client/http/authn_plugins.rb +6 -0
  49. data/lib/occi/api/client/http/authn_utils.rb +87 -0
  50. data/lib/occi/api/client/http/httparty_fix.rb +53 -0
  51. data/lib/occi/api/client/http/net_http_fix.rb +21 -0
  52. data/lib/occi/api/dsl.rb +146 -0
  53. data/lib/occi/api/version.rb +5 -0
  54. data/lib/occi-api.rb +14 -0
  55. data/occi-api.gemspec +38 -0
  56. data/spec/cassettes/Occi_Api_Client_ClientHttp/using_media_type_text_plain/creates_a_new_compute_resource.yml +266 -0
  57. data/spec/cassettes/Occi_Api_Client_ClientHttp/using_media_type_text_plain/creates_a_new_network_resource.yml +266 -0
  58. data/spec/cassettes/Occi_Api_Client_ClientHttp/using_media_type_text_plain/creates_a_new_storage_resource.yml +266 -0
  59. data/spec/cassettes/Occi_Api_Client_ClientHttp/using_media_type_text_plain/deletes_a_compute_resource.yml +266 -0
  60. data/spec/cassettes/Occi_Api_Client_ClientHttp/using_media_type_text_plain/deletes_a_network_resource.yml +266 -0
  61. data/spec/cassettes/Occi_Api_Client_ClientHttp/using_media_type_text_plain/deletes_a_storage_resource.yml +266 -0
  62. data/spec/cassettes/Occi_Api_Client_ClientHttp/using_media_type_text_plain/deploys_an_instance_based_on_OVF_OVA_file.yml +266 -0
  63. data/spec/cassettes/Occi_Api_Client_ClientHttp/using_media_type_text_plain/describes_compute_resources.yml +368 -0
  64. data/spec/cassettes/Occi_Api_Client_ClientHttp/using_media_type_text_plain/describes_network_resources.yml +370 -0
  65. data/spec/cassettes/Occi_Api_Client_ClientHttp/using_media_type_text_plain/describes_storage_resources.yml +430 -0
  66. data/spec/cassettes/Occi_Api_Client_ClientHttp/using_media_type_text_plain/establishes_connection.yml +266 -0
  67. data/spec/cassettes/Occi_Api_Client_ClientHttp/using_media_type_text_plain/finds_and_describes_scoped_os_tpl_mixin.yml +266 -0
  68. data/spec/cassettes/Occi_Api_Client_ClientHttp/using_media_type_text_plain/finds_and_describes_scoped_resource_tpl_mixin.yml +266 -0
  69. data/spec/cassettes/Occi_Api_Client_ClientHttp/using_media_type_text_plain/finds_and_describes_unscoped_mixin.yml +266 -0
  70. data/spec/cassettes/Occi_Api_Client_ClientHttp/using_media_type_text_plain/instantiates_a_compute_resource_using_type_identifier.yml +266 -0
  71. data/spec/cassettes/Occi_Api_Client_ClientHttp/using_media_type_text_plain/instantiates_a_compute_resource_using_type_name.yml +266 -0
  72. data/spec/cassettes/Occi_Api_Client_ClientHttp/using_media_type_text_plain/instantiates_a_network_resource_using_type_identifier.yml +266 -0
  73. data/spec/cassettes/Occi_Api_Client_ClientHttp/using_media_type_text_plain/instantiates_a_network_resource_using_type_name.yml +266 -0
  74. data/spec/cassettes/Occi_Api_Client_ClientHttp/using_media_type_text_plain/instantiates_a_storage_resource_using_type_identifier.yml +266 -0
  75. data/spec/cassettes/Occi_Api_Client_ClientHttp/using_media_type_text_plain/instantiates_a_storage_resource_using_type_name.yml +266 -0
  76. data/spec/cassettes/Occi_Api_Client_ClientHttp/using_media_type_text_plain/lists_all_available_entity_type_identifiers.yml +266 -0
  77. data/spec/cassettes/Occi_Api_Client_ClientHttp/using_media_type_text_plain/lists_all_available_entity_types.yml +266 -0
  78. data/spec/cassettes/Occi_Api_Client_ClientHttp/using_media_type_text_plain/lists_all_available_link_type_identifiers.yml +266 -0
  79. data/spec/cassettes/Occi_Api_Client_ClientHttp/using_media_type_text_plain/lists_all_available_link_types.yml +266 -0
  80. data/spec/cassettes/Occi_Api_Client_ClientHttp/using_media_type_text_plain/lists_all_available_mixin_type_identifiers.yml +266 -0
  81. data/spec/cassettes/Occi_Api_Client_ClientHttp/using_media_type_text_plain/lists_all_available_mixin_types.yml +266 -0
  82. data/spec/cassettes/Occi_Api_Client_ClientHttp/using_media_type_text_plain/lists_all_available_mixins.yml +266 -0
  83. data/spec/cassettes/Occi_Api_Client_ClientHttp/using_media_type_text_plain/lists_all_available_resource_type_identifiers.yml +266 -0
  84. data/spec/cassettes/Occi_Api_Client_ClientHttp/using_media_type_text_plain/lists_all_available_resource_types.yml +266 -0
  85. data/spec/cassettes/Occi_Api_Client_ClientHttp/using_media_type_text_plain/lists_compute_resources.yml +308 -0
  86. data/spec/cassettes/Occi_Api_Client_ClientHttp/using_media_type_text_plain/lists_network_resources.yml +308 -0
  87. data/spec/cassettes/Occi_Api_Client_ClientHttp/using_media_type_text_plain/lists_os_tpl_mixins.yml +266 -0
  88. data/spec/cassettes/Occi_Api_Client_ClientHttp/using_media_type_text_plain/lists_resource_tpl_mixins.yml +266 -0
  89. data/spec/cassettes/Occi_Api_Client_ClientHttp/using_media_type_text_plain/lists_storage_resources.yml +310 -0
  90. data/spec/cassettes/Occi_Api_Client_ClientHttp/using_media_type_text_plain/refreshes_its_model.yml +485 -0
  91. data/spec/cassettes/Occi_Api_Client_ClientHttp/using_media_type_text_plain/triggers_an_action_on_a_compute_resource.yml +266 -0
  92. data/spec/cassettes/Occi_Api_Client_ClientHttp/using_media_type_text_plain/triggers_an_action_on_a_network_resource.yml +266 -0
  93. data/spec/cassettes/Occi_Api_Client_ClientHttp/using_media_type_text_plain/triggers_an_action_on_a_storage_resource.yml +266 -0
  94. data/spec/occi/api/client/client_amqp_spec.rb +158 -0
  95. data/spec/occi/api/client/client_http_spec.rb +292 -0
  96. data/spec/occi/api/client/http/authn_utils_spec.rb +55 -0
  97. data/spec/occi/api/client/http/httparty_fix_spec.rb +0 -0
  98. data/spec/occi/api/client/http/net_http_fix_spec.rb +0 -0
  99. data/spec/occi/api/client/http/rocci-cred-cert.pem +3 -0
  100. data/spec/occi/api/client/http/rocci-cred-key-jruby.pem +3 -0
  101. data/spec/occi/api/client/http/rocci-cred-key.pem +3 -0
  102. data/spec/occi/api/client/http/rocci-cred.p12 +0 -0
  103. data/spec/occi/api/dsl_spec.rb +21 -0
  104. data/spec/spec_helper.rb +38 -0
  105. metadata +379 -0
@@ -0,0 +1,161 @@
1
+ require 'rubygems'
2
+ require 'occi-api'
3
+ require 'pp'
4
+
5
+ ## options
6
+ use_os_temlate = true # use OS_TEMPLATE or NETWORK + STORAGE + INSTANCE TYPE
7
+ OS_TEMPLATE = 'monitoring' # name of the VM template in ON
8
+
9
+ clean_up_compute = true # issue DELETE <RESOURCE> after we are done
10
+
11
+ USER_CERT = ENV['HOME'] + '/.globus/usercred.pem'
12
+ USER_CERT_PASSWORD = 'mypassphrase'
13
+ CA_PATH = '/etc/grid-security/certificates'
14
+ ENDPOINT = 'https://localhost:3300'
15
+
16
+ ## get an OCCI::Api::Client::ClientHttp instance
17
+ client = Occi::Api::Client::ClientHttp.new({
18
+ :endpoint => ENDPOINT,
19
+ :auth => {
20
+ :type => "x509",
21
+ :user_cert => USER_CERT,
22
+ :user_cert_password => USER_CERT_PASSWORD,
23
+ :ca_path => CA_PATH
24
+ },
25
+ :log => {
26
+ :out => STDERR,
27
+ :level => Occi::Log::DEBUG
28
+ }
29
+ })
30
+
31
+ puts "\n\nListing all available resource types:"
32
+ client.get_resource_types.each do |type|
33
+ puts "\n#{type}"
34
+ end
35
+
36
+ puts "\n\nListing all available resource type identifiers:"
37
+ client.get_resource_type_identifiers.each do |type_id|
38
+ puts "\n#{type_id}"
39
+ end
40
+
41
+ puts "\n\nListing all available mixin types:"
42
+ client.get_mixin_types.each do |mixin_type|
43
+ puts "\n#{mixin_type}"
44
+ end
45
+
46
+ puts "\n\nListing all available mixin type identifiers:"
47
+ client.get_mixin_type_identifiers.each do |mixin_typeid|
48
+ puts "\n#{mixin_typeid}"
49
+ end
50
+
51
+ puts "\n\nListing all available mixins:"
52
+ client.get_mixins.each do |mixin|
53
+ puts "\n#{mixin}"
54
+ end
55
+
56
+ samples = [OS_TEMPLATE, "medium", "large", "small"]
57
+
58
+ puts "\n\nFind mixins using their names:"
59
+ samples.each do |mixin|
60
+ puts "\n#{mixin}:\n"
61
+ pp client.find_mixin mixin
62
+ end
63
+
64
+ puts "\n\nFind mixins using their names and a type:"
65
+ samples.each do |mixin|
66
+ puts "\n#{mixin}:\n"
67
+ pp client.find_mixin(mixin, "os_tpl")
68
+ end
69
+
70
+ puts "\n\nFind mixins using their names and a type:"
71
+ samples.each do |mixin|
72
+ puts "\n#{mixin}:\n"
73
+ pp client.find_mixin(mixin, "resource_tpl")
74
+ end
75
+
76
+ puts "\n\nFind mixins using their names (showing detailed descriptions):"
77
+ samples.each do |mixin|
78
+ puts "\n#{mixin}:\n"
79
+ pp client.find_mixin(mixin, nil, true)
80
+ end
81
+
82
+ ## get links of all available resources
83
+ puts "\n\nListing storage resources"
84
+ pp client.list "storage"
85
+
86
+ puts "\n\nListing network resources"
87
+ pp client.list "network"
88
+
89
+ puts "\n\nListing compute resources"
90
+ pp client.list "compute"
91
+
92
+ ## get detailed information about all available resources
93
+ puts "\n\nDescribing storage resources"
94
+ pp client.describe "storage"
95
+
96
+ puts "\n\nDescribing compute resources"
97
+ pp client.describe "compute"
98
+
99
+ puts "\n\nDescribing network resources"
100
+ pp client.describe "network"
101
+
102
+ ## create a compute resource using the chosen method (os_tpl|strg+ntwrk)
103
+ puts "\n\nCreate compute resources"
104
+ cmpt = client.get_resource "compute"
105
+
106
+ unless use_os_temlate
107
+ ## without OS template, we have to manually select and attach
108
+ ## network, storage and resource template (instance type)
109
+
110
+ ## select instance type medium
111
+ cmpt.mixins << client.find_mixin('medium', "resource_tpl")
112
+
113
+ ## list network/storage locations and select the appropriate ones (the first ones in this case)
114
+ puts "\nUsing:"
115
+ pp storage_loc = client.list("storage")[0]
116
+ pp network_loc = client.list("network")[0]
117
+
118
+ ## create links and attach them to the compure resource
119
+ puts "\n Connecting to our compute:"
120
+ cmpt.storagelink storage_loc
121
+ cmpt.networkinterface network_loc
122
+ else
123
+ ## with OS template, we have to find the template by name
124
+ ## optionally we can change its "size" by choosing an instance type
125
+ puts "\nUsing:"
126
+ pp os = client.find_mixin(OS_TEMPLATE, "os_tpl")
127
+ pp size = client.find_mixin('medium', "resource_tpl")
128
+
129
+ ## attach chosen resources to the compute resource
130
+ cmpt.mixins << os << size
131
+ ## we can change some of the values manually
132
+ cmpt.title = "My rOCCI x509 VM"
133
+ end
134
+
135
+ ## create the compute resource and print its location
136
+ cmpt_loc = client.create cmpt
137
+ pp "Location of new compute resource: #{cmpt_loc}"
138
+
139
+ ## get links of all available compute resouces again
140
+ puts "\n\nListing locations of compute resources (should now contain #{cmpt_loc})"
141
+ pp client.list "compute"
142
+
143
+ ## get detailed information about the new compute resource
144
+ puts "\n\nListing information about compute resource #{cmpt_loc}"
145
+ cmpt_data = client.describe cmpt_loc
146
+ pp cmpt_data
147
+
148
+ ## wait until the resource is "active"
149
+ while cmpt_data[0].resources.first.attributes.occi.compute.state == "inactive"
150
+ puts "\nCompute resource #{cmpt_loc} is inactive, waiting ..."
151
+ sleep 1
152
+ cmpt_data = client.describe cmpt_loc
153
+ end
154
+
155
+ puts "\nCompute resource #{cmpt_loc} is #{cmpt_data[0].resources.first.attributes.occi.compute.state}"
156
+
157
+ ## delete the resource and exit
158
+ if clean_up_compute
159
+ puts "\n\nDeleting compute resource #{cmpt_loc}"
160
+ pp client.delete cmpt_loc
161
+ end
data/ext/mkrf_conf.rb ADDED
@@ -0,0 +1,34 @@
1
+ require 'rubygems'
2
+ require 'rubygems/command.rb'
3
+ require 'rubygems/dependency_installer.rb'
4
+
5
+ begin
6
+ Gem::Command.build_args = ARGV
7
+ rescue NoMethodError
8
+ # do nothing but warn the user
9
+ warn "Gem::Command doesn't have a method named 'build_args'!"
10
+ end
11
+
12
+ warn 'Installing platform-specific dependencies.'
13
+
14
+ warn 'Installing the most recent version of \'rake\''
15
+ inst = Gem::DependencyInstaller.new
16
+ inst.install "rake"
17
+
18
+ if RUBY_PLATFORM == "java"
19
+ warn 'Installing dependencies specific for jRuby'
20
+
21
+ jrver = (JRUBY_VERSION || "").split('.').map{ |elm| elm.to_i }
22
+ if jrver[0] == 1 && jrver[1] < 7
23
+ warn 'Installing \'jruby-openssl\' for jRuby 1.6.x'
24
+ inst.install "jruby-openssl"
25
+ end
26
+ else
27
+ # Nothing to install for rOCCI-api here
28
+ #warn 'Installing dependencies specific for Ruby'
29
+ end
30
+
31
+ # create dummy rakefile to indicate success
32
+ f = File.open(File.join(File.dirname(__FILE__), "Rakefile"), "w")
33
+ f.write "task :default\n"
34
+ f.close
@@ -0,0 +1,288 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: head
5
+ uri: http://141.5.99.69/
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Accept:
11
+ - text/plain,text/occi;q=0.2
12
+ response:
13
+ status:
14
+ code: 200
15
+ message: OK
16
+ headers:
17
+ Date:
18
+ - Thu, 10 Jan 2013 13:52:01 GMT
19
+ Server:
20
+ - Apache/2.2.22 (Ubuntu)
21
+ X-Powered-By:
22
+ - Phusion Passenger (mod_rails/mod_rack) 3.0.18
23
+ X-Frame-Options:
24
+ - sameorigin
25
+ X-Xss-Protection:
26
+ - 1; mode=block
27
+ Accept:
28
+ - application/occi+json,application/json,text/plain,text/uri-list,application/xml,text/xml,application/occi+xml,text/occi
29
+ Set-Cookie:
30
+ - rack.session=BAh7B0kiD3Nlc3Npb25faWQGOgZFRiJFMDg3MzljYWY5NzIxY2VlOWE0NjI0%0AYTIxNWJlNjNmYzZmMTMxMzAxNDU2YzlkMGM1YjU0OWU1ZDFkNTZkYTE5Zkki%0ADXRyYWNraW5nBjsARnsISSIUSFRUUF9VU0VSX0FHRU5UBjsARiItZGEzOWEz%0AZWU1ZTZiNGIwZDMyNTViZmVmOTU2MDE4OTBhZmQ4MDcwOUkiGUhUVFBfQUND%0ARVBUX0VOQ09ESU5HBjsARiItZGEzOWEzZWU1ZTZiNGIwZDMyNTViZmVmOTU2%0AMDE4OTBhZmQ4MDcwOUkiGUhUVFBfQUNDRVBUX0xBTkdVQUdFBjsARiItZGEz%0AOWEzZWU1ZTZiNGIwZDMyNTViZmVmOTU2MDE4OTBhZmQ4MDcwOQ%3D%3D%0A--ddb37075ac62fd3bda55c7fc4c29d508530b1d5d;
31
+ path=/; HttpOnly
32
+ Content-Length:
33
+ - '738'
34
+ Status:
35
+ - '200'
36
+ Vary:
37
+ - Accept-Encoding
38
+ Content-Type:
39
+ - text/plain;charset=utf-8
40
+ body:
41
+ encoding: US-ASCII
42
+ string: ''
43
+ http_version:
44
+ recorded_at: Thu, 10 Jan 2013 13:52:41 GMT
45
+ - request:
46
+ method: get
47
+ uri: http://141.5.99.69/-/
48
+ body:
49
+ encoding: US-ASCII
50
+ string: ''
51
+ headers:
52
+ Accept:
53
+ - text/plain
54
+ response:
55
+ status:
56
+ code: 200
57
+ message: OK
58
+ headers:
59
+ Date:
60
+ - Thu, 10 Jan 2013 13:52:01 GMT
61
+ Server:
62
+ - Apache/2.2.22 (Ubuntu)
63
+ X-Powered-By:
64
+ - Phusion Passenger (mod_rails/mod_rack) 3.0.18
65
+ X-Frame-Options:
66
+ - sameorigin
67
+ X-Xss-Protection:
68
+ - 1; mode=block
69
+ Accept:
70
+ - application/occi+json,application/json,text/plain,text/uri-list,application/xml,text/xml,application/occi+xml,text/occi
71
+ Set-Cookie:
72
+ - rack.session=BAh7B0kiD3Nlc3Npb25faWQGOgZFRiJFNDQ2ZGUwN2IwNzRiNjM0ZTIxNGFh%0AMGRhMjUzZDRmY2ZjMDgwMTc1MjkzNjc2MGFhYTlkNmUzOWE4N2QyYjJmMEki%0ADXRyYWNraW5nBjsARnsISSIUSFRUUF9VU0VSX0FHRU5UBjsARiItZGEzOWEz%0AZWU1ZTZiNGIwZDMyNTViZmVmOTU2MDE4OTBhZmQ4MDcwOUkiGUhUVFBfQUND%0ARVBUX0VOQ09ESU5HBjsARiItZGEzOWEzZWU1ZTZiNGIwZDMyNTViZmVmOTU2%0AMDE4OTBhZmQ4MDcwOUkiGUhUVFBfQUNDRVBUX0xBTkdVQUdFBjsARiItZGEz%0AOWEzZWU1ZTZiNGIwZDMyNTViZmVmOTU2MDE4OTBhZmQ4MDcwOQ%3D%3D%0A--af7a5b05f9640950c2dd6dcd66eb00a201915e4c;
73
+ path=/; HttpOnly
74
+ Content-Length:
75
+ - '6397'
76
+ Status:
77
+ - '200'
78
+ Vary:
79
+ - Accept-Encoding
80
+ Content-Type:
81
+ - text/plain;charset=utf-8
82
+ body:
83
+ encoding: US-ASCII
84
+ string: ! 'Category: entity;scheme="http://schemas.ogf.org/occi/core#";class="kind";title="Entity";location="/entity/";attributes="occi.core.id
85
+ occi.core.title"
86
+
87
+ Category: resource;scheme="http://schemas.ogf.org/occi/core#";class="kind";title="Resource";rel="http://schemas.ogf.org/occi/core#entity";location="/resource/";attributes="occi.core.summary"
88
+
89
+ Category: link;scheme="http://schemas.ogf.org/occi/core#";class="kind";title="Link";rel="http://schemas.ogf.org/occi/core#entity";location="/link/";attributes="occi.core.target
90
+ occi.core.source"
91
+
92
+ Category: compute;scheme="http://schemas.ogf.org/occi/infrastructure#";class="kind";title="Compute
93
+ Resource";rel="http://schemas.ogf.org/occi/core#resource";location="/compute/";attributes="occi.compute.architecture
94
+ occi.compute.cores occi.compute.hostname occi.compute.speed occi.compute.memory
95
+ occi.compute.state";actions="http://schemas.ogf.org/occi/infrastructure/compute/action#start
96
+ http://schemas.ogf.org/occi/infrastructure/compute/action#stop http://schemas.ogf.org/occi/infrastructure/compute/action#restart
97
+ http://schemas.ogf.org/occi/infrastructure/compute/action#suspend"
98
+
99
+ Category: networkinterface;scheme="http://schemas.ogf.org/occi/infrastructure#";class="kind";title="Networkinterface";rel="http://schemas.ogf.org/occi/core#link";location="/networkinterface/";attributes="occi.networkinterface.interface
100
+ occi.networkinterface.mac occi.networkinterface.state"
101
+
102
+ Category: storage;scheme="http://schemas.ogf.org/occi/infrastructure#";class="kind";title="Storage
103
+ Resource";rel="http://schemas.ogf.org/occi/core#resource";location="/storage/";attributes="occi.storage.size
104
+ occi.storage.state";actions="http://schemas.ogf.org/occi/infrastructure/storage/action#online
105
+ http://schemas.ogf.org/occi/infrastructure/storage/action#offline http://schemas.ogf.org/occi/infrastructure/storage/action#backup
106
+ http://schemas.ogf.org/occi/infrastructure/storage/action#snapshot http://schemas.ogf.org/occi/infrastructure/storage/action#resize"
107
+
108
+ Category: network;scheme="http://schemas.ogf.org/occi/infrastructure#";class="kind";title="Network
109
+ Resource";rel="http://schemas.ogf.org/occi/core#resource";location="/network/";attributes="occi.network.vlan
110
+ occi.network.label occi.network.state";actions="http://schemas.ogf.org/occi/infrastructure/network/action#up
111
+ http://schemas.ogf.org/occi/infrastructure/network/action#down"
112
+
113
+ Category: storagelink;scheme="http://schemas.ogf.org/occi/infrastructure#";class="kind";title="Storage
114
+ Link";rel="http://schemas.ogf.org/occi/core#link";location="/storagelink/";attributes="occi.storagelink.deviceid
115
+ occi.storagelink.mountpoint occi.storagelink.state"
116
+
117
+ Category: ipnetwork;scheme="http://schemas.ogf.org/occi/infrastructure/network#";class="mixin";title="IP
118
+ Network Mixin";location="/mixins/ipnetwork/";attributes="occi.network.address
119
+ occi.network.gateway occi.network.allocation occi.network.state"
120
+
121
+ Category: resource_tpl;scheme="http://schemas.ogf.org/occi/infrastructure#";class="mixin";title="Resource
122
+ Template";location="/mixins/resource_tpl/"
123
+
124
+ Category: os_tpl;scheme="http://schemas.ogf.org/occi/infrastructure#";class="mixin";title="Operating
125
+ System Template";location="/mixins/os_tpl/"
126
+
127
+ Category: ipnetworkinterface;scheme="http://schemas.ogf.org/occi/infrastructure/networkinterface#";class="mixin";title="IP
128
+ Networkinterface Mixin";location="/mixins/ipnetworkinterface/";attributes="occi.networkinterface.address
129
+ occi.networkinterface.gateway occi.networkinterface.allocation occi.networkinterface.state"
130
+
131
+ Category: my_os;scheme="http://my.occi.service/occi/infrastructure/os_tpl#";class="mixin";title="My
132
+ OS Template";rel="http://schemas.ogf.org/occi/infrastructure#os_tpl";location="/mixins/my_os/"
133
+
134
+ Category: large;scheme="http://my.occi.service/occi/infrastructure/resource_tpl#";class="mixin";title="Large
135
+ Instance";rel="http://schemas.ogf.org/occi/infrastructure#resource_tpl";location="/mixins/large/";attributes="occi.compute.architecture
136
+ occi.compute.cores occi.compute.speed occi.compute.memory"
137
+
138
+ Category: small;scheme="http://my.occi.service/occi/infrastructure/resource_tpl#";class="mixin";title="Small
139
+ Instance";rel="http://schemas.ogf.org/occi/infrastructure#resource_tpl";location="/mixins/small/";attributes="occi.compute.architecture
140
+ occi.compute.cores occi.compute.speed occi.compute.memory"
141
+
142
+ Category: medium;scheme="http://my.occi.service/occi/infrastructure/resource_tpl#";class="mixin";title="Medium
143
+ Instance";rel="http://schemas.ogf.org/occi/infrastructure#resource_tpl";location="/mixins/medium/";attributes="occi.compute.architecture
144
+ occi.compute.cores occi.compute.speed occi.compute.memory"
145
+
146
+ Category: extra_large;scheme="http://my.occi.service/occi/infrastructure/resource_tpl#";class="mixin";title="Extra
147
+ Large Instance";rel="http://schemas.ogf.org/occi/infrastructure#resource_tpl";location="/mixins/extra_large/";attributes="occi.compute.architecture
148
+ occi.compute.cores occi.compute.speed occi.compute.memory"
149
+
150
+ Category: start;scheme="http://schemas.ogf.org/occi/infrastructure/compute/action#";class="action";title="Start
151
+ Compute instance"
152
+
153
+ Category: stop;scheme="http://schemas.ogf.org/occi/infrastructure/compute/action#";class="action";title="Stop
154
+ Compute instance";attributes="method"
155
+
156
+ Category: restart;scheme="http://schemas.ogf.org/occi/infrastructure/compute/action#";class="action";title="Restart
157
+ Compute instance";attributes="method"
158
+
159
+ Category: suspend;scheme="http://schemas.ogf.org/occi/infrastructure/compute/action#";class="action";title="Suspend
160
+ Compute instance";attributes="method"
161
+
162
+ Category: online;scheme="http://schemas.ogf.org/occi/infrastructure/storage/action#";class="action";title="Activate
163
+ Storage"
164
+
165
+ Category: offline;scheme="http://schemas.ogf.org/occi/infrastructure/storage/action#";class="action";title="Deactivate
166
+ Storage"
167
+
168
+ Category: backup;scheme="http://schemas.ogf.org/occi/infrastructure/storage/action#";class="action";title="Backup
169
+ Storage"
170
+
171
+ Category: snapshot;scheme="http://schemas.ogf.org/occi/infrastructure/storage/action#";class="action";title="Snapshot
172
+ Storage"
173
+
174
+ Category: resize;scheme="http://schemas.ogf.org/occi/infrastructure/storage/action#";class="action";title="Resize
175
+ Storage";attributes="size"
176
+
177
+ Category: up;scheme="http://schemas.ogf.org/occi/infrastructure/network/action#";class="action";title="Activate
178
+ network"
179
+
180
+ Category: down;scheme="http://schemas.ogf.org/occi/infrastructure/network/action#";class="action";title="Activate
181
+ network"
182
+
183
+ '
184
+ http_version:
185
+ recorded_at: Thu, 10 Jan 2013 13:52:41 GMT
186
+ - request:
187
+ method: get
188
+ uri: http://141.5.99.69/
189
+ body:
190
+ encoding: US-ASCII
191
+ string: ''
192
+ headers:
193
+ Accept:
194
+ - text/plain
195
+ response:
196
+ status:
197
+ code: 200
198
+ message: OK
199
+ headers:
200
+ Date:
201
+ - Tue, 12 Mar 2013 13:29:42 GMT
202
+ Server:
203
+ - Apache/2.2.22 (Ubuntu)
204
+ X-Powered-By:
205
+ - Phusion Passenger (mod_rails/mod_rack) 3.0.18
206
+ X-Frame-Options:
207
+ - sameorigin
208
+ X-Xss-Protection:
209
+ - 1; mode=block
210
+ Accept:
211
+ - application/occi+json,application/json,text/plain,text/uri-list,application/xml,text/xml,application/occi+xml,text/occi
212
+ Set-Cookie:
213
+ - rack.session=BAh7B0kiD3Nlc3Npb25faWQGOgZFRiJFNjFhMGNmNzdmMDUyOWRmMTBlNWRj%0AOGM2NjE0YWZmMGJjZTYxNDliYjY1OTVhM2E0MjcwNmJiMzJiM2Y2MjY1N0ki%0ADXRyYWNraW5nBjsARnsISSIUSFRUUF9VU0VSX0FHRU5UBjsARiItZGEzOWEz%0AZWU1ZTZiNGIwZDMyNTViZmVmOTU2MDE4OTBhZmQ4MDcwOUkiGUhUVFBfQUND%0ARVBUX0VOQ09ESU5HBjsARiItZGEzOWEzZWU1ZTZiNGIwZDMyNTViZmVmOTU2%0AMDE4OTBhZmQ4MDcwOUkiGUhUVFBfQUNDRVBUX0xBTkdVQUdFBjsARiItZGEz%0AOWEzZWU1ZTZiNGIwZDMyNTViZmVmOTU2MDE4OTBhZmQ4MDcwOQ%3D%3D%0A--c0f98b65169ac2a7e9b2849d1315a7649a2c4e32;
214
+ path=/; HttpOnly
215
+ Content-Length:
216
+ - '738'
217
+ Status:
218
+ - '200'
219
+ Vary:
220
+ - Accept-Encoding
221
+ Content-Type:
222
+ - text/plain;charset=utf-8
223
+ body:
224
+ encoding: US-ASCII
225
+ string: ! 'X-OCCI-Location: http://141.5.99.69/compute/48e7c51c-5a7d-11e2-a300-fa163e16d22f
226
+
227
+ X-OCCI-Location: http://141.5.99.69/compute/6c706278-5a7d-11e2-a300-fa163e16d22f
228
+
229
+ X-OCCI-Location: http://141.5.99.69/compute/7582ffc4-5a7d-11e2-a300-fa163e16d22f
230
+
231
+ X-OCCI-Location: http://141.5.99.69/compute/8eb0deb2-5a7d-11e2-a300-fa163e16d22f
232
+
233
+ X-OCCI-Location: http://141.5.99.69/compute/8efa93e0-5a7d-11e2-a300-fa163e16d22f
234
+
235
+ X-OCCI-Location: http://141.5.99.69/compute/49cbeaee-5b1d-11e2-a300-fa163e16d22f
236
+
237
+ X-OCCI-Location: http://141.5.99.69/compute/c87fa76c-5b1e-11e2-a300-fa163e16d22f
238
+
239
+ X-OCCI-Location: http://141.5.99.69/compute/1cc544b2-5b1f-11e2-a300-fa163e16d22f
240
+
241
+ X-OCCI-Location: http://141.5.99.69/compute/38e2a6b2-5b1f-11e2-a300-fa163e16d22f
242
+
243
+ '
244
+ http_version:
245
+ recorded_at: Tue, 12 Mar 2013 13:29:35 GMT
246
+ - request:
247
+ method: head
248
+ uri: http://141.5.99.69/
249
+ body:
250
+ encoding: US-ASCII
251
+ string: ''
252
+ headers:
253
+ Accept:
254
+ - text/plain
255
+ response:
256
+ status:
257
+ code: 200
258
+ message: OK
259
+ headers:
260
+ Date:
261
+ - Tue, 12 Mar 2013 15:27:53 GMT
262
+ Server:
263
+ - Apache/2.2.22 (Ubuntu)
264
+ X-Powered-By:
265
+ - Phusion Passenger (mod_rails/mod_rack) 3.0.18
266
+ X-Frame-Options:
267
+ - sameorigin
268
+ X-Xss-Protection:
269
+ - 1; mode=block
270
+ Accept:
271
+ - application/occi+json,application/json,text/plain,text/uri-list,application/xml,text/xml,application/occi+xml,text/occi
272
+ Set-Cookie:
273
+ - rack.session=BAh7B0kiD3Nlc3Npb25faWQGOgZFRiJFOTdkZDQ1N2ZiYjdmMjE4NDgzNjMy%0AMzE0ZGI3YjRjOGIwZjMyNTY4ODRkZGVhNjE3NWM4OWI2MDRkNzJiMmFjOUki%0ADXRyYWNraW5nBjsARnsISSIUSFRUUF9VU0VSX0FHRU5UBjsARiItZGEzOWEz%0AZWU1ZTZiNGIwZDMyNTViZmVmOTU2MDE4OTBhZmQ4MDcwOUkiGUhUVFBfQUND%0ARVBUX0VOQ09ESU5HBjsARiItZGEzOWEzZWU1ZTZiNGIwZDMyNTViZmVmOTU2%0AMDE4OTBhZmQ4MDcwOUkiGUhUVFBfQUNDRVBUX0xBTkdVQUdFBjsARiItZGEz%0AOWEzZWU1ZTZiNGIwZDMyNTViZmVmOTU2MDE4OTBhZmQ4MDcwOQ%3D%3D%0A--222744ef8a6fa387cf796b175ba56ec13ea1fa93;
274
+ path=/; HttpOnly
275
+ Content-Length:
276
+ - '738'
277
+ Status:
278
+ - '200'
279
+ Vary:
280
+ - Accept-Encoding
281
+ Content-Type:
282
+ - text/plain;charset=utf-8
283
+ body:
284
+ encoding: US-ASCII
285
+ string: ''
286
+ http_version:
287
+ recorded_at: Tue, 12 Mar 2013 15:27:46 GMT
288
+ recorded_with: VCR 2.4.0