scooter 3.2.19 → 4.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- ZGQzZTkxYjgwMmE5MGU1MTAyOTg0MzEzZmIxMTY2Y2FlYTRlMjEyMQ==
4
+ Mzc0MmM3NmFhNTBhYTQ1MmQ3ODc0ODJlYjNkMjJlNWZiZDFjM2Q3Ng==
5
5
  data.tar.gz: !binary |-
6
- YmZhZTU3YWNkNjE3YTljZDE2MGE1MTIzZDczMWE0ZDA1ZWE3YzliMQ==
6
+ NDUwNzBkMDAyOWVjNWI5M2NkYWNiZWJjYWQzY2FjMzg0M2UwNzUyZg==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- NTIwMWM4YTkwYjEzN2ZlOTJmNzk1MmI2MTMxNzIyMGMxMzIwY2JmYTEwNDk1
10
- YjAzZmMyOTJjNDYyMzRhOTRlOWI2Mjk5ODc4NDVkNGQ2N2IxMzkyMjgyZDNm
11
- N2NiNjA3NjhlZmViYjg5ZjVjYzk0ZDAxMDk5NmQxYTg4OTJlNjc=
9
+ MzU3YmQyNGYzYmUwMDEyODExZjU5YTg3ZTA0M2U0ZWNmNjU3ZTA4YzM4ZTU4
10
+ YjY5ZDAzMmM1NDUzYTI0NjIzNjE2NjQyM2QyYzI5NmM5OGQ0MWZkMGY0Nzkx
11
+ OWExY2Q1ZmU5YWUxMDlkMWIzZjNlNGJmMjAzNjAzY2M5NjE3YmE=
12
12
  data.tar.gz: !binary |-
13
- MWNmNTQ4MDQ0YjYwZjUwNmJjNDhiM2QxNGZkODkwNTIyMjQ0NjdjMTM1ZTk2
14
- MTcwNjg3ZTMwN2E0NjkwMzI3YzEzNWIwYTY4YTZjNzI3MzFmMTZjODU2YzA4
15
- MzI0OGFmMWRiNGYxZjkxZWU2ZDVkMjZhZDRmNGQ2Y2FkNzk3M2Y=
13
+ YzRmMWViMWRkMzZmZTZiMDM3NDVjZDczYzg0ZDk0ZjZiYmQzMTVlMWJlNzMx
14
+ ZmEyMWE5MjNhODdiOGNjZTEwMmE1MmU4M2NiOWZjNTJiZWViNmUwYTJkZWMw
15
+ NzEwZTUwYWJlMzMxZTdhZjc3YjVmOTZhMmRlZDQ2YWRkOWJlNjQ=
data/HISTORY.md CHANGED
@@ -1,6 +1,14 @@
1
- # default - History
1
+ # worker - History
2
2
  ## Tags
3
- * [LATEST - 26 Oct, 2016 (9ecf11fe)](#LATEST)
3
+ * [LATEST - 27 Mar, 2017 (57402d24)](#LATEST)
4
+ * [4.0.6 - 9 Feb, 2017 (0f01ca39)](#4.0.6)
5
+ * [4.0.5 - 8 Feb, 2017 (3405835b)](#4.0.5)
6
+ * [4.0.4 - 8 Feb, 2017 (3f6b7263)](#4.0.4)
7
+ * [4.0.3 - 6 Feb, 2017 (6698535d)](#4.0.3)
8
+ * [4.0.2 - 19 Jan, 2017 (74790ad4)](#4.0.2)
9
+ * [4.0.1 - 22 Dec, 2016 (58aef2e2)](#4.0.1)
10
+ * [4.0.0 - 30 Nov, 2016 (e47d6d40)](#4.0.0)
11
+ * [3.2.19 - 26 Oct, 2016 (0edc4754)](#3.2.19)
4
12
  * [3.2.18 - 17 Oct, 2016 (7f704a74)](#3.2.18)
5
13
  * [3.2.17 - 29 Sep, 2016 (532a4f4a)](#3.2.17)
6
14
  * [3.2.16 - 26 Sep, 2016 (febe204c)](#3.2.16)
@@ -44,7 +52,219 @@
44
52
  * [0.0.0 - 22 Dec, 2014 (9307ec38)](#0.0.0)
45
53
 
46
54
  ## Details
47
- ### <a name = "LATEST">LATEST - 26 Oct, 2016 (9ecf11fe)
55
+ ### <a name = "LATEST">LATEST - 27 Mar, 2017 (57402d24)
56
+
57
+ * (GEM) update scooter version to 4.1.0 (57402d24)
58
+
59
+ * Merge pull request #102 from tvpartytonight/maint_fixup_readme (462fd57d)
60
+
61
+
62
+ ```
63
+ Merge pull request #102 from tvpartytonight/maint_fixup_readme
64
+
65
+ (maint) Fixup README for open source release
66
+ ```
67
+ * (maint) Fixup README for open source release (408367f6)
68
+
69
+ * Merge pull request #101 from tvpartytonight/maint_add_license (3fe662aa)
70
+
71
+
72
+ ```
73
+ Merge pull request #101 from tvpartytonight/maint_add_license
74
+
75
+ (maint) Add license file
76
+ ```
77
+ * (maint) Add license file (62a12f3d)
78
+
79
+ ### <a name = "4.0.6">4.0.6 - 9 Feb, 2017 (0f01ca39)
80
+
81
+ * (HISTORY) update scooter history for gem release 4.0.6 (0f01ca39)
82
+
83
+ * (GEM) update scooter version to 4.0.6 (8d80e1de)
84
+
85
+ * Merge pull request #100 from samwoods1/maint_ha_fix (9103716a)
86
+
87
+
88
+ ```
89
+ Merge pull request #100 from samwoods1/maint_ha_fix
90
+
91
+ (maint) Update HA validationvto take host instead of hostname
92
+ ```
93
+ * (maint) Update HA validationvto take host instead of hostname (e46e66db)
94
+
95
+ ### <a name = "4.0.5">4.0.5 - 8 Feb, 2017 (3405835b)
96
+
97
+ * (HISTORY) update scooter history for gem release 4.0.5 (3405835b)
98
+
99
+ * (GEM) update scooter version to 4.0.5 (a926ff06)
100
+
101
+ * Merge pull request #99 from samwoods1/maint_ha_fix (82f03c66)
102
+
103
+
104
+ ```
105
+ Merge pull request #99 from samwoods1/maint_ha_fix
106
+
107
+ (maint) Expect host instead of hostname: replica_db_synced_with_master_db
108
+ ```
109
+ * (maint) Expect host instead of hostname for replica_db_synced_with_master_db (c96a4641)
110
+
111
+ ### <a name = "4.0.4">4.0.4 - 8 Feb, 2017 (3f6b7263)
112
+
113
+ * (HISTORY) update scooter history for gem release 4.0.4 (3f6b7263)
114
+
115
+ * (GEM) update scooter version to 4.0.4 (61ac5ebb)
116
+
117
+ * Merge pull request #98 from samwoods1/maint_ha_fix (da1eee42)
118
+
119
+
120
+ ```
121
+ Merge pull request #98 from samwoods1/maint_ha_fix
122
+
123
+ (maint) Fix host_name var in replica_db_synced_with_master_db
124
+ ```
125
+ * (maint) Fix host_name var in replica_db_synced_with_master_db (01e35d95)
126
+
127
+
128
+ ```
129
+ (maint) Fix host_name var in replica_db_synced_with_master_db
130
+ Also add spec test for replica_db_synced_with_master_db
131
+ ```
132
+ ### <a name = "4.0.3">4.0.3 - 6 Feb, 2017 (6698535d)
133
+
134
+ * (HISTORY) update scooter history for gem release 4.0.3 (6698535d)
135
+
136
+ * (GEM) update scooter version to 4.0.3 (2c10f65c)
137
+
138
+ * Merge pull request #97 from zreichert/feature/master/add_more_query_params_to_jobs_endpoint (7f80e23a)
139
+
140
+
141
+ ```
142
+ Merge pull request #97 from zreichert/feature/master/add_more_query_params_to_jobs_endpoint
143
+
144
+ add query params to get_last_jobs
145
+ ```
146
+ * (ORCH-1605) add query params to get_last_jobs (545be55a)
147
+
148
+ ### <a name = "4.0.2">4.0.2 - 19 Jan, 2017 (74790ad4)
149
+
150
+ * (HISTORY) update scooter history for gem release 4.0.2 (74790ad4)
151
+
152
+ * (GEM) update scooter version to 4.0.2 (b7a9554a)
153
+
154
+ * Merge pull request #96 from zreichert/maint/master/fix_jobs_limit_request (c363d075)
155
+
156
+
157
+ ```
158
+ Merge pull request #96 from zreichert/maint/master/fix_jobs_limit_request
159
+
160
+ (MAINT) switch job limit to query param
161
+ ```
162
+ * (MAINT) switch job limit to query param (840b75c5)
163
+
164
+ ### <a name = "4.0.1">4.0.1 - 22 Dec, 2016 (58aef2e2)
165
+
166
+ * (HISTORY) update scooter history for gem release 4.0.1 (58aef2e2)
167
+
168
+ * (GEM) update scooter version to 4.0.1 (c16ca347)
169
+
170
+ * Merge pull request #95 from lucywyman/maint-fix-jobs-endpoint (98a5021e)
171
+
172
+
173
+ ```
174
+ Merge pull request #95 from lucywyman/maint-fix-jobs-endpoint
175
+
176
+ (maint) Fix undefined variable in jobs endpoint
177
+ ```
178
+ * (maint) Fix undefined variable in jobs endpoint (7be068bc)
179
+
180
+ * Merge pull request #94 from nicklewis/properly-limit-job-queries (268288df)
181
+
182
+
183
+ ```
184
+ Merge pull request #94 from nicklewis/properly-limit-job-queries
185
+
186
+ (maint) Properly limit jobs queries
187
+ ```
188
+ * (maint) Properly limit jobs queries (00b1c8b4)
189
+
190
+
191
+ ```
192
+ (maint) Properly limit jobs queries
193
+
194
+ The limit parameter to /jobs is expected to be sent as a query parameter
195
+ rather than as part of the body of the request.
196
+ ```
197
+ * Merge pull request #93 from tvpartytonight/add_beaker-http (0e0ce731)
198
+
199
+
200
+ ```
201
+ Merge pull request #93 from tvpartytonight/add_beaker-http
202
+
203
+ (BKR-775) Replace httpdispatcher with beaker-http
204
+ ```
205
+ * (BKR-775) Ensure httpdispatchers call set_url_prefix (03ec44d8)
206
+
207
+
208
+ ```
209
+ (BKR-775) Ensure httpdispatchers call set_url_prefix
210
+
211
+ This commit makes sure that the httpdispatcher initialize method calls
212
+ set_url_prefix; without this behavior, subclasses couldn't rely on this
213
+ method being called in super like the consoledispatcher class currently
214
+ does.
215
+ ```
216
+ * (maint) Remove nokogiri dependency (96aba484)
217
+
218
+
219
+ ```
220
+ (maint) Remove nokogiri dependency
221
+
222
+ The change to the signin method in merge 93357eb means that we can
223
+ remove nokogiri, as that was the only section of scooter that utilized
224
+ it to parse html.
225
+ ```
226
+ * (BKR-775) Replace httpdispatcher with beaker-http (167e2c9f)
227
+
228
+
229
+ ```
230
+ (BKR-775) Replace httpdispatcher with beaker-http
231
+
232
+ This commit removes the base class HttpDispatcher implementation and
233
+ replaces it with HttpDispatcher inheriting from beaker-http. This moves
234
+ much of the useful functionality in that HttpDispatcher to a more
235
+ generalized library.
236
+ ```
237
+ ### <a name = "4.0.0">4.0.0 - 30 Nov, 2016 (e47d6d40)
238
+
239
+ * (HISTORY) update scooter history for gem release 4.0.0 (e47d6d40)
240
+
241
+ * (GEM) update scooter version to 4.0.0 (a82821a0)
242
+
243
+ * Merge pull request #92 from lucywyman/maint-refactor-auth (93357ebc)
244
+
245
+
246
+ ```
247
+ Merge pull request #92 from lucywyman/maint-refactor-auth
248
+
249
+ (maint) Fix how scooter authenticates with pe console
250
+ ```
251
+ * Fix up for merge (86b55d1c)
252
+
253
+ * Merge pull request #91 from lucywyman/ORCH-1556-add-environments-endpoint (c1ef8994)
254
+
255
+
256
+ ```
257
+ Merge pull request #91 from lucywyman/ORCH-1556-add-environments-endpoint
258
+
259
+ (ORCH-1556) Add /environments endpoint to scooter
260
+ ```
261
+ * (maint) Fix how scooter authenticates with pe console (0884bbb1)
262
+
263
+ * (ORCH-1556) add /environments endpoint (a92abcb5)
264
+
265
+ ### <a name = "3.2.19">3.2.19 - 26 Oct, 2016 (0edc4754)
266
+
267
+ * (HISTORY) update scooter history for gem release 3.2.19 (0edc4754)
48
268
 
49
269
  * (GEM) update scooter version to 3.2.19 (9ecf11fe)
50
270
 
data/LICENSE ADDED
@@ -0,0 +1,17 @@
1
+ Scooter - HTTP library for beaker
2
+
3
+ Copyright (C) 2005-2017 Puppet, Inc.
4
+
5
+ Puppet, Inc. can be contacted at: info@puppet.com
6
+
7
+ Licensed under the Apache License, Version 2.0 (the "License");
8
+ you may not use this file except in compliance with the License.
9
+ You may obtain a copy of the License at
10
+
11
+ https://www.apache.org/licenses/LICENSE-2.0
12
+
13
+ Unless required by applicable law or agreed to in writing, software
14
+ distributed under the License is distributed on an "AS IS" BASIS,
15
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ See the License for the specific language governing permissions and
17
+ limitations under the License.
data/README.md CHANGED
@@ -5,76 +5,38 @@
5
5
  1. [Overview](#overview)
6
6
  2. [Usage](#usage)
7
7
  3. [Versioning](#versioning)
8
- 4. [Releasing](#releasing)
9
- * [Pushing a new version to the internal rubygems mirror](#pushing-a-new-version-to-the-internal-rubygems-mirror)
10
- 5. [Rdocs](#rdocs)
11
- 6. [Contributing](#contributing)
8
+ 4. [Rdocs](#rdocs)
9
+ 5. [Contributing](#contributing)
12
10
 
13
11
  ## Overview
14
12
 
15
- Scooter is a ruby gem developed by QA to facilitate http traffic between the
16
- test runner and a Puppet Enterprise Installation–specifically the services
17
- available in the pe-console-services process: Classifier, RBAC, and Activity
18
- Service.
13
+ Scooter is a ruby gem developed by Puppet to facilitate http traffic between the
14
+ test runner and a Puppet Enterprise Installation. This includes the classifier, rbac,
15
+ activity service, code manager, orchestrator, and puppetdb.
19
16
 
20
17
  ## Usage
21
18
 
22
- Scooter only supports versions of Puppet Enterprise 3.7 and higher. Scooter is only available on the internal server, rubygems.delivery.puppetlabs.net.
23
-
24
- To install Scooter, simply use the gem command with the source flag set to the internal rubygems mirror–remember that you will have to be on Puppet's DNS to see the mirrored gem server.
19
+ To install Scooter, simply use the gem command:
25
20
 
26
21
  ```
27
- $ gem install scooter --source http://rubygems.delivery.puppetlabs.net
22
+ $ gem install scooter
28
23
  ```
29
24
 
30
25
  Scooter is currently divvied into the following sections:
31
26
 
32
- - [HttpDispatchers](docs/http_dispatchers.md) – These are modules that can be mixed into classes that represent real users: whitelisted certificate users, local console users, or users connected through an LDAP directory. Currently, there is only one dispatcher currently defined--ConsoleDispatcher–but there could be new dispatchers created to facilitate traffic to other products, such as Puppet Server and PuppetDB.
27
+ - [HttpDispatchers](docs/http_dispatchers.md) – These are modules that can be mixed into classes that represent real users: whitelisted certificate users, local console users, or users connected through an LDAP directory. Check out [HttpDispatchers](lib/scooter/httpdispatchers) for a list of the modules currently supported.
33
28
 
34
29
  - LDAPdispatcher – This class extends the Net::LDAP library, which is a requirement to for RBAC testing with LDAP fixtures.
35
30
  - Utilities – Currently, this houses random string generators and convenience methods to use beaker to acquire certificates to impersonate whitelisted certificate users.
36
31
 
37
32
  ## Versioning
38
33
 
39
- Scooter supports semantic versioning, with any 1.x release of scooter supporting all PE versions between 3.7.x and 4.0.
40
-
41
- If you are looking for scooter support for PE 4.0 aka shallow gravy, please use any scooter version that is 2.x. Routes to the services changed between PE 3.7 and PE 4.0, requiring a major version bump of scooter between those versions.
42
-
43
- ## Releasing
44
-
45
- The plan is to release Scooter at a regular cadence, probably once a week. Early on, we will release more often, as the port from qatests is not totally complete. Early feedback may significantly change the structure, so be cautious about building any significant dependencies yet. Once the dust has settled, a 1.0 release will be cut and support normal semantic versioning.
46
-
47
- Discussion is still ongoing about whether this library will be publicly available on rubygems or not. Please feel free to email the the QA team for any further information regarding a public release.
48
-
49
- - One issue blocking a public release of Scooter is to avoid possibly leaking information about unreleased features/products that Scooter might have information on. This could be mitigated by careful version control of Scooter, releasing it to the public only periodically, but releasing internally at a more frequent basis for internal testing.
50
-
51
- - Should the gem accept PR's from the public? That seems to require significant overhead in terms of testing and stability of PR's. Perhaps make the gem public without accepting PR's from the public? Make the gem available on rubygems.org while the repo stays private?
52
-
53
- ### Pushing a new version to the internal rubygems mirror
54
-
55
- 1. Log into jenkins-qe
56
-
57
- 2. Trigger the Scooter Release Pipeline
58
-
59
- a. The pipeline is responsible for checking in the version bump, generating a new HISTORY.md file, creating and pushing the gem
60
-
61
- b. Select an appropriate version number *** WARNING - whatever version number you select will be auto-created and pushed liver, BE CAREFUL ***
34
+ Scooter's development began with Puppet Enterprise 3.7, but that was only available for internal testing at that time; Scooter is open-sourced and available on [rubygems.org](https://rubygems.org) at version 4.x to support the LTS version of Puppet Enterprise, 2016.4.0.
62
35
 
63
36
  ## Rdocs
64
37
 
65
- Much of the documentation of Scooter is embedded in the ruby code itself, using rdoc standards for documentation. Currently, Puppet does not have an internal server delivering yard documentation; if you wish to view the rdocs, you must build it out yourself after you have downloaded the gem.
66
-
67
- ```
68
- prompt:~$ yard server --gems
69
-
70
- #>> YARD 0.8.7.4 documentation server at http://0.0.0.0:8808
71
- #Thin web server (v1.6.2 codename Doc Brown)
72
- #Maximum connections set to 1024
73
- #Listening on 0.0.0.0:8808, CTRL+C to stop
74
- #
75
- #goto: http://0.0.0.0:8808/docs/scooter/frames
76
- ```
38
+ Please view the [RubyDocs](http://rubydoc.info/github/puppetlabs/scooter) for further documentation.
77
39
 
78
40
  ## Contributing
79
41
 
80
- You are encouraged to fork and submit PR's to Scooter. Sam Woods or Tony Vu are your best bet for getting a PR merged in; that list will grow as QA adds more regular contributors to the repo.
42
+ Scooter is very closely related to [Beaker](https://github.com/puppetlabs/beaker); if you wish to contribute to this project, please follow the [outline](https://github.com/puppetlabs/beaker/blob/master/CONTRIBUTING.md) there for contributing to this repo.
data/lib/scooter.rb CHANGED
@@ -1,6 +1,7 @@
1
1
  require 'scooter/version'
2
2
  require 'beaker'
3
3
  require 'net/ldap'
4
+ require 'beaker-http'
4
5
  require 'faraday'
5
6
  require 'faraday_middleware'
6
7
  require 'faraday-cookie_jar'
@@ -10,4 +11,4 @@ module Scooter
10
11
  %w( utilities httpdispatchers ldap ).each do |lib|
11
12
  require "scooter/#{lib}"
12
13
  end
13
- end
14
+ end
@@ -14,17 +14,19 @@ module Scooter
14
14
  end
15
15
 
16
16
  # Used to compare replica activity to master. Raises exception if it does not match.
17
- # @param [BeakerHost] host_name
18
- def activity_database_matches_self?(host_name)
19
- original_host_name = self.host
17
+ # @param [String] host_name
18
+ def activity_database_matches_self?(replica_host)
19
+ # Save a beaker host_hash[:vmhostname], set it to the supplied host_name param,
20
+ # and then set it back to the original at the end of the ensure. The :vmhostname
21
+ #overrides the host.hostname, and nothing should win out over it.
22
+ original_host_name = host.host_hash[:vmhostname]
20
23
  begin
21
- self.host = host_name.to_s
22
- initialize_connection
24
+ host.host_hash[:vmhostname] = replica_host.hostname
25
+
23
26
  other_rbac_events = get_rbac_events.env.body
24
27
  other_classifier_events = get_classifier_events.env.body
25
28
  ensure
26
- self.host = original_host_name
27
- initialize_connection
29
+ host.host_hash[:vmhostname] = original_host_name
28
30
  end
29
31
 
30
32
  self_rbac_events = get_rbac_events.env.body
@@ -37,7 +39,7 @@ module Scooter
37
39
  errors << "Rbac events do not match\r\n" unless rbac_events_match
38
40
  errors << "Classifier events do not match\r\n" unless classifier_events_match
39
41
 
40
- @faraday_logger.warn(errors.chomp) unless errors.empty?
42
+ host.logger.warn(errors.chomp) unless errors.empty?
41
43
  errors.empty?
42
44
  end
43
45
 
@@ -300,19 +300,18 @@ module Scooter
300
300
  end
301
301
 
302
302
  # Used to compare replica classifier to master. Raises exception if it does not match.
303
- # @param [BeakerHost] host_name
304
- def classifier_database_matches_self?(host_name)
305
- original_host_name = self.host
303
+ # @param [String] host_name
304
+ def classifier_database_matches_self?(replica_host)
305
+ original_host_name = host.host_hash[:vmhostname]
306
306
  begin
307
- self.host = host_name.to_s
308
- initialize_connection
307
+ host.host_hash[:vmhostname] = replica_host.hostname
308
+
309
309
  other_nodes = get_list_of_nodes
310
310
  other_classes = get_list_of_classes
311
311
  other_environments = get_list_of_environments
312
312
  other_groups = get_list_of_node_groups
313
313
  ensure
314
- self.host = original_host_name
315
- initialize_connection
314
+ host.host_hash[:vmhostname] = original_host_name
316
315
  end
317
316
 
318
317
  self_nodes = get_list_of_nodes
@@ -331,7 +330,7 @@ module Scooter
331
330
  errors << "Environments do not match\r\n" unless environments_match
332
331
  errors << "Groups do not match\r\n" unless groups_match
333
332
 
334
- @faraday_logger.warn(errors.chomp) unless errors.empty?
333
+ host.logger.warn(errors.chomp) unless errors.empty?
335
334
  errors.empty?
336
335
  end
337
336