dtk_crd_parser 0.0.109 → 0.0.110
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/crd_parser/component.rb +3 -7
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 502b1b079e5ba1ddd74e7c64f4b74ce75ff08da40853391baa390945184bf4f7
|
4
|
+
data.tar.gz: d627eb5ed42c883f8af374420c147db0a217d483d13619f07f6dccd832196848
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 49bf363915679992d6170530b2dc78b2a9bb80de8060925c866eb42a252f3d82b5681620cfeb85957e1194651898181010d7e4ca74a83089d26b74dca081bf22
|
7
|
+
data.tar.gz: 00f336f275728ab932ee2d0c72c0fb7330fd829d8712561f869c4611dcaebf5d6fb7df07d40916e3194a48f3dce7d7542bab6899cb520df511b49b2e19dee1aa
|
data/lib/crd_parser/component.rb
CHANGED
@@ -18,10 +18,7 @@ module DTK::CrdParser
|
|
18
18
|
component_name.gsub!('_', '-')
|
19
19
|
component_instance_obj = client.get_component(component_instance[:name], component_instance[:namespace])
|
20
20
|
component_def = ComponentDef.create_from_kube(client, component_instance_obj, component_name)
|
21
|
-
Logger.new('/proc/1/fd/1').info "Checking component attributes ..."
|
22
21
|
component_attributes = getComponentAttributes(component_name, component_instance_obj[:spec][:components])
|
23
|
-
Logger.new('/proc/1/fd/1').info "Component attributes are: "
|
24
|
-
Logger.new('/proc/1/fd/1').info component_attributes
|
25
22
|
component_attributes
|
26
23
|
attributes = []
|
27
24
|
if component_attributes
|
@@ -39,11 +36,10 @@ module DTK::CrdParser
|
|
39
36
|
protected
|
40
37
|
|
41
38
|
def self.getComponentAttributes(fullComponentName, components)
|
42
|
-
Logger.new('/proc/1/fd/1').info "Get comp attr method"
|
43
39
|
component = (components || []).each do |component|
|
44
|
-
|
45
|
-
|
46
|
-
|
40
|
+
#component.gsub!('_', '-')
|
41
|
+
componentObj = component.gsub('_', '-')[fullComponentName]
|
42
|
+
Logger.new('/proc/1/fd/1').error "Componentobj: #{componentObj}"
|
47
43
|
if(componentObj && componentObj.is_a?(Kubeclient::Resource))
|
48
44
|
return componentObj[:attributes]
|
49
45
|
end
|