deltacloud-core 0.3.0 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (242) hide show
  1. data/LICENSE +145 -0
  2. data/NOTICE +10 -1
  3. data/Rakefile +50 -2
  4. data/bin/deltacloudd +111 -14
  5. data/config/addresses.xml +14 -0
  6. data/config/condor.yaml +30 -0
  7. data/config/drivers/azure.yaml +3 -0
  8. data/config/drivers/condor.yaml +3 -0
  9. data/config/{drivers.yaml → drivers/ec2.yaml} +5 -34
  10. data/config/drivers/eucalyptus.yaml +8 -0
  11. data/config/drivers/gogrid.yaml +3 -0
  12. data/config/drivers/mock.yaml +3 -0
  13. data/config/drivers/opennebula.yaml +4 -0
  14. data/config/drivers/rackspace.yaml +3 -0
  15. data/config/drivers/rhevm.yaml +3 -0
  16. data/config/drivers/rimuhosting.yaml +3 -0
  17. data/config/drivers/sbc.yaml +2 -0
  18. data/config/drivers/terremark.yaml +3 -0
  19. data/config/drivers/vsphere.yaml +8 -0
  20. data/deltacloud-core.gemspec +13 -5
  21. data/deltacloud.rb +4 -2
  22. data/lib/deltacloud/backend_capability.rb +2 -2
  23. data/lib/deltacloud/base_driver/base_driver.rb +23 -52
  24. data/lib/deltacloud/base_driver/exceptions.rb +168 -0
  25. data/lib/deltacloud/base_driver/features.rb +31 -12
  26. data/lib/deltacloud/base_driver/mock_driver.rb +2 -1
  27. data/lib/deltacloud/core_ext/string.rb +2 -0
  28. data/lib/deltacloud/drivers/azure/azure_driver.rb +5 -5
  29. data/lib/deltacloud/drivers/condor/condor_client.rb +273 -0
  30. data/lib/deltacloud/drivers/condor/condor_driver.rb +236 -0
  31. data/lib/deltacloud/drivers/condor/ip_agents/confserver.rb +75 -0
  32. data/lib/deltacloud/drivers/condor/ip_agents/default.rb +84 -0
  33. data/lib/deltacloud/drivers/ec2/ec2_driver.rb +326 -95
  34. data/lib/deltacloud/drivers/ec2/ec2_mock_driver.rb +3 -3
  35. data/lib/deltacloud/drivers/eucalyptus/eucalyptus_driver.rb +40 -8
  36. data/lib/deltacloud/drivers/gogrid/gogrid_client.rb +7 -7
  37. data/lib/deltacloud/drivers/gogrid/gogrid_driver.rb +42 -25
  38. data/lib/deltacloud/drivers/mock/data/{buckets/blobs → blobs}/blob1.yml +6 -4
  39. data/lib/deltacloud/drivers/mock/data/{buckets/blobs → blobs}/blob2.yml +7 -5
  40. data/lib/deltacloud/drivers/mock/data/{buckets/blobs → blobs}/blob3.yml +6 -4
  41. data/lib/deltacloud/drivers/mock/data/{buckets/blobs → blobs}/blob4.yml +6 -4
  42. data/lib/deltacloud/drivers/mock/data/{buckets/blobs → blobs}/blob5.yml +6 -4
  43. data/lib/deltacloud/drivers/mock/data/buckets/bucket1.yml +7 -1
  44. data/lib/deltacloud/drivers/mock/data/buckets/bucket2.yml +6 -1
  45. data/lib/deltacloud/drivers/mock/data/images/img1.yml +6 -2
  46. data/lib/deltacloud/drivers/mock/data/images/img2.yml +6 -2
  47. data/lib/deltacloud/drivers/mock/data/images/img3.yml +6 -2
  48. data/lib/deltacloud/drivers/mock/data/instances/inst0.yml +11 -10
  49. data/lib/deltacloud/drivers/mock/data/instances/inst1.yml +14 -7
  50. data/lib/deltacloud/drivers/mock/data/instances/inst2.yml +14 -7
  51. data/lib/deltacloud/drivers/mock/data/storage_snapshots/snap1.yml +3 -2
  52. data/lib/deltacloud/drivers/mock/data/storage_snapshots/snap2.yml +3 -2
  53. data/lib/deltacloud/drivers/mock/data/storage_snapshots/snap3.yml +3 -2
  54. data/lib/deltacloud/drivers/mock/data/storage_volumes/vol1.yml +4 -3
  55. data/lib/deltacloud/drivers/mock/data/storage_volumes/vol2.yml +4 -3
  56. data/lib/deltacloud/drivers/mock/data/storage_volumes/vol3.yml +4 -3
  57. data/lib/deltacloud/drivers/mock/mock_client.rb +101 -0
  58. data/lib/deltacloud/drivers/mock/mock_driver.rb +367 -429
  59. data/lib/deltacloud/drivers/opennebula/opennebula_driver.rb +6 -0
  60. data/lib/deltacloud/drivers/rackspace/rackspace_driver.rb +59 -9
  61. data/lib/deltacloud/drivers/rhevm/rhevm_client.rb +62 -8
  62. data/lib/deltacloud/drivers/rhevm/rhevm_driver.rb +100 -45
  63. data/lib/deltacloud/drivers/rimuhosting/rimuhosting_client.rb +3 -2
  64. data/lib/deltacloud/drivers/rimuhosting/rimuhosting_driver.rb +8 -11
  65. data/lib/deltacloud/drivers/sbc/sbc_client.rb +6 -6
  66. data/lib/deltacloud/drivers/sbc/sbc_driver.rb +16 -0
  67. data/lib/deltacloud/drivers/terremark/terremark_driver.rb +17 -12
  68. data/lib/deltacloud/drivers/vsphere/vsphere_client.rb +140 -0
  69. data/lib/deltacloud/drivers/vsphere/vsphere_driver.rb +405 -0
  70. data/lib/deltacloud/drivers/vsphere/vsphere_filemanager.rb +182 -0
  71. data/lib/deltacloud/hardware_profile.rb +1 -1
  72. data/lib/deltacloud/helpers.rb +2 -1
  73. data/lib/deltacloud/helpers/application_helper.rb +92 -20
  74. data/lib/deltacloud/helpers/blob_stream.rb +160 -12
  75. data/lib/deltacloud/helpers/conversion_helper.rb +6 -2
  76. data/lib/deltacloud/helpers/json_helper.rb +31 -0
  77. data/lib/deltacloud/models/address.rb +28 -0
  78. data/lib/deltacloud/models/base_model.rb +5 -1
  79. data/lib/deltacloud/models/blob.rb +1 -1
  80. data/lib/deltacloud/models/bucket.rb +10 -0
  81. data/lib/deltacloud/models/firewall.rb +22 -0
  82. data/lib/deltacloud/models/firewall_rule.rb +23 -0
  83. data/lib/deltacloud/models/image.rb +12 -0
  84. data/lib/deltacloud/models/instance.rb +20 -2
  85. data/lib/deltacloud/models/key.rb +1 -1
  86. data/lib/deltacloud/runner.rb +3 -3
  87. data/lib/deltacloud/validation.rb +3 -7
  88. data/lib/drivers.rb +7 -1
  89. data/lib/sinatra/body_proxy.rb +34 -0
  90. data/lib/sinatra/lazy_auth.rb +5 -0
  91. data/lib/sinatra/rabbit.rb +54 -31
  92. data/lib/sinatra/rack_accept.rb +157 -0
  93. data/lib/sinatra/rack_date.rb +38 -0
  94. data/lib/sinatra/rack_etag.rb +2 -3
  95. data/lib/sinatra/rack_matrix_params.rb +51 -29
  96. data/lib/sinatra/rack_runtime.rb +1 -1
  97. data/lib/sinatra/rack_syslog.rb +86 -0
  98. data/lib/sinatra/url_for.rb +14 -1
  99. data/public/images/address.png +0 -0
  100. data/public/images/balancer.png +0 -0
  101. data/public/images/blob.png +0 -0
  102. data/public/images/bucket.png +0 -0
  103. data/public/images/cloud.png +0 -0
  104. data/public/images/firewall.png +0 -0
  105. data/public/images/image.png +0 -0
  106. data/public/images/key.png +0 -0
  107. data/public/images/machine.png +0 -0
  108. data/public/images/profile.png +0 -0
  109. data/public/images/realm.png +0 -0
  110. data/public/images/snapshot.png +0 -0
  111. data/public/images/volume.png +0 -0
  112. data/public/javascripts/application.js +119 -16
  113. data/public/javascripts/jquery.min.js +18 -0
  114. data/public/javascripts/jquery.mobile-1.0b1.min.js +146 -0
  115. data/public/stylesheets/compiled/application.css +8 -0
  116. data/public/stylesheets/images/ajax-loader.png +0 -0
  117. data/public/{images → stylesheets/images}/bread-bg.png +0 -0
  118. data/public/{images → stylesheets/images}/error.png +0 -0
  119. data/public/{images → stylesheets/images}/grid.png +0 -0
  120. data/public/stylesheets/images/icon-search-black.png +0 -0
  121. data/public/stylesheets/images/icons-18-black.png +0 -0
  122. data/public/stylesheets/images/icons-18-white.png +0 -0
  123. data/public/stylesheets/images/icons-36-black.png +0 -0
  124. data/public/stylesheets/images/icons-36-white.png +0 -0
  125. data/public/{images → stylesheets/images}/logo-wide.png +0 -0
  126. data/public/{images → stylesheets/images}/pending.png +0 -0
  127. data/public/{images → stylesheets/images}/rails.png +0 -0
  128. data/public/{images → stylesheets/images}/running.png +0 -0
  129. data/public/{images → stylesheets/images}/stopped.png +0 -0
  130. data/public/{images → stylesheets/images}/topbar-bg.png +0 -0
  131. data/public/stylesheets/jquery.mobile-1.0b1.min.css +8 -0
  132. data/public/stylesheets/new.css +53 -0
  133. data/server.rb +487 -175
  134. data/support/condor/bash/cached_images.sh +8 -0
  135. data/support/condor/bash/cloud_exit_hook.sh +17 -0
  136. data/support/condor/bash/cloud_functions +175 -0
  137. data/support/condor/bash/cloud_prepare_hook.sh +20 -0
  138. data/support/condor/bash/libvirt_cloud_script.sh +13 -0
  139. data/support/condor/config/50condor_cloud.config +37 -0
  140. data/support/condor/config/50condor_cloud_node.config +37 -0
  141. data/support/condor/config/condor-cloud +2 -0
  142. data/support/condor/config/condor_config.local +44 -0
  143. data/support/fedora/deltacloud-core +48 -26
  144. data/support/fedora/deltacloud-core-config +26 -0
  145. data/support/fedora/deltacloud-core.spec +314 -68
  146. data/support/fedora/deltacloudd-fedora +5 -0
  147. data/tests/common.rb +34 -4
  148. data/tests/drivers/mock/api_test.rb +3 -3
  149. data/tests/drivers/mock/images_test.rb +12 -0
  150. data/tests/drivers/mock/instances_test.rb +2 -0
  151. data/tests/rabbit_test.rb +2 -2
  152. data/views/addresses/_address.html.haml +6 -0
  153. data/views/addresses/associate.html.haml +12 -0
  154. data/views/addresses/index.html.haml +9 -0
  155. data/views/addresses/index.xml.haml +4 -0
  156. data/views/addresses/show.html.haml +21 -0
  157. data/views/addresses/show.xml.haml +14 -0
  158. data/views/api/show.html.haml +6 -11
  159. data/views/api/show.xml.haml +2 -0
  160. data/views/blobs/new.html.haml +24 -23
  161. data/views/blobs/show.html.haml +30 -31
  162. data/views/buckets/index.html.haml +9 -21
  163. data/views/buckets/index.xml.haml +3 -7
  164. data/views/buckets/new.html.haml +13 -12
  165. data/views/buckets/show.html.haml +22 -22
  166. data/views/buckets/show.xml.haml +5 -3
  167. data/views/docs/collection.html.haml +23 -34
  168. data/views/docs/collection.xml.haml +2 -2
  169. data/views/docs/index.html.haml +9 -13
  170. data/views/docs/index.xml.haml +1 -1
  171. data/views/docs/operation.html.haml +28 -38
  172. data/views/docs/operation.xml.haml +1 -1
  173. data/views/drivers/index.html.haml +8 -13
  174. data/views/drivers/show.html.haml +18 -18
  175. data/views/error.html.haml +32 -27
  176. data/views/errors/400.html.haml +41 -0
  177. data/views/errors/{validation_failure.xml.haml → 400.xml.haml} +0 -4
  178. data/views/errors/401.html.haml +41 -0
  179. data/views/errors/{auth_exception.xml.haml → 401.xml.haml} +0 -0
  180. data/views/errors/403.html.haml +42 -0
  181. data/views/errors/{not_allowed.xml.haml → 403.xml.haml} +0 -0
  182. data/views/errors/404.html.haml +29 -0
  183. data/views/errors/{not_found.xml.haml → 404.xml.haml} +1 -1
  184. data/views/errors/405.html.haml +29 -0
  185. data/views/errors/405.xml.haml +5 -0
  186. data/views/errors/500.html.haml +43 -0
  187. data/views/errors/500.xml.haml +5 -0
  188. data/views/errors/502.html.haml +43 -0
  189. data/views/errors/{backend_error.xml.haml → 502.xml.haml} +1 -2
  190. data/views/errors/backend_capability_failure.html.haml +27 -9
  191. data/views/firewalls/index.html.haml +15 -0
  192. data/views/firewalls/index.xml.haml +28 -0
  193. data/views/firewalls/new.html.haml +11 -0
  194. data/views/firewalls/new_rule.html.haml +20 -0
  195. data/views/firewalls/show.html.haml +42 -0
  196. data/views/firewalls/show.xml.haml +26 -0
  197. data/views/hardware_profiles/index.html.haml +15 -23
  198. data/views/hardware_profiles/show.html.haml +22 -18
  199. data/views/images/index.html.haml +11 -23
  200. data/views/images/index.xml.haml +4 -13
  201. data/views/images/new.html.haml +12 -13
  202. data/views/images/show.html.haml +26 -20
  203. data/views/images/show.xml.haml +2 -1
  204. data/views/instance_states/show.html.haml +21 -25
  205. data/views/instances/index.html.haml +13 -30
  206. data/views/instances/index.xml.haml +2 -23
  207. data/views/instances/new.html.haml +83 -88
  208. data/views/instances/show.html.haml +53 -55
  209. data/views/instances/show.xml.haml +12 -10
  210. data/views/keys/index.html.haml +13 -24
  211. data/views/keys/new.html.haml +7 -7
  212. data/views/keys/show.html.haml +26 -21
  213. data/views/layout.html.haml +28 -27
  214. data/views/load_balancers/index.html.haml +11 -31
  215. data/views/load_balancers/index.xml.haml +0 -1
  216. data/views/load_balancers/new.html.haml +1 -1
  217. data/views/load_balancers/show.html.haml +33 -34
  218. data/views/load_balancers/show.xml.haml +2 -2
  219. data/views/realms/index.html.haml +11 -24
  220. data/views/realms/index.xml.haml +2 -8
  221. data/views/realms/show.html.haml +17 -15
  222. data/views/realms/show.xml.haml +2 -1
  223. data/views/storage_snapshots/index.html.haml +11 -21
  224. data/views/storage_snapshots/index.xml.haml +2 -5
  225. data/views/storage_snapshots/new.html.haml +1 -1
  226. data/views/storage_snapshots/show.html.haml +21 -13
  227. data/views/storage_snapshots/show.xml.haml +2 -1
  228. data/views/storage_volumes/index.html.haml +11 -34
  229. data/views/storage_volumes/new.html.haml +1 -1
  230. data/views/storage_volumes/show.html.haml +33 -27
  231. data/views/storage_volumes/show.xml.haml +2 -1
  232. metadata +266 -178
  233. data/lib/sinatra/respond_to.rb +0 -248
  234. data/support/fedora/deltacloudd +0 -128
  235. data/support/fedora/rubygem-deltacloud-core.spec +0 -127
  236. data/views/accounts/index.html.haml +0 -11
  237. data/views/accounts/show.html.haml +0 -30
  238. data/views/errors/auth_exception.html.haml +0 -8
  239. data/views/errors/backend_error.html.haml +0 -22
  240. data/views/errors/not_allowed.html.haml +0 -6
  241. data/views/errors/not_found.html.haml +0 -6
  242. data/views/errors/validation_failure.html.haml +0 -11
@@ -0,0 +1,26 @@
1
+ # Deltacloud API configuration
2
+ # http://deltacloud.org
3
+
4
+ # Default port where Deltacloud API will listen on (3002)
5
+ # You should be able to access Deltacloud API on http://localhost:PORT/api
6
+
7
+ PORT=3002
8
+
9
+ # Bind to HOST address (default: localhost)
10
+ # You can use both IP address or hostname
11
+
12
+ HOST=localhost
13
+
14
+ # Default driver to be used (EC2).
15
+ # NOTE: Some drivers require some additional gems to be installed.
16
+ # Please reffer to http://deltacloud.org to see what gems are needed for specific
17
+ # drivers
18
+
19
+ DRIVER="ec2"
20
+
21
+ # Default log file for Deltacloud API
22
+ # LOGFILE="/var/log/deltacloud-core/ec2.log"
23
+ #
24
+ # Default user under Deltacloud API will be run (default: nobody)
25
+ #
26
+ # DELTACLOUD_USER="nobody"
@@ -1,16 +1,18 @@
1
- %global ruby_sitelib %(ruby -rrbconfig -e "puts Config::CONFIG['sitelibdir']")
2
- %global gemdir %(ruby -rubygems -e 'puts Gem::dir' 2>/dev/null)
3
- %global geminstdir %{gemdir}/gems/deltacloud-core-%{version}
1
+ %global app_root %{_datadir}/%{name}
2
+ %%global alphatag git
4
3
 
5
4
  Summary: Deltacloud REST API
6
5
  Name: deltacloud-core
7
- Version: 0.3.0
8
- Release: 1%{?dist}
6
+ Version: 0.4.0
7
+ Release: 0.1.%{alphatag}
9
8
  Group: Development/Languages
10
9
  License: ASL 2.0 and MIT
11
10
  URL: http://incubator.apache.org/deltacloud
12
- Source0: http://gems.rubyforge.org/gems/deltacloud-core-%{version}.gem
13
- # Note: This would be needed only for EPEL branches:
11
+ Source0: http://gems.rubyforge.org/gems/%{name}-%{version}.gem
12
+ Source1: deltacloudd-fedora
13
+ Source2: deltacloud-core
14
+ Source3: deltacloud-core-config
15
+ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
14
16
  BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
15
17
  Requires: rubygems
16
18
  Requires: ruby(abi) = 1.8
@@ -18,28 +20,29 @@ Requires: rubygem(haml)
18
20
  Requires: rubygem(sinatra) >= 1.0
19
21
  Requires: rubygem(rack) >= 1.1.0
20
22
  Requires: rubygem(thin)
21
- Requires: rubygem(haml)
23
+ Requires: rubygem(net-ssh)
22
24
  Requires: rubygem(json) >= 1.4.0
23
- Requires: rubygem(net-ssh) >= 2.0.0
24
25
  Requires: rubygem(rack-accept)
25
- Requires(post): chkconfig
26
- Requires(preun): chkconfig
27
- Requires(preun): initscripts
26
+ Requires: rubygem(nokogiri)
27
+ Requires(post): chkconfig
28
+ Requires(preun): chkconfig
29
+ Requires(preun): initscripts
28
30
  Requires(postun): initscripts
29
31
  BuildRequires: rubygems
30
32
  BuildRequires: ruby(abi) = 1.8
31
- BuildRequires: rubygem(sinatra) >= 1.0
32
33
  BuildRequires: rubygem(haml)
33
- BuildRequires: rubygem(rack) >= 1.1.0
34
- BuildRequires: rubygem(nokogiri) >= 1.4.3
35
- BuildRequires: rubygem(net-ssh) >= 2.0.0
34
+ BuildRequires: rubygem(sinatra) >= 1.0
35
+ BuildRequires: rubygem(nokogiri)
36
+ BuildRequires: rubygem(net-ssh)
37
+ BuildRequires: rubygem(aws)
36
38
  BuildRequires: rubygem(rack-accept)
37
- BuildRequires: rubygem(json) >= 1.4.0
38
39
  BuildRequires: rubygem(rake) >= 0.8.7
40
+ BuildRequires: rubygem(rack) >= 1.1.0
39
41
  BuildRequires: rubygem(rack-test) >= 0.5.0
40
42
  BuildRequires: rubygem(rspec) >= 1.3.0
43
+ BuildRequires: rubygem(json) >= 1.4.0
41
44
  BuildArch: noarch
42
- Provides: deltacloud-core = %{version}
45
+ Obsoletes: rubygem-deltacloud-core
43
46
 
44
47
  %description
45
48
  The Deltacloud API is built as a service-based REST API.
@@ -50,94 +53,337 @@ which implements the REST interface.
50
53
  %package doc
51
54
  Summary: Documentation for %{name}
52
55
  Group: Documentation
53
- Requires:%{name} = %{version}-%{release}
56
+ Requires: %{name} = %{version}-%{release}
54
57
 
55
58
  %description doc
56
59
  Documentation for %{name}
57
60
 
61
+ %package all
62
+ Summary: Deltacloud Core with all drivers
63
+ Requires: %{name} = %{version}-%{release}
64
+ Requires: deltacloud-core-ec2
65
+ Requires: deltacloud-core-rackspace
66
+ Requires: deltacloud-core-gogrid
67
+ Requires: deltacloud-core-rimuhosting
68
+ Requires: deltacloud-core-rhevm
69
+ Requires: deltacloud-core-sbc
70
+
71
+ %description all
72
+ Deltacloud core with all available drivers
73
+
74
+ # FIXME: Azure requires waz-blobs gem which is not yet included in Fedora repos
75
+ #
76
+ #%package azure
77
+ #Summary: Deltacloud Core for Azure
78
+ #Requires: %{name} = %{version}-%{release}
79
+ #Requires: rubygem(waz-blobs)
80
+
81
+ #%description azure
82
+ #The azure sub-package brings in all dependencies necessary to use deltacloud
83
+ #core to connect to Azure.
84
+
85
+ %package ec2
86
+ Summary: Deltacloud Core for EC2
87
+ Requires: %{name} = %{version}-%{release}
88
+ Requires: rubygem(aws)
89
+
90
+ %description ec2
91
+ The ec2 sub-package brings in all dependencies necessary to use deltacloud
92
+ core to connect to EC2.
93
+
94
+ %package eucalyptus
95
+ Summary: Deltacloud Core for Eucalyptus
96
+ Requires: %{name} = %{version}-%{release}
97
+ Requires: rubygem(aws)
98
+
99
+ %description eucalyptus
100
+ The eucalyptus sub-package brings in all dependencies necessary to use deltacloud
101
+ core to connect to EC2.
102
+
103
+ %package gogrid
104
+ Summary: Deltacloud Core for GoGrid
105
+ Requires: %{name} = %{version}-%{release}
106
+
107
+ %description gogrid
108
+ The gogrid sub-package brings in all dependencies necessary to use deltacloud
109
+ core to connect to GoGrid.
110
+
111
+ %package opennebula
112
+ Summary: Deltacloud Core for OpenNebula
113
+ Requires: %{name} = %{version}-%{release}
114
+
115
+ %description opennebula
116
+ The opennebula sub-package brings in all dependencies necessary to use
117
+ deltacloud core to connect to OpenNebula.
118
+
119
+ %package rackspace
120
+ Summary: Deltacloud Core for Rackspace
121
+ Requires: %{name} = %{version}-%{release}
122
+ Requires: rubygem(cloudfiles)
123
+ Requires: rubygem(cloudservers)
124
+
125
+ %description rackspace
126
+ The rackspace sub-package brings in all dependencies necessary to use deltacloud
127
+ core to connect to Rackspace.
128
+
129
+ %package rhevm
130
+ Summary: Deltacloud Core for RHEV-M
131
+ Requires: %{name} = %{version}-%{release}
132
+ Requires: rubygem(rest-client)
133
+
134
+ %description rhevm
135
+ The rhevm sub-package brings in all dependencies necessary to use deltacloud
136
+ core to connect to RHEV-M.
137
+
138
+ %package vsphere
139
+ Summary: Deltacloud Core for vSphere
140
+ Requires: %{name} = %{version}-%{release}
141
+ Requires: rubygem(rbvmomi)
142
+
143
+ %description vsphere
144
+ The vsphere sub-package brings in all dependencies necessary to use deltacloud
145
+ core to connect to VMware vSphere.
146
+
147
+ %package rimuhosting
148
+ Summary: Deltacloud Core for Rimuhosting
149
+ Requires: %{name} = %{version}-%{release}
150
+
151
+ %description rimuhosting
152
+ The rimuhosting sub-package brings in all dependencies necessary to use
153
+ deltacloud core to connect to Rimuhosting.
154
+
155
+ %package sbc
156
+ Summary: Deltacloud Core for SBC
157
+ Requires: %{name} = %{version}-%{release}
158
+
159
+ %description sbc
160
+ The sbc sub-package brings in all dependencies necessary to use deltacloud core
161
+ to connect to SBC.
162
+
163
+ %package condor
164
+ Summary: Deltacloud Core for CondorCloud
165
+ Requires: %{name} = %{version}-%{release}
166
+ Requires: rubygem(uuid)
167
+ Requires: rubygem(rest-client)
168
+ Requires: condor >= 7.4.0
169
+ # FIXME: condor-vm-gaph is not yet included in Fedora
170
+ # Requires: condor-vm-gaph >= 7.4.0
171
+
172
+ %description condor
173
+ The condor sub-package brings in all dependencies necessary to use deltacloud core
174
+ to connect to CondorCloud.
175
+
176
+ %package terremark
177
+ Summary: Deltacloud Core for Terremark
178
+ Requires: %{name} = %{version}-%{release}
179
+ Requires: rubygem(fog)
180
+ Requires: rubygem(excon)
181
+
182
+ %description terremark
183
+ The terremark sub-package brings in all dependencies necessary to use deltacloud
184
+ core to connect to Terremark.
185
+
58
186
  %prep
187
+ %setup -q -c -T
188
+ gem unpack -V --target=%{_builddir} %{SOURCE0}
189
+ pushd %{_builddir}/%{name}-%{version}
190
+ popd
59
191
 
60
192
  %build
61
193
 
62
194
  %install
63
195
  rm -rf %{buildroot}
64
- mkdir -p %{buildroot}%{gemdir}
196
+ mkdir -p %{buildroot}%{app_root}
65
197
  mkdir -p %{buildroot}%{_initddir}
66
- gem install --local --install-dir %{buildroot}%{gemdir} \
67
- --force --rdoc %{SOURCE0}
68
- mkdir -p %{buildroot}/%{_bindir}
69
- mkdir -p %{buildroot}/config
70
- mv %{buildroot}%{gemdir}/bin/* %{buildroot}/%{_bindir}
71
- mv %{buildroot}%{geminstdir}/support/fedora/deltacloud-core %{buildroot}%{_initddir}
72
- mv -f %{buildroot}%{geminstdir}/support/fedora/deltacloudd %{buildroot}%{geminstdir}/bin
73
- rmdir %{buildroot}%{gemdir}/bin
74
- find %{buildroot}%{geminstdir}/bin -type f | xargs chmod 755
75
- find %{buildroot}%{geminstdir}/lib -type f | xargs chmod -x
76
- chmod 755 %{buildroot}%{_initddir}/deltacloud-core
198
+ mkdir -p %{buildroot}%{_bindir}
199
+ mkdir -p %{buildroot}%{_sysconfdir}/sysconfig
200
+ cp -r %{_builddir}/%{name}-%{version}/* %{buildroot}%{app_root}
201
+ install -m 0755 %{SOURCE1} %{buildroot}%{_bindir}/deltacloudd
202
+ install -m 0755 %{SOURCE2} %{buildroot}%{_initddir}/%{name}
203
+ install -m 0655 %{SOURCE3} %{buildroot}%{_sysconfdir}/sysconfig/%{name}
204
+ find %{buildroot}%{app_root}/lib -type f | xargs chmod -x
205
+ chmod -x %{buildroot}%{_sysconfdir}/sysconfig/%{name}
206
+ chmod 0755 %{buildroot}%{_initddir}/%{name}
207
+ chmod 0755 %{buildroot}%{app_root}/bin/deltacloudd
208
+ # Temporary remove Azure drivers until all dependencies will be pushed in to Fedora
209
+ rm -rf %{buildroot}%{app_root}/config/drivers/azure.yaml
210
+ rm -rf %{buildroot}%{app_root}/support/fedora
211
+ rdoc --op %{buildroot}%{_defaultdocdir}/%{name}
212
+
213
+ %install condor
214
+ install -m 0655 %{buildroot}%{app_root}/support/condor/config/condor-cloud \
215
+ %{buildroot}%{_sysconfdir}/sysconfig/condor-cloud
216
+ install -m 0655 %{buildroot}%{app_root}/support/condor/config/50* \
217
+ %{buildroot}%{_sysconfdir}/condor/config.d
218
+ install -m 0755 %{buildroot}%{app_root}/support/condor/bash/* \
219
+ %{buildroot}%{_libexecdir}/condor
220
+ rm -rf %{buildroot}%{app_root}/support/condor
77
221
 
78
222
  %check
79
- pushd %{buildroot}%{geminstdir}
223
+ pushd %{buildroot}%{app_root}
224
+ rake mock:fixtures:clean
80
225
  rake test:mock
81
226
  popd
82
227
 
83
228
  %clean
84
- rm -rf %{buildroot}
85
229
 
86
230
  %post
87
231
  # This adds the proper /etc/rc*.d links for the script
88
- /sbin/chkconfig --add deltacloud-core
232
+ /sbin/chkconfig --add %{name}
89
233
 
90
234
  %preun
91
235
  if [ $1 -eq 0 ] ; then
92
- /sbin/service deltacloud-core stop >/dev/null 2>&1
93
- /sbin/chkconfig --del deltacloud-core
236
+ /sbin/service %{name} stop >/dev/null 2>&1
237
+ /sbin/chkconfig --del %{name}
94
238
  fi
95
239
 
96
240
  %postun
97
241
  if [ "$1" -ge "1" ] ; then
98
- /sbin/service deltacloud-core condrestart >/dev/null 2>&1 || :
242
+ /sbin/service %{name} condrestart >/dev/null 2>&1 || :
99
243
  fi
100
244
 
101
245
  %files
102
246
  %defattr(-, root, root, -)
103
- %{_initddir}/deltacloud-core
247
+ %{_initddir}/%{name}
104
248
  %{_bindir}/deltacloudd
105
- %dir %{geminstdir}/
106
- %{geminstdir}/bin
107
- %{geminstdir}/LICENSE
108
- %{geminstdir}/DISCLAIMER
109
- %{geminstdir}/NOTICE
110
- %{geminstdir}/config.ru
111
- %{geminstdir}/*.rb
112
- %{geminstdir}/Rakefile
113
- %{geminstdir}/views
114
- %{geminstdir}/lib
115
- %{geminstdir}/public/images
116
- %{geminstdir}/public/stylesheets
117
- %{geminstdir}/public/favicon.ico
118
- %{gemdir}/cache/deltacloud-core-%{version}.gem
119
- %{gemdir}/specifications/deltacloud-core-%{version}.gemspec
120
- %{geminstdir}/config/drivers.yaml
249
+ %config(noreplace) %{_sysconfdir}/sysconfig/%{name}
250
+ %dir %{app_root}/
251
+ %{app_root}/bin
252
+ %{app_root}/config.ru
253
+ %{app_root}/*.rb
254
+ %{app_root}/views
255
+ %{app_root}/lib
256
+ %dir %{app_root}/config/drivers
257
+ %{app_root}/config/drivers/mock.yaml
258
+ %dir %{app_root}/public
259
+ %{app_root}/public/images
260
+ %{app_root}/public/stylesheets
261
+ %{app_root}/public/favicon.ico
262
+ %doc %{app_root}/DISCLAIMER
263
+ %doc %{app_root}/NOTICE
264
+ %doc %{app_root}/LICENSE
121
265
  # MIT
122
- %{gemdir}/gems/deltacloud-core-%{version}/public/javascripts
266
+ %{app_root}/public/javascripts
123
267
 
124
268
  %files doc
125
269
  %defattr(-, root, root, -)
126
- %{gemdir}/doc/deltacloud-core-%{version}
127
- %{geminstdir}/tests
128
- %{geminstdir}/support
129
- %{geminstdir}/deltacloud-core.gemspec
270
+ %{_defaultdocdir}/%{name}
271
+ %{app_root}/tests
272
+ %{app_root}/%{name}.gemspec
273
+ %{app_root}/Rakefile
274
+
275
+ #%files azure
276
+ #%defattr(-, root, root, -)
277
+
278
+ %files ec2
279
+ %defattr(-, root, root, -)
280
+ %{app_root}/config/drivers/ec2.yaml
281
+
282
+ %files eucalyptus
283
+ %defattr(-, root, root, -)
284
+ %{app_root}/config/drivers/eucalyptus.yaml
285
+
286
+ %files gogrid
287
+ %defattr(-, root, root, -)
288
+ %{app_root}/config/drivers/gogrid.yaml
289
+
290
+ %files opennebula
291
+ %defattr(-, root, root, -)
292
+ %{app_root}/config/drivers/opennebula.yaml
293
+
294
+ %files rackspace
295
+ %defattr(-, root, root, -)
296
+ %{app_root}/config/drivers/rackspace.yaml
297
+
298
+ %files rhevm
299
+ %defattr(-, root, root, -)
300
+ %{app_root}/config/drivers/rhevm.yaml
301
+
302
+ %files rimuhosting
303
+ %defattr(-, root, root, -)
304
+ %{app_root}/config/drivers/rimuhosting.yaml
305
+
306
+ %files sbc
307
+ %defattr(-, root, root, -)
308
+ %{app_root}/config/drivers/sbc.yaml
309
+
310
+ %files vsphere
311
+ %defattr(-, root, root, -)
312
+ %{app_root}/config/drivers/vsphere.yaml
313
+
314
+ %files terremark
315
+ %defattr(-, root, root, -)
316
+ %{app_root}/config/drivers/terremark.yaml
317
+
318
+ %files condor
319
+ %defattr(-, root, root, -)
320
+ %{app_root}/config/drivers/condor.yaml
321
+ %{app_root}/config/condor.yaml
322
+ %{app_root}/config/addresses.xml
323
+ %%config(noreplace) %{_sysconfdir}/sysconfig/condor-cloud
324
+ %%config(noreplace) %{_sysconfdir}/condor/config.d/50condor_cloud.config
325
+ %%config(noreplace) %{_sysconfdir}/condor/config.d/50condor_cloud_node.config
326
+ %{_libexecdir}/condor/cached_images.sh
327
+ %{_libexecdir}/condor/cloud_exit_hook.sh
328
+ %{_libexecdir}/condor/cloud_functions
329
+ %{_libexecdir}/condor/cloud_prepare_hook.sh
330
+ %{_libexecdir}/condor/libvirt_cloud_script.sh
331
+
332
+ %files all
333
+ %defattr(-, root, root, -)
130
334
 
131
335
  %changelog
132
- * Fri Apr 8 2011 David Lutterkort <lutter@redhat.com> - 0.3.0-1
133
- - Renamed COPYING to LICENSE, include NOTICE and DISCLAIMER
134
-
135
- * Fri Feb 04 2011 Michal Fojtik <mfojtik@redhat.com> - 0.2.0-2
136
- - Package renamed to deltacloud-core, since it's not library and it's providing
137
- full REST API server with init script.
138
- - Fixed dependency issues
139
- - Removed bundled gems and RPMs
140
- - Fixed path in pushd inside tests section
336
+ * Mon Jul 26 2011 Michal Fojtik <mfojtik@redhat.com> - 0.4.0-0.1.git
337
+ - Deltacloud core GIT build
338
+
339
+ * Mon Jul 11 2011 Michal Fojtik <mfojtik@redhat.com> - 0.4.0-1
340
+ - Version bump to 0.4.0
341
+ - Added CondorCloud driver
342
+
343
+ * Mon Jul 11 2011 Michal Fojtik <mfojtik@redhat.com> - 0.3.0-11
344
+ - Added virtual package with all drivers
345
+
346
+ * Fri Jun 7 2011 Michal Fojtik <mfojtik@redhat.com> - 0.3.0-10
347
+ - Added patch to handle long usernames
348
+
349
+ * Fri Jun 3 2011 Michal Fojtik <mfojtik@redhat.com> - 0.3.0-9
350
+ - Removed Azure and Terremark driver because of unsatisfied dependencies
351
+
352
+ * Tue May 31 2011 Chris Lalancette <clalance@redhat.com> - 0.3.0-8
353
+ - Create sub-packages to bring in dependencies
354
+
355
+ * Tue May 31 2011 Michal Fojtik <mfojtik@redhat.com> - 0.3.0-7
356
+ - Added default config file in /etc/sysconfig/deltacloud-core
357
+
358
+ * Tue May 31 2011 Michal Fojtik <mfojtik@redhat.com> - 0.3.0-6
359
+ - Updated init.d script to match Fedora Guidelines
360
+
361
+ * Fri May 20 2011 Michal Fojtik <mfojtik@redhat.com> - 0.3.0-5
362
+ - Obsoleted rubygem-deltacloud-core
363
+
364
+ * Wed May 11 2011 Michal Fojtik <mfojtik@redhat.com> - 0.3.0-4
365
+ - Fixed memory calculation for RHEV-M (client)
366
+
367
+ * Wed May 11 2011 Michal Fojtik <mfojtik@redhat.com> - 0.3.0-3
368
+ - Fixed loadbalancer bug
369
+
370
+ * Thu May 5 2011 Michal Fojtik <mfojtik@redhat.com> - 0.3.0-2
371
+ - Fixed documentation generation
372
+ - Replaced moving with copying
373
+ - Removed support folder from doc subpackage
374
+
375
+ * Fri Apr 29 2011 Michal Fojtik <mfojtik@redhat.com> - 0.3.0-1
376
+ - Version bump
377
+
378
+ * Tue Mar 15 2011 Michal Fojtik <mfojtik@redhat.com> - 0.2.0-4
379
+ - Added missing runtime dependencies
380
+
381
+ * Mon Jan 31 2011 Michal Fojtik <mfojtik@redhat.com> - 0.2.0-3
382
+ - Removed cache and specification
383
+ - Added Sinatra to build dependecies
384
+
385
+ * Mon Jan 31 2011 Michal Fojtik <mfojtik@redhat.com> - 0.2.0-2
386
+ - Moved application to app_root (https://fedoraproject.org/wiki/Packaging_talk:Ruby#Applications)
141
387
 
142
388
  * Mon Jan 31 2011 Michal Fojtik <mfojtik@redhat.com> - 0.2.0-1
143
389
  - Initial package