dtk_crd_parser 0.0.149 → 0.0.150
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/base_class/helper_mixins.rb +0 -3
- data/lib/crd_parser/component_def.rb +5 -1
- 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: c00944d697e27613d3e172b7ee87258f0eee8a818c21ca8724cccce97a1d836c
|
4
|
+
data.tar.gz: b7266ea3fa74e874a7d3f917c05b8d96fd00319a010c10631135578cec1117e2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f2efbf3c6bcf86cd98fbc30e09dbb96ee8b16d459e291954be145fb9fe7972a094f68f8ae460fc05448980d609eabea1b0c22071a632759b78eda07770729e07
|
7
|
+
data.tar.gz: a3a279f7ed4f9a3cd0ec20ff5eeae3fa3f0b28dd671e81192d92825b5b2c4ecc1fed77e4a96ce61aee5cfe540bf8ce7c0308118b46418acc2ba767924145b45f
|
@@ -8,15 +8,12 @@ module DTK::CrdParser
|
|
8
8
|
end
|
9
9
|
|
10
10
|
def self.destructureActionComponent(actionComponent)
|
11
|
-
Logger.new('/proc/1/fd/1').info "ACTION COMPONENT (IN PARSER): #{actionComponent}"
|
12
|
-
|
13
11
|
# regex to match component: module::name[attrName].action
|
14
12
|
regex = /(.*)::(.*)\[(.*)\].?(.*)/
|
15
13
|
# if component on node group node, get full name first
|
16
14
|
# i.e ec2::node[ng-1]/(node-utility::ssh-access[ubuntu])
|
17
15
|
nodeName, actionComponent = actionComponent.match(/(.*)\/(.*)/).captures if isOnSpecificNode(actionComponent)
|
18
16
|
compModule, compName, attributeName, action = actionComponent.match(regex).captures if actionComponent.match(regex)
|
19
|
-
Logger.new('/proc/1/fd/1').info "ACTION (IN PARSER): #{action}"
|
20
17
|
action = (action && !action.empty?) ? action.to_sym : nil
|
21
18
|
|
22
19
|
if(compModule.nil? || compName.nil? || attributeName.nil?)
|
@@ -29,8 +29,12 @@ 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: #{componentDefSpec[:actions]}"
|
33
|
+
Logger.new('/proc/1/fd/1').info "to sym: #{destructured_component[:action].to_sym}"
|
34
|
+
|
32
35
|
componentDefAction = componentDefSpec[:actions][destructured_component[:action].to_sym]
|
33
36
|
else
|
37
|
+
Logger.new('/proc/1/fd/1').info componentDefSpec[:actions]
|
34
38
|
componentDefAction = componentDefSpec[:actions]
|
35
39
|
end
|
36
40
|
componentDefAttributes = []
|
@@ -44,7 +48,7 @@ module DTK::CrdParser
|
|
44
48
|
namespace: namespace,
|
45
49
|
resourceVersion: resourceVersion
|
46
50
|
}
|
47
|
-
|
51
|
+
|
48
52
|
ComponentDef.new(metadata, componentDefAction, componentDefAttributes)
|
49
53
|
end
|
50
54
|
|