deltacloud-client 0.0.7 → 0.0.8

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -1,19 +1,20 @@
1
1
  #
2
2
  # Copyright (C) 2009 Red Hat, Inc.
3
3
  #
4
- # This library is free software; you can redistribute it and/or
5
- # modify it under the terms of the GNU Lesser General Public
6
- # License as published by the Free Software Foundation; either
7
- # version 2.1 of the License, or (at your option) any later version.
4
+ # Licensed to the Apache Software Foundation (ASF) under one or more
5
+ # contributor license agreements. See the NOTICE file distributed with
6
+ # this work for additional information regarding copyright ownership. The
7
+ # ASF licenses this file to you under the Apache License, Version 2.0 (the
8
+ # "License"); you may not use this file except in compliance with the
9
+ # License. You may obtain a copy of the License at
8
10
  #
9
- # This library is distributed in the hope that it will be useful,
10
- # but WITHOUT ANY WARRANTY; without even the implied warranty of
11
- # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12
- # Lesser General Public License for more details.
11
+ # http://www.apache.org/licenses/LICENSE-2.0
13
12
  #
14
- # You should have received a copy of the GNU Lesser General Public
15
- # License along with this library; if not, write to the Free Software
16
- # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
13
+ # Unless required by applicable law or agreed to in writing, software
14
+ # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
15
+ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
16
+ # License for the specific language governing permissions and limitations
17
+ # under the License.
17
18
 
18
19
  require 'rake/gempackagetask'
19
20
 
data/bin/deltacloudc CHANGED
@@ -2,19 +2,20 @@
2
2
  #
3
3
  # Copyright (C) 2009 Red Hat, Inc.
4
4
  #
5
- # This library is free software; you can redistribute it and/or
6
- # modify it under the terms of the GNU Lesser General Public
7
- # License as published by the Free Software Foundation; either
8
- # version 2.1 of the License, or (at your option) any later version.
5
+ # Licensed to the Apache Software Foundation (ASF) under one or more
6
+ # contributor license agreements. See the NOTICE file distributed with
7
+ # this work for additional information regarding copyright ownership. The
8
+ # ASF licenses this file to you under the Apache License, Version 2.0 (the
9
+ # "License"); you may not use this file except in compliance with the
10
+ # License. You may obtain a copy of the License at
9
11
  #
10
- # This library is distributed in the hope that it will be useful,
11
- # but WITHOUT ANY WARRANTY; without even the implied warranty of
12
- # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13
- # Lesser General Public License for more details.
12
+ # http://www.apache.org/licenses/LICENSE-2.0
14
13
  #
15
- # You should have received a copy of the GNU Lesser General Public
16
- # License along with this library; if not, write to the Free Software
17
- # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
14
+ # Unless required by applicable law or agreed to in writing, software
15
+ # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
16
+ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
17
+ # License for the specific language governing permissions and limitations
18
+ # under the License.
18
19
 
19
20
  require 'rubygems'
20
21
  require 'optparse'
data/init.rb CHANGED
@@ -1,19 +1,20 @@
1
1
  #
2
2
  # Copyright (C) 2009 Red Hat, Inc.
3
3
  #
4
- # This library is free software; you can redistribute it and/or
5
- # modify it under the terms of the GNU Lesser General Public
6
- # License as published by the Free Software Foundation; either
7
- # version 2.1 of the License, or (at your option) any later version.
4
+ # Licensed to the Apache Software Foundation (ASF) under one or more
5
+ # contributor license agreements. See the NOTICE file distributed with
6
+ # this work for additional information regarding copyright ownership. The
7
+ # ASF licenses this file to you under the Apache License, Version 2.0 (the
8
+ # "License"); you may not use this file except in compliance with the
9
+ # License. You may obtain a copy of the License at
8
10
  #
9
- # This library is distributed in the hope that it will be useful,
10
- # but WITHOUT ANY WARRANTY; without even the implied warranty of
11
- # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12
- # Lesser General Public License for more details.
11
+ # http://www.apache.org/licenses/LICENSE-2.0
13
12
  #
14
- # You should have received a copy of the GNU Lesser General Public
15
- # License along with this library; if not, write to the Free Software
16
- # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
13
+ # Unless required by applicable law or agreed to in writing, software
14
+ # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
15
+ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
16
+ # License for the specific language governing permissions and limitations
17
+ # under the License.
17
18
 
18
19
 
19
20
  require 'deltacloud'
data/lib/deltacloud.rb CHANGED
@@ -1,19 +1,20 @@
1
1
  #
2
2
  # Copyright (C) 2009 Red Hat, Inc.
3
3
  #
4
- # This library is free software; you can redistribute it and/or
5
- # modify it under the terms of the GNU Lesser General Public
6
- # License as published by the Free Software Foundation; either
7
- # version 2.1 of the License, or (at your option) any later version.
4
+ # Licensed to the Apache Software Foundation (ASF) under one or more
5
+ # contributor license agreements. See the NOTICE file distributed with
6
+ # this work for additional information regarding copyright ownership. The
7
+ # ASF licenses this file to you under the Apache License, Version 2.0 (the
8
+ # "License"); you may not use this file except in compliance with the
9
+ # License. You may obtain a copy of the License at
8
10
  #
9
- # This library is distributed in the hope that it will be useful,
10
- # but WITHOUT ANY WARRANTY; without even the implied warranty of
11
- # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12
- # Lesser General Public License for more details.
11
+ # http://www.apache.org/licenses/LICENSE-2.0
13
12
  #
14
- # You should have received a copy of the GNU Lesser General Public
15
- # License along with this library; if not, write to the Free Software
16
- # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
13
+ # Unless required by applicable law or agreed to in writing, software
14
+ # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
15
+ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
16
+ # License for the specific language governing permissions and limitations
17
+ # under the License.
17
18
 
18
19
  require 'nokogiri'
19
20
  require 'rest_client'
@@ -190,12 +191,13 @@ module DeltaCloud
190
191
  end
191
192
  # Property attribute is handled differently
192
193
  when "property":
193
- define_method :"#{attribute['name'].sanitize}" do
194
- if attribute['value'] =~ /^(\d+)$/
195
- DeltaCloud::HWP::FloatProperty.new(attribute, attribute['name'])
196
- else
197
- DeltaCloud::HWP::Property.new(attribute, attribute['name'])
198
- end
194
+ attr_accessor :"#{attribute['name'].sanitize}"
195
+ if attribute['value'] =~ /^(\d+)$/
196
+ obj.send(:"#{attribute['name'].sanitize}=",
197
+ DeltaCloud::HWP::FloatProperty.new(attribute, attribute['name']))
198
+ else
199
+ obj.send(:"#{attribute['name'].sanitize}=",
200
+ DeltaCloud::HWP::Property.new(attribute, attribute['name']))
199
201
  end
200
202
  # Public and private addresses are returned as Array
201
203
  when "public_addresses", "private_addresses":
@@ -293,12 +295,20 @@ module DeltaCloud
293
295
  end
294
296
  logger << "[#{conf[:method].to_s.upcase}] #{conf[:path]}\n"
295
297
  if conf[:method].eql?(:post)
296
- RestClient.send(:post, conf[:path], conf[:form_data], default_headers) do |response|
297
- yield response.body if block_given?
298
+ RestClient.send(:post, conf[:path], conf[:form_data], default_headers) do |response, request, block|
299
+ if response.respond_to?('body')
300
+ yield response.body if block_given?
301
+ else
302
+ yield response.to_s if block_given?
303
+ end
298
304
  end
299
305
  else
300
- RestClient.send(conf[:method], conf[:path], default_headers) do |response|
301
- yield response.body if block_given?
306
+ RestClient.send(conf[:method], conf[:path], default_headers) do |response, request, block|
307
+ if response.respond_to?('body')
308
+ yield response.body if block_given?
309
+ else
310
+ yield response.to_s if block_given?
311
+ end
302
312
  end
303
313
  end
304
314
  end
data/lib/documentation.rb CHANGED
@@ -1,5 +1,4 @@
1
1
  require 'lib/deltacloud'
2
- require 'ap'
3
2
 
4
3
  skip_methods = [ "id=", "uri=" ]
5
4
 
@@ -13,30 +12,86 @@ end
13
12
  @dc.entry_points.keys.each do |ep|
14
13
  @dc.send(ep)
15
14
  end
16
-
17
15
  class_list = @dc.classes
18
16
 
17
+ def read_method_description(c, method)
18
+ if method =~ /es$/
19
+ " # Read #{c.downcase} collection from Deltacloud API"
20
+ else
21
+ case method
22
+ when "uri"
23
+ " # Return URI to API for this object"
24
+ when "action_urls"
25
+ " # Return available actions API URL"
26
+ when "client"
27
+ " # Return instance of API client"
28
+ else
29
+ " # Get #{method} attribute value from #{c.downcase}"
30
+ end
31
+ end
32
+ end
33
+
34
+ def read_parameters(c, method)
35
+ out = []
36
+ if method =~ /es$/
37
+ out << " # @param [String, #id] Filter by ID"
38
+ end
39
+ out.join("\n")
40
+ end
41
+
42
+ def read_return_value(c, method)
43
+ if method =~ /es$/
44
+ rt = "Array"
45
+ else
46
+ rt = "String"
47
+ end
48
+ " # @return [String] Value of #{method}"
49
+ end
50
+
19
51
  out = []
20
52
 
21
- out << "module DeltaCloud"
22
- out << "class API"
23
- @dc.entry_points.keys.each do |method|
24
- out << "# @return [#{method.to_s.singularize.classify}]"
25
- out << "def #{method}(opts={})"
26
- out << "end"
27
- out << "# @return #{method.to_s.singularize.classify}"
28
- out << "def #{method.to_s.singularize}(id)"
53
+ class_list.each do |c|
54
+ class_name = "#{c}".gsub(/^DeltaCloud::/, '')
55
+ out << "module DeltaCloud"
56
+ out << " class API"
57
+ @dc.entry_points.keys.each do |ep|
58
+ out << "# Return #{ep.to_s.classify} object with given id\n"
59
+ out << "# "
60
+ out << "# *#{@dc.documentation(ep.to_s).description}*"
61
+ out << "# @return [#{ep.to_s.classify}]"
62
+ out << "def #{ep.to_s.gsub(/s$/, '')}"
63
+ out << "end"
64
+ out << "# Return collection of #{ep.to_s.classify} objects"
65
+ out << "# "
66
+ out << "# *#{@dc.documentation(ep.to_s).description}*"
67
+ @dc.documentation(ep.to_s, 'index').params.each do |p|
68
+ out << p.to_comment
69
+ end
70
+ out << "# @return [Array] [#{ep.to_s.classify}]"
71
+ out << "def #{ep}(opts={})"
72
+ out << "end"
73
+ end
74
+ out << " end"
75
+ out << " class #{class_name}"
76
+ c.instance_methods(false).each do |method|
77
+ next if skip_methods.include?(method)
78
+ params = read_parameters(class_name, method)
79
+ retval = read_return_value(class_name, method)
80
+ out << read_method_description(class_name, method)
81
+ out << params if params
82
+ out << retval if retval
83
+ out << " def #{method}"
84
+ out << " # This method was generated dynamically from API"
85
+ out << " end\n"
86
+ end
87
+ out << " end"
29
88
  out << "end"
30
89
  end
31
- out << "end"
32
- out << "end"
33
-
34
- ap out
35
-
36
- #FileUtils.rm_r('doc') rescue nil
37
- #FileUtils.mkdir_p('doc')
38
- #File.open('doc/deltacloud.rb', 'w') do |f|
39
- # f.puts(out.join("\n"))
40
- #end
41
- #system("yardoc -m markdown --readme README --title 'Deltacloud Client Library' 'lib/*.rb' 'doc/deltacloud.rb' --verbose")
42
- #FileUtils.rm('doc/deltacloud.rb')
90
+
91
+ FileUtils.rm_r('doc') rescue nil
92
+ FileUtils.mkdir_p('doc')
93
+ File.open('doc/deltacloud.rb', 'w') do |f|
94
+ f.puts(out.join("\n"))
95
+ end
96
+ system("yardoc -m markdown --readme README --title 'Deltacloud Client Library' 'lib/*.rb' 'doc/deltacloud.rb' --verbose")
97
+ FileUtils.rm('doc/deltacloud.rb')
@@ -1,19 +1,20 @@
1
1
  #
2
2
  # Copyright (C) 2009 Red Hat, Inc.
3
3
  #
4
- # This library is free software; you can redistribute it and/or
5
- # modify it under the terms of the GNU Lesser General Public
6
- # License as published by the Free Software Foundation; either
7
- # version 2.1 of the License, or (at your option) any later version.
4
+ # Licensed to the Apache Software Foundation (ASF) under one or more
5
+ # contributor license agreements. See the NOTICE file distributed with
6
+ # this work for additional information regarding copyright ownership. The
7
+ # ASF licenses this file to you under the Apache License, Version 2.0 (the
8
+ # "License"); you may not use this file except in compliance with the
9
+ # License. You may obtain a copy of the License at
8
10
  #
9
- # This library is distributed in the hope that it will be useful,
10
- # but WITHOUT ANY WARRANTY; without even the implied warranty of
11
- # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12
- # Lesser General Public License for more details.
11
+ # http://www.apache.org/licenses/LICENSE-2.0
13
12
  #
14
- # You should have received a copy of the GNU Lesser General Public
15
- # License along with this library; if not, write to the Free Software
16
- # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
13
+ # Unless required by applicable law or agreed to in writing, software
14
+ # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
15
+ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
16
+ # License for the specific language governing permissions and limitations
17
+ # under the License.
17
18
 
18
19
 
19
20
  require 'specs/spec_helper'
@@ -36,9 +37,7 @@ describe "hardware_profiles" do
36
37
  hardware_profiles.each do |hwp|
37
38
  hwp.uri.should_not be_nil
38
39
  hwp.uri.should be_a(String)
39
- prop_check(hwp.architecture, String)
40
- prop_check(hwp.storage, Float)
41
- prop_check(hwp.memory, Float)
40
+ prop_check(hwp.architecture, String) if hwp.architecture
42
41
  end
43
42
  end
44
43
  end
@@ -60,6 +59,14 @@ describe "hardware_profiles" do
60
59
  end
61
60
  end
62
61
 
62
+ it "should allow fetching different hardware_profiles" do
63
+ client = DeltaCloud.new( API_NAME, API_PASSWORD, API_URL )
64
+ hwp1 = client.hardware_profile( 'm1-small' )
65
+ hwp2 = client.hardware_profile( 'm1-xlarge' )
66
+ hwp1.storage.value.should_not eql(hwp2.storage.value)
67
+ hwp1.memory.value.should_not eql(hwp2.memory.value)
68
+ end
69
+
63
70
  it "should allow fetching a hardware_profile by URI" do
64
71
  DeltaCloud.new( API_NAME, API_PASSWORD, API_URL ) do |client|
65
72
  hwp = client.fetch_hardware_profile( API_URL + '/hardware_profiles/m1-small' )
data/specs/images_spec.rb CHANGED
@@ -1,19 +1,20 @@
1
1
  #
2
2
  # Copyright (C) 2009 Red Hat, Inc.
3
3
  #
4
- # This library is free software; you can redistribute it and/or
5
- # modify it under the terms of the GNU Lesser General Public
6
- # License as published by the Free Software Foundation; either
7
- # version 2.1 of the License, or (at your option) any later version.
4
+ # Licensed to the Apache Software Foundation (ASF) under one or more
5
+ # contributor license agreements. See the NOTICE file distributed with
6
+ # this work for additional information regarding copyright ownership. The
7
+ # ASF licenses this file to you under the Apache License, Version 2.0 (the
8
+ # "License"); you may not use this file except in compliance with the
9
+ # License. You may obtain a copy of the License at
8
10
  #
9
- # This library is distributed in the hope that it will be useful,
10
- # but WITHOUT ANY WARRANTY; without even the implied warranty of
11
- # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12
- # Lesser General Public License for more details.
11
+ # http://www.apache.org/licenses/LICENSE-2.0
13
12
  #
14
- # You should have received a copy of the GNU Lesser General Public
15
- # License along with this library; if not, write to the Free Software
16
- # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
13
+ # Unless required by applicable law or agreed to in writing, software
14
+ # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
15
+ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
16
+ # License for the specific language governing permissions and limitations
17
+ # under the License.
17
18
 
18
19
 
19
20
  require 'specs/spec_helper'
@@ -1,19 +1,20 @@
1
1
  #
2
2
  # Copyright (C) 2009 Red Hat, Inc.
3
3
  #
4
- # This library is free software; you can redistribute it and/or
5
- # modify it under the terms of the GNU Lesser General Public
6
- # License as published by the Free Software Foundation; either
7
- # version 2.1 of the License, or (at your option) any later version.
4
+ # Licensed to the Apache Software Foundation (ASF) under one or more
5
+ # contributor license agreements. See the NOTICE file distributed with
6
+ # this work for additional information regarding copyright ownership. The
7
+ # ASF licenses this file to you under the Apache License, Version 2.0 (the
8
+ # "License"); you may not use this file except in compliance with the
9
+ # License. You may obtain a copy of the License at
8
10
  #
9
- # This library is distributed in the hope that it will be useful,
10
- # but WITHOUT ANY WARRANTY; without even the implied warranty of
11
- # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12
- # Lesser General Public License for more details.
11
+ # http://www.apache.org/licenses/LICENSE-2.0
13
12
  #
14
- # You should have received a copy of the GNU Lesser General Public
15
- # License along with this library; if not, write to the Free Software
16
- # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
13
+ # Unless required by applicable law or agreed to in writing, software
14
+ # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
15
+ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
16
+ # License for the specific language governing permissions and limitations
17
+ # under the License.
17
18
 
18
19
  require 'specs/spec_helper'
19
20
 
@@ -1,19 +1,20 @@
1
1
  #
2
2
  # Copyright (C) 2009 Red Hat, Inc.
3
3
  #
4
- # This library is free software; you can redistribute it and/or
5
- # modify it under the terms of the GNU Lesser General Public
6
- # License as published by the Free Software Foundation; either
7
- # version 2.1 of the License, or (at your option) any later version.
4
+ # Licensed to the Apache Software Foundation (ASF) under one or more
5
+ # contributor license agreements. See the NOTICE file distributed with
6
+ # this work for additional information regarding copyright ownership. The
7
+ # ASF licenses this file to you under the Apache License, Version 2.0 (the
8
+ # "License"); you may not use this file except in compliance with the
9
+ # License. You may obtain a copy of the License at
8
10
  #
9
- # This library is distributed in the hope that it will be useful,
10
- # but WITHOUT ANY WARRANTY; without even the implied warranty of
11
- # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12
- # Lesser General Public License for more details.
11
+ # http://www.apache.org/licenses/LICENSE-2.0
13
12
  #
14
- # You should have received a copy of the GNU Lesser General Public
15
- # License along with this library; if not, write to the Free Software
16
- # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
13
+ # Unless required by applicable law or agreed to in writing, software
14
+ # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
15
+ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
16
+ # License for the specific language governing permissions and limitations
17
+ # under the License.
17
18
 
18
19
 
19
20
  require 'specs/spec_helper'
@@ -1,19 +1,20 @@
1
1
  #
2
2
  # Copyright (C) 2009 Red Hat, Inc.
3
3
  #
4
- # This library is free software; you can redistribute it and/or
5
- # modify it under the terms of the GNU Lesser General Public
6
- # License as published by the Free Software Foundation; either
7
- # version 2.1 of the License, or (at your option) any later version.
4
+ # Licensed to the Apache Software Foundation (ASF) under one or more
5
+ # contributor license agreements. See the NOTICE file distributed with
6
+ # this work for additional information regarding copyright ownership. The
7
+ # ASF licenses this file to you under the Apache License, Version 2.0 (the
8
+ # "License"); you may not use this file except in compliance with the
9
+ # License. You may obtain a copy of the License at
8
10
  #
9
- # This library is distributed in the hope that it will be useful,
10
- # but WITHOUT ANY WARRANTY; without even the implied warranty of
11
- # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12
- # Lesser General Public License for more details.
11
+ # http://www.apache.org/licenses/LICENSE-2.0
13
12
  #
14
- # You should have received a copy of the GNU Lesser General Public
15
- # License along with this library; if not, write to the Free Software
16
- # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
13
+ # Unless required by applicable law or agreed to in writing, software
14
+ # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
15
+ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
16
+ # License for the specific language governing permissions and limitations
17
+ # under the License.
17
18
 
18
19
 
19
20
  require 'specs/spec_helper'
@@ -172,10 +173,8 @@ describe "instances" do
172
173
  instance.uri.should eql( API_URL + '/instances/inst1' )
173
174
  instance.id.should eql( 'inst1' )
174
175
  instance.stop!
175
- instance = client.instance( 'inst1' )
176
176
  instance.state.should eql( "STOPPED" )
177
177
  instance.start!
178
- instance = client.instance( 'inst1' )
179
178
  instance.state.should eql( "RUNNING" )
180
179
  end
181
180
  end
data/specs/realms_spec.rb CHANGED
@@ -1,19 +1,20 @@
1
1
  #
2
2
  # Copyright (C) 2009 Red Hat, Inc.
3
3
  #
4
- # This library is free software; you can redistribute it and/or
5
- # modify it under the terms of the GNU Lesser General Public
6
- # License as published by the Free Software Foundation; either
7
- # version 2.1 of the License, or (at your option) any later version.
4
+ # Licensed to the Apache Software Foundation (ASF) under one or more
5
+ # contributor license agreements. See the NOTICE file distributed with
6
+ # this work for additional information regarding copyright ownership. The
7
+ # ASF licenses this file to you under the Apache License, Version 2.0 (the
8
+ # "License"); you may not use this file except in compliance with the
9
+ # License. You may obtain a copy of the License at
8
10
  #
9
- # This library is distributed in the hope that it will be useful,
10
- # but WITHOUT ANY WARRANTY; without even the implied warranty of
11
- # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12
- # Lesser General Public License for more details.
11
+ # http://www.apache.org/licenses/LICENSE-2.0
13
12
  #
14
- # You should have received a copy of the GNU Lesser General Public
15
- # License along with this library; if not, write to the Free Software
16
- # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
13
+ # Unless required by applicable law or agreed to in writing, software
14
+ # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
15
+ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
16
+ # License for the specific language governing permissions and limitations
17
+ # under the License.
17
18
 
18
19
  require 'specs/spec_helper'
19
20
 
@@ -1,19 +1,20 @@
1
1
  #
2
2
  # Copyright (C) 2009 Red Hat, Inc.
3
3
  #
4
- # This library is free software; you can redistribute it and/or
5
- # modify it under the terms of the GNU Lesser General Public
6
- # License as published by the Free Software Foundation; either
7
- # version 2.1 of the License, or (at your option) any later version.
4
+ # Licensed to the Apache Software Foundation (ASF) under one or more
5
+ # contributor license agreements. See the NOTICE file distributed with
6
+ # this work for additional information regarding copyright ownership. The
7
+ # ASF licenses this file to you under the Apache License, Version 2.0 (the
8
+ # "License"); you may not use this file except in compliance with the
9
+ # License. You may obtain a copy of the License at
8
10
  #
9
- # This library is distributed in the hope that it will be useful,
10
- # but WITHOUT ANY WARRANTY; without even the implied warranty of
11
- # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12
- # Lesser General Public License for more details.
11
+ # http://www.apache.org/licenses/LICENSE-2.0
13
12
  #
14
- # You should have received a copy of the GNU Lesser General Public
15
- # License along with this library; if not, write to the Free Software
16
- # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
13
+ # Unless required by applicable law or agreed to in writing, software
14
+ # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
15
+ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
16
+ # License for the specific language governing permissions and limitations
17
+ # under the License.
17
18
 
18
19
 
19
20
  shared_examples_for "all resources" do
data/specs/spec_helper.rb CHANGED
@@ -1,19 +1,20 @@
1
1
  #
2
2
  # Copyright (C) 2009 Red Hat, Inc.
3
3
  #
4
- # This library is free software; you can redistribute it and/or
5
- # modify it under the terms of the GNU Lesser General Public
6
- # License as published by the Free Software Foundation; either
7
- # version 2.1 of the License, or (at your option) any later version.
4
+ # Licensed to the Apache Software Foundation (ASF) under one or more
5
+ # contributor license agreements. See the NOTICE file distributed with
6
+ # this work for additional information regarding copyright ownership. The
7
+ # ASF licenses this file to you under the Apache License, Version 2.0 (the
8
+ # "License"); you may not use this file except in compliance with the
9
+ # License. You may obtain a copy of the License at
8
10
  #
9
- # This library is distributed in the hope that it will be useful,
10
- # but WITHOUT ANY WARRANTY; without even the implied warranty of
11
- # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12
- # Lesser General Public License for more details.
11
+ # http://www.apache.org/licenses/LICENSE-2.0
13
12
  #
14
- # You should have received a copy of the GNU Lesser General Public
15
- # License along with this library; if not, write to the Free Software
16
- # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
13
+ # Unless required by applicable law or agreed to in writing, software
14
+ # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
15
+ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
16
+ # License for the specific language governing permissions and limitations
17
+ # under the License.
17
18
 
18
19
  require 'rubygems'
19
20
  require 'yaml'