clowder-common-ruby 0.5.5 → 0.5.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 +22 -0
- data/lib/clowder-common-ruby/types.rb +24 -0
- data/lib/clowder-common-ruby/version.rb +1 -1
- data/test.json +7 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2a0183d53d4a43907739edb12a4563ada87e5b1264280c1eb6bfd9ac3d1f6d63
|
4
|
+
data.tar.gz: 611254dedf957e0742eb6ae96015db798358c588fabe2b83de047aaeac79a2eb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 14b05ed1a3bc92792a2caa004d1d0be3935134778ce15e6865f8e7d099d9df16f7834dac9ced6def83d04576fccb78bc0aa53d434750608ea44d119bebb0338f
|
7
|
+
data.tar.gz: 3c6ef3e9b0302902f89b126e83df570c28a878d55d094e4b87ce11e3037c157258400f0cb3b6f03407099c685aff362c7ba59f56f49b07228d022300423cb920
|
data/bin/schema.json
CHANGED
@@ -78,6 +78,9 @@
|
|
78
78
|
"hostname": {
|
79
79
|
"description": "The external hostname of the deployment, where applicable",
|
80
80
|
"type": "string"
|
81
|
+
},
|
82
|
+
"prometheusGateway": {
|
83
|
+
"$ref": "#/definitions/PrometheusGatewayConfig"
|
81
84
|
}
|
82
85
|
},
|
83
86
|
"required": [
|
@@ -544,6 +547,25 @@
|
|
544
547
|
"port",
|
545
548
|
"app"
|
546
549
|
]
|
550
|
+
},
|
551
|
+
"PrometheusGatewayConfig": {
|
552
|
+
"id": "prometheusGatewayConfig",
|
553
|
+
"type": "object",
|
554
|
+
"description": "Prometheus Gateway Configuration",
|
555
|
+
"properties": {
|
556
|
+
"hostname": {
|
557
|
+
"description": "Defines the hostname for the Prometheus Gateway server configuration.",
|
558
|
+
"type": "string"
|
559
|
+
},
|
560
|
+
"port": {
|
561
|
+
"description": "Defines the port for the Prometheus Gateway server configuration.",
|
562
|
+
"type": "integer"
|
563
|
+
}
|
564
|
+
},
|
565
|
+
"required": [
|
566
|
+
"hostname",
|
567
|
+
"port"
|
568
|
+
]
|
547
569
|
}
|
548
570
|
}
|
549
571
|
}
|
@@ -12,6 +12,7 @@ module ClowderCommonRuby
|
|
12
12
|
attr_accessor :featureFlags
|
13
13
|
attr_accessor :endpoints
|
14
14
|
attr_accessor :privateEndpoints
|
15
|
+
attr_accessor :prometheusGateway
|
15
16
|
|
16
17
|
def initialize(attributes)
|
17
18
|
super
|
@@ -37,6 +38,7 @@ module ClowderCommonRuby
|
|
37
38
|
attributes.fetch(:privateEndpoints, []).each do |attr|
|
38
39
|
@privateEndpoints << PrivateDependencyEndpoint.new(attr)
|
39
40
|
end
|
41
|
+
@prometheusGateway = PrometheusGatewayConfig.new(attributes.fetch(:prometheusGateway, {}))
|
40
42
|
end
|
41
43
|
|
42
44
|
def valid_keys
|
@@ -59,6 +61,7 @@ module ClowderCommonRuby
|
|
59
61
|
keys << :BOPURL
|
60
62
|
keys << :hashCache
|
61
63
|
keys << :hostname
|
64
|
+
keys << :prometheusGateway
|
62
65
|
end
|
63
66
|
end
|
64
67
|
end
|
@@ -444,4 +447,25 @@ module ClowderCommonRuby
|
|
444
447
|
end
|
445
448
|
end
|
446
449
|
end
|
450
|
+
|
451
|
+
class PrometheusGatewayConfig < OpenStruct
|
452
|
+
|
453
|
+
def initialize(attributes)
|
454
|
+
super
|
455
|
+
raise 'The input argument (attributes) must be a hash' if (!attributes || !attributes.is_a?(Hash))
|
456
|
+
|
457
|
+
attributes = attributes.each_with_object({}) do |(k, v), h|
|
458
|
+
warn "The input [#{k}] is invalid" unless valid_keys.include?(k.to_sym)
|
459
|
+
h[k.to_sym] = v
|
460
|
+
end
|
461
|
+
|
462
|
+
end
|
463
|
+
|
464
|
+
def valid_keys
|
465
|
+
[].tap do |keys|
|
466
|
+
keys << :hostname
|
467
|
+
keys << :port
|
468
|
+
end
|
469
|
+
end
|
470
|
+
end
|
447
471
|
end
|
data/test.json
CHANGED
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.5.
|
4
|
+
version: 0.5.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: 2025-
|
11
|
+
date: 2025-07-29 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: This is a ruby interface for preparing Clowder variables.
|
14
14
|
email:
|