dtk_crd_parser 0.0.151 → 0.0.152
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 +8 -0
- data/lib/crd_parser/component_def.rb +0 -4
- 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: 650280f4494731704d62b5529136c51422bd74af8ea6d059a1cc730708daab88
|
4
|
+
data.tar.gz: b4b8c3516e982e99e54a03ff44437ffa7febd021597693c270119a3d0bfd60eb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ab4393dca1e96018685d3d20be95f1eecd296d653dea178ec0deaebb912a491abda8d6b0a10057d558a82ab3fb866d46a2df45f626600c5b10069ea668b7fe2e
|
7
|
+
data.tar.gz: c84dc37674760196abb166fbe8498691ef9a5f5a86e875eb771837e6f3be2328152fa0f766a005a0f12406652e8359986602a179aec2481626835919c8d71e7f
|
data/lib/crd_parser/component.rb
CHANGED
@@ -17,10 +17,17 @@ module DTK::CrdParser
|
|
17
17
|
def self.create_from_kube(client, component_instance, component_name)
|
18
18
|
component_instance_obj = client.get_component(component_instance[:name], component_instance[:namespace])
|
19
19
|
component_def = ComponentDef.create_from_kube(client, component_instance_obj, component_name)
|
20
|
+
Logger.new('/proc/1/fd/1').info "Component def (IN PARSER): #{component_def}"
|
21
|
+
|
20
22
|
component_attributes = getComponentAttributes(component_name, component_instance_obj[:spec][:components])
|
23
|
+
Logger.new('/proc/1/fd/1').info "Component attrs (IN PARSER): #{component_attributes}"
|
24
|
+
|
21
25
|
attribute_name_value = BaseClass::Helper::ClassAndInstanceMixin.destructureActionComponent(component_name)[:attributeName]
|
26
|
+
Logger.new('/proc/1/fd/1').info "destructured attr.. #{attribute_name_value}"
|
27
|
+
|
22
28
|
attributes = []
|
23
29
|
attributes.push(Attribute.create_from_kube("name", attribute_name_value, {}))
|
30
|
+
Logger.new('/proc/1/fd/1').info "if component attributes... #{component_attributes}"
|
24
31
|
if component_attributes
|
25
32
|
(component_attributes.to_hash || []).each do |attribute_name, attribute_value|
|
26
33
|
attribute_type_info = (component_def.attribute_type_info
|
@@ -29,6 +36,7 @@ module DTK::CrdParser
|
|
29
36
|
attributes.push Attribute.create_from_kube(attribute_name, attribute_value, {encrypted: encrypted || false})
|
30
37
|
end
|
31
38
|
end
|
39
|
+
Logger.new('/proc/1/fd/1').info "FINISHED!!!"
|
32
40
|
Component.new(component_name, component_def, attributes)
|
33
41
|
end
|
34
42
|
|
@@ -29,15 +29,11 @@ module DTK::CrdParser
|
|
29
29
|
|
30
30
|
componentDefSpec = componentDef[:spec] || {}
|
31
31
|
if destructured_component[:action] && componentDefSpec[:actions]
|
32
|
-
Logger.new('/proc/1/fd/1').info "actions:..."
|
33
|
-
Logger.new('/proc/1/fd/1').info "to hash: #{componentDefSpec[:actions].to_h}"
|
34
|
-
Logger.new('/proc/1/fd/1').info "to sym: #{componentDefSpec[:actions].to_h[:delete]}"
|
35
32
|
componentDefAction = componentDefSpec[:actions].to_h[destructured_component[:action].to_sym]
|
36
33
|
else
|
37
34
|
componentDefAction = componentDefSpec[:actions]
|
38
35
|
end
|
39
36
|
componentDefAttributes = []
|
40
|
-
Logger.new('/proc/1/fd/1').info "componentdefaction: #{componentDefAction}"
|
41
37
|
(componentDefSpec[:attributes] || []).each do |attribute|
|
42
38
|
componentDefAttributes.push AttributeTypeInfo.resolveAttr(attribute)
|
43
39
|
end
|