orchestrator_client 0.2.4 → 0.2.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +4 -3
- data/lib/orchestrator_client.rb +2 -0
- data/lib/orchestrator_client/config.rb +1 -0
- data/lib/orchestrator_client/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6276e6384a781c4640e4aaeb9032d5c1bba196dc
|
4
|
+
data.tar.gz: 4cfc8f138e1507977bba8e8544b41d620aeb5b40
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5e1e10e259a9892638c6aa86ee4720ab8e6da5ddce2ed73bb825921168fb9e5d99fe6790525f9dc9210d3ae1608ee0673bc71830b3863f044b0049ec4c459c46
|
7
|
+
data.tar.gz: fdc8ee77b63aa420cc87c775c9d0f853d1ed68807c358d6f9cb0fb63f0fa2250da3bfe86f8480c83c5320769927dea0fc4cbf68d0c15aa6c7a013c37f8980243
|
data/README.md
CHANGED
@@ -22,9 +22,10 @@ expected to be at `~/.puppetlabs/token` which is the default location used by
|
|
22
22
|
### initialization Settings
|
23
23
|
|
24
24
|
* `service-url` **[required]** - Base URL for the location of the Orchestrator API service
|
25
|
-
* `
|
26
|
-
* `
|
25
|
+
* `cacert` **[required]** - Path to the CA certificate file needed to verify the SSL connection to the API.
|
26
|
+
* `token-file`- Path to a file with the RBAC token in it (defaults to `~/.puppetlabs/token`)
|
27
27
|
* `token` - Pass directly the RBAC token, if specified the token will be used instead of a token from file.
|
28
|
+
* `User-Agent`- Set `User-Agent` header for HTTP requests. Defaults to `OrchestratorRubyClient/[VERSION]`
|
28
29
|
|
29
30
|
### Example
|
30
31
|
|
@@ -36,7 +37,7 @@ require 'orchestrator_client'
|
|
36
37
|
|
37
38
|
client = OrchestratorClient.new({
|
38
39
|
'service-url' => 'https://orchestrator.example.lan:8143/orchestrator/v1',
|
39
|
-
'
|
40
|
+
'cacert' => '/path/to/cert'
|
40
41
|
})
|
41
42
|
|
42
43
|
## Access endpoints through the client object
|
data/lib/orchestrator_client.rb
CHANGED
@@ -35,6 +35,7 @@ class OrchestratorClient
|
|
35
35
|
https = create_http(uri)
|
36
36
|
req = Net::HTTP::Get.new(uri)
|
37
37
|
req['Content-Type'] = "application/json"
|
38
|
+
req['User-Agent'] = @config['User-Agent']
|
38
39
|
req.add_field('X-Authentication', @config.token)
|
39
40
|
res = https.request(req)
|
40
41
|
|
@@ -51,6 +52,7 @@ class OrchestratorClient
|
|
51
52
|
|
52
53
|
req = Net::HTTP::Post.new(uri)
|
53
54
|
req['Content-Type'] = "application/json"
|
55
|
+
req['User-Agent'] = @config['User-Agent']
|
54
56
|
req.add_field('X-Authentication', @config.token)
|
55
57
|
req.body = body.to_json
|
56
58
|
res = https.request(req)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: orchestrator_client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Puppet
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-05-23 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description:
|
14
14
|
email: info@puppetlabs.com
|