clowder-common-ruby 0.2.4 → 0.2.6
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/bin/schema.json +38 -1
- data/lib/clowder-common-ruby/types.rb +10 -0
- data/lib/clowder-common-ruby/version.rb +1 -1
- data/test.json +11 -5
- metadata +3 -5
- data/bin/output +0 -134
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d168646c5d5d8cade020019e0a92c9abbf784aee38e000bb09e7385eb7bdcd33
|
|
4
|
+
data.tar.gz: d9bfd039f488a90bbea2d5174812f7d7c26129cf4f9618f03cf8e8c2b56499ca
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6084c009bf2b0dd7d04b65d186d96d1f0e3c26f1a3a332e39a2278696d0fdb110ae290ccdf9d7ac42c25a5dc69952e493960a1fa77a8966f1417982d2fbb8643
|
|
7
|
+
data.tar.gz: 1c834382855bcb9d0844715225b271b2f179f9d852790a6c96cfde2f2e4124a41c876cd2778eb95bc3a13460565480d50913339ed3a8d96a7334aaf10044a944
|
data/bin/schema.json
CHANGED
|
@@ -20,6 +20,10 @@
|
|
|
20
20
|
"description": "Deprecated: Use 'publicPort' instead.",
|
|
21
21
|
"type": "integer"
|
|
22
22
|
},
|
|
23
|
+
"tlsCAPath": {
|
|
24
|
+
"description": "Defines the port CA path",
|
|
25
|
+
"type": "string"
|
|
26
|
+
},
|
|
23
27
|
"metricsPort": {
|
|
24
28
|
"description": "Defines the metrics port that the app should be configured to listen on for metric traffic.",
|
|
25
29
|
"type": "integer"
|
|
@@ -62,8 +66,15 @@
|
|
|
62
66
|
"items": {
|
|
63
67
|
"$ref": "#/definitions/PrivateDependencyEndpoint"
|
|
64
68
|
}
|
|
69
|
+
},
|
|
70
|
+
"BOPURL": {
|
|
71
|
+
"description": "Defines the path to the BOPURL.",
|
|
72
|
+
"type": "string"
|
|
73
|
+
},
|
|
74
|
+
"hashCache": {
|
|
75
|
+
"description": "A set of config/secret hashes",
|
|
76
|
+
"type": "string"
|
|
65
77
|
}
|
|
66
|
-
|
|
67
78
|
},
|
|
68
79
|
"required": [
|
|
69
80
|
"metricsPort",
|
|
@@ -93,6 +104,14 @@
|
|
|
93
104
|
"type": "object",
|
|
94
105
|
"description": "Arbitrary metadata pertaining to the application application",
|
|
95
106
|
"properties": {
|
|
107
|
+
"name": {
|
|
108
|
+
"description": "Name of the ClowdApp",
|
|
109
|
+
"type": "string"
|
|
110
|
+
},
|
|
111
|
+
"envName": {
|
|
112
|
+
"description": "Name of the ClowdEnvironment this ClowdApp runs in",
|
|
113
|
+
"type": "string"
|
|
114
|
+
},
|
|
96
115
|
"deployments": {
|
|
97
116
|
"description": "Metadata pertaining to an application's deployments",
|
|
98
117
|
"type": "array",
|
|
@@ -186,6 +205,13 @@
|
|
|
186
205
|
},
|
|
187
206
|
"password": {
|
|
188
207
|
"type": "string"
|
|
208
|
+
},
|
|
209
|
+
"securityProtocol": {
|
|
210
|
+
"description": "Deprecated: Use the top level securityProtocol field instead",
|
|
211
|
+
"type": "string"
|
|
212
|
+
},
|
|
213
|
+
"saslMechanism": {
|
|
214
|
+
"type": "string"
|
|
189
215
|
}
|
|
190
216
|
},
|
|
191
217
|
"required": []
|
|
@@ -210,6 +236,9 @@
|
|
|
210
236
|
},
|
|
211
237
|
"sasl": {
|
|
212
238
|
"$ref": "#/definitions/KafkaSASLConfig"
|
|
239
|
+
},
|
|
240
|
+
"securityProtocol": {
|
|
241
|
+
"type": "string"
|
|
213
242
|
}
|
|
214
243
|
},
|
|
215
244
|
"required": [
|
|
@@ -435,6 +464,10 @@
|
|
|
435
464
|
"app": {
|
|
436
465
|
"description": "The app name of the ClowdApp hosting the service.",
|
|
437
466
|
"type": "string"
|
|
467
|
+
},
|
|
468
|
+
"tlsPort": {
|
|
469
|
+
"description": "The TLS port of the dependent service.",
|
|
470
|
+
"type": "integer"
|
|
438
471
|
}
|
|
439
472
|
},
|
|
440
473
|
"required": [
|
|
@@ -464,6 +497,10 @@
|
|
|
464
497
|
"app": {
|
|
465
498
|
"description": "The app name of the ClowdApp hosting the service.",
|
|
466
499
|
"type": "string"
|
|
500
|
+
},
|
|
501
|
+
"tlsPort": {
|
|
502
|
+
"description": "The TLS port of the dependent service.",
|
|
503
|
+
"type": "integer"
|
|
467
504
|
}
|
|
468
505
|
},
|
|
469
506
|
"required": [
|
|
@@ -44,6 +44,7 @@ module ClowderCommonRuby
|
|
|
44
44
|
keys << :privatePort
|
|
45
45
|
keys << :publicPort
|
|
46
46
|
keys << :webPort
|
|
47
|
+
keys << :tlsCAPath
|
|
47
48
|
keys << :metricsPort
|
|
48
49
|
keys << :metricsPath
|
|
49
50
|
keys << :logging
|
|
@@ -55,6 +56,8 @@ module ClowderCommonRuby
|
|
|
55
56
|
keys << :featureFlags
|
|
56
57
|
keys << :endpoints
|
|
57
58
|
keys << :privateEndpoints
|
|
59
|
+
keys << :BOPURL
|
|
60
|
+
keys << :hashCache
|
|
58
61
|
end
|
|
59
62
|
end
|
|
60
63
|
end
|
|
@@ -102,6 +105,8 @@ module ClowderCommonRuby
|
|
|
102
105
|
|
|
103
106
|
def valid_keys
|
|
104
107
|
[].tap do |keys|
|
|
108
|
+
keys << :name
|
|
109
|
+
keys << :envName
|
|
105
110
|
keys << :deployments
|
|
106
111
|
end
|
|
107
112
|
end
|
|
@@ -199,6 +204,8 @@ module ClowderCommonRuby
|
|
|
199
204
|
[].tap do |keys|
|
|
200
205
|
keys << :username
|
|
201
206
|
keys << :password
|
|
207
|
+
keys << :securityProtocol
|
|
208
|
+
keys << :saslMechanism
|
|
202
209
|
end
|
|
203
210
|
end
|
|
204
211
|
end
|
|
@@ -225,6 +232,7 @@ module ClowderCommonRuby
|
|
|
225
232
|
keys << :cacert
|
|
226
233
|
keys << :authtype
|
|
227
234
|
keys << :sasl
|
|
235
|
+
keys << :securityProtocol
|
|
228
236
|
end
|
|
229
237
|
end
|
|
230
238
|
end
|
|
@@ -397,6 +405,7 @@ module ClowderCommonRuby
|
|
|
397
405
|
keys << :hostname
|
|
398
406
|
keys << :port
|
|
399
407
|
keys << :app
|
|
408
|
+
keys << :tlsPort
|
|
400
409
|
end
|
|
401
410
|
end
|
|
402
411
|
end
|
|
@@ -420,6 +429,7 @@ module ClowderCommonRuby
|
|
|
420
429
|
keys << :hostname
|
|
421
430
|
keys << :port
|
|
422
431
|
keys << :app
|
|
432
|
+
keys << :tlsPort
|
|
423
433
|
end
|
|
424
434
|
end
|
|
425
435
|
end
|
data/test.json
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
"publicPort": 8000,
|
|
3
3
|
"metricsPort": 9000,
|
|
4
4
|
"metricsPath": "/metrics",
|
|
5
|
+
"tlsCAPath": "/tlsCAPath",
|
|
5
6
|
"logging": {
|
|
6
7
|
"type": "cloudwatch",
|
|
7
8
|
"cloudwatch": {
|
|
@@ -15,7 +16,8 @@
|
|
|
15
16
|
"brokers": [
|
|
16
17
|
{
|
|
17
18
|
"hostname": "broker-host",
|
|
18
|
-
"port": 27015
|
|
19
|
+
"port": 27015,
|
|
20
|
+
"cacert": "kafkaca"
|
|
19
21
|
}
|
|
20
22
|
],
|
|
21
23
|
"topics": [
|
|
@@ -62,13 +64,15 @@
|
|
|
62
64
|
"name": "endpoint1",
|
|
63
65
|
"app": "app1",
|
|
64
66
|
"hostname": "endpoint1.svc",
|
|
65
|
-
"port": 8000
|
|
67
|
+
"port": 8000,
|
|
68
|
+
"tlsPort": 8001
|
|
66
69
|
},
|
|
67
70
|
{
|
|
68
71
|
"name": "endpoint2",
|
|
69
72
|
"app": "app2",
|
|
70
73
|
"hostname": "endpoint2.svc",
|
|
71
|
-
"port": 8000
|
|
74
|
+
"port": 8000,
|
|
75
|
+
"tlsPort": 8001
|
|
72
76
|
}
|
|
73
77
|
],
|
|
74
78
|
"privateEndpoints": [
|
|
@@ -76,13 +80,15 @@
|
|
|
76
80
|
"name": "endpoint1",
|
|
77
81
|
"app": "app1",
|
|
78
82
|
"hostname": "endpoint1.svc",
|
|
79
|
-
"port": 10000
|
|
83
|
+
"port": 10000,
|
|
84
|
+
"tlsPort": 10001
|
|
80
85
|
},
|
|
81
86
|
{
|
|
82
87
|
"name": "endpoint2",
|
|
83
88
|
"app": "app2",
|
|
84
89
|
"hostname": "endpoint2.svc",
|
|
85
|
-
"port": 10000
|
|
90
|
+
"port": 10000,
|
|
91
|
+
"tlsPort": 10001
|
|
86
92
|
}
|
|
87
93
|
]
|
|
88
94
|
}
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: clowder-common-ruby
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.6
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Red Hat Developers
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2023-06-15 00:00:00.000000000 Z
|
|
12
12
|
dependencies: []
|
|
13
13
|
description: This is a ruby interface for preparing Clowder variables.
|
|
14
14
|
email:
|
|
@@ -20,7 +20,6 @@ files:
|
|
|
20
20
|
- README.md
|
|
21
21
|
- Rakefile
|
|
22
22
|
- bin/json_schema_ruby
|
|
23
|
-
- bin/output
|
|
24
23
|
- bin/ruby_class_converter.rb
|
|
25
24
|
- bin/schema.json
|
|
26
25
|
- lib/clowder-common-ruby.rb
|
|
@@ -49,8 +48,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
49
48
|
- !ruby/object:Gem::Version
|
|
50
49
|
version: '0'
|
|
51
50
|
requirements: []
|
|
52
|
-
|
|
53
|
-
rubygems_version: 2.7.6.2
|
|
51
|
+
rubygems_version: 3.3.7
|
|
54
52
|
signing_key:
|
|
55
53
|
specification_version: 4
|
|
56
54
|
summary: Supporting files and libraries for Clowder environmental variables.
|
data/bin/output
DELETED
|
@@ -1,134 +0,0 @@
|
|
|
1
|
-
# This file is automatically generated by bin/json_schema_ruby
|
|
2
|
-
require 'ostruct'
|
|
3
|
-
|
|
4
|
-
module ClowderCommonRuby
|
|
5
|
-
class AppConfig < OpenStruct
|
|
6
|
-
attr_accessor :logging
|
|
7
|
-
attr_accessor :kafka
|
|
8
|
-
attr_accessor :database
|
|
9
|
-
attr_accessor :objectStore
|
|
10
|
-
attr_accessor :inMemoryDb
|
|
11
|
-
attr_accessor :featureFlags
|
|
12
|
-
attr_accessor :endpoints
|
|
13
|
-
attr_accessor :privateEndpoints
|
|
14
|
-
|
|
15
|
-
def initialize(attributes)
|
|
16
|
-
super
|
|
17
|
-
raise 'The input argument (attributes) must be a hash' if (!attributes || !attributes.is_a?(Hash))
|
|
18
|
-
|
|
19
|
-
attributes = attributes.each_with_object({}) do |(k, v), h|
|
|
20
|
-
raise "The input [#{k}] is invalid" unless valid_keys.include?(k.to_sym)
|
|
21
|
-
h[k.to_sym] = v
|
|
22
|
-
end
|
|
23
|
-
|
|
24
|
-
@logging = LoggingConfig.new(attributes.fetch(:logging, {}))
|
|
25
|
-
@kafka = KafkaConfig.new(attributes.fetch(:kafka, {}))
|
|
26
|
-
@database = DatabaseConfig.new(attributes.fetch(:database, {}))
|
|
27
|
-
@objectStore = ObjectStoreConfig.new(attributes.fetch(:objectStore, {}))
|
|
28
|
-
@inMemoryDb = InMemoryDBConfig.new(attributes.fetch(:inMemoryDb, {}))
|
|
29
|
-
@featureFlags = FeatureFlagsConfig.new(attributes.fetch(:featureFlags, {}))
|
|
30
|
-
@endpoints = []
|
|
31
|
-
attributes.fetch(:endpoints, []).each do |attr|
|
|
32
|
-
@endpoints << DependencyEndpoint.new(attr)
|
|
33
|
-
end
|
|
34
|
-
@privateEndpoints = []
|
|
35
|
-
attributes.fetch(:privateEndpoints, []).each do |attr|
|
|
36
|
-
@privateEndpoints << PrivateDependencyEndpoint.new(attr)
|
|
37
|
-
end
|
|
38
|
-
end
|
|
39
|
-
|
|
40
|
-
def valid_keys
|
|
41
|
-
[].tap do |keys|
|
|
42
|
-
keys << :privatePort
|
|
43
|
-
keys << :publicPort
|
|
44
|
-
keys << :webPort
|
|
45
|
-
keys << :metricsPort
|
|
46
|
-
keys << :metricsPath
|
|
47
|
-
keys << :logging
|
|
48
|
-
keys << :kafka
|
|
49
|
-
keys << :database
|
|
50
|
-
keys << :objectStore
|
|
51
|
-
keys << :inMemoryDb
|
|
52
|
-
keys << :featureFlags
|
|
53
|
-
keys << :endpoints
|
|
54
|
-
keys << :privateEndpoints
|
|
55
|
-
end
|
|
56
|
-
end
|
|
57
|
-
end
|
|
58
|
-
|
|
59
|
-
class LoggingConfig < OpenStruct
|
|
60
|
-
attr_accessor :cloudwatch
|
|
61
|
-
|
|
62
|
-
def initialize(attributes)
|
|
63
|
-
super
|
|
64
|
-
raise 'The input argument (attributes) must be a hash' if (!attributes || !attributes.is_a?(Hash))
|
|
65
|
-
|
|
66
|
-
attributes = attributes.each_with_object({}) do |(k, v), h|
|
|
67
|
-
raise "The input [#{k}] is invalid" unless valid_keys.include?(k.to_sym)
|
|
68
|
-
h[k.to_sym] = v
|
|
69
|
-
end
|
|
70
|
-
|
|
71
|
-
@cloudwatch = CloudWatchConfig.new(attributes.fetch(:cloudwatch, {}))
|
|
72
|
-
end
|
|
73
|
-
|
|
74
|
-
def valid_keys
|
|
75
|
-
[].tap do |keys|
|
|
76
|
-
keys << :type
|
|
77
|
-
keys << :cloudwatch
|
|
78
|
-
end
|
|
79
|
-
end
|
|
80
|
-
end
|
|
81
|
-
|
|
82
|
-
class CloudWatchConfig < OpenStruct
|
|
83
|
-
|
|
84
|
-
def initialize(attributes)
|
|
85
|
-
super
|
|
86
|
-
raise 'The input argument (attributes) must be a hash' if (!attributes || !attributes.is_a?(Hash))
|
|
87
|
-
|
|
88
|
-
attributes = attributes.each_with_object({}) do |(k, v), h|
|
|
89
|
-
raise "The input [#{k}] is invalid" unless valid_keys.include?(k.to_sym)
|
|
90
|
-
h[k.to_sym] = v
|
|
91
|
-
end
|
|
92
|
-
|
|
93
|
-
end
|
|
94
|
-
|
|
95
|
-
def valid_keys
|
|
96
|
-
[].tap do |keys|
|
|
97
|
-
keys << :accessKeyId
|
|
98
|
-
keys << :secretAccessKey
|
|
99
|
-
keys << :region
|
|
100
|
-
keys << :logGroup
|
|
101
|
-
end
|
|
102
|
-
end
|
|
103
|
-
end
|
|
104
|
-
|
|
105
|
-
class KafkaConfig < OpenStruct
|
|
106
|
-
attr_accessor :brokers
|
|
107
|
-
attr_accessor :topics
|
|
108
|
-
|
|
109
|
-
def initialize(attributes)
|
|
110
|
-
super
|
|
111
|
-
raise 'The input argument (attributes) must be a hash' if (!attributes || !attributes.is_a?(Hash))
|
|
112
|
-
|
|
113
|
-
attributes = attributes.each_with_object({}) do |(k, v), h|
|
|
114
|
-
raise "The input [#{k}] is invalid" unless valid_keys.include?(k.to_sym)
|
|
115
|
-
h[k.to_sym] = v
|
|
116
|
-
end
|
|
117
|
-
|
|
118
|
-
@brokers = []
|
|
119
|
-
attributes.fetch(:brokers, []).each do |attr|
|
|
120
|
-
@brokers << BrokerConfig.new(attr)
|
|
121
|
-
end
|
|
122
|
-
@topics = []
|
|
123
|
-
attributes.fetch(:topics, []).each do |attr|
|
|
124
|
-
@topics << TopicConfig.new(attr)
|
|
125
|
-
end
|
|
126
|
-
end
|
|
127
|
-
|
|
128
|
-
def valid_keys
|
|
129
|
-
[].tap do |keys|
|
|
130
|
-
keys << :brokers
|
|
131
|
-
keys << :topics
|
|
132
|
-
end
|
|
133
|
-
end
|
|
134
|
-
end
|