dtk_crd_parser 0.0.148 → 0.0.149

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: bab9c0e14abd0a81fd140d2b2e6604741de19f70
4
- data.tar.gz: f64626b39ee898e2121af3f39848192b3da5fec9
2
+ SHA256:
3
+ metadata.gz: 9d8b8d32f7d3310abb2f0c2d09d6b5868645824ea686dd589864b422869c320d
4
+ data.tar.gz: f34131fa3ce4eb622bfe1f22f69f75e84d9194107c06ee7a69002cf4b378f0a9
5
5
  SHA512:
6
- metadata.gz: 897e4f74ff3c2846a510f15cfcb5f97fda65a91c188678cecb0b99c3e4a59e8161f5e740026d352fa6b1f9dba65b147708b56f8b74016f87e64f141dd0bda579
7
- data.tar.gz: 554538b672b7b8c43fc1f5ade54d336805bb24f4cf3abad670c1ef4b2b5d4c8abfe306faca761c037caa1a580944f50ec4d7944e3258fe414a994f189d91a6a0
6
+ metadata.gz: eeebc3a417aa9f0b8412019edfcc53a2073cebcb66c672b5df1fa0cb01215c2f451133f5b662926fd6bf1103472ed93d9e7b8c38666e59739a5f592bd995e7cd
7
+ data.tar.gz: 7228ce4491b593825a3b40909db02b68bcf7aa055c593b247121504b1561b8725b3db9b8762b04b7e972a6849b415d173462f67a964a0a59f3ca801bb3d52972
@@ -8,14 +8,17 @@ 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
+
11
13
  # regex to match component: module::name[attrName].action
12
14
  regex = /(.*)::(.*)\[(.*)\].?(.*)/
13
15
  # if component on node group node, get full name first
14
16
  # i.e ec2::node[ng-1]/(node-utility::ssh-access[ubuntu])
15
17
  nodeName, actionComponent = actionComponent.match(/(.*)\/(.*)/).captures if isOnSpecificNode(actionComponent)
16
18
  compModule, compName, attributeName, action = actionComponent.match(regex).captures if actionComponent.match(regex)
19
+ Logger.new('/proc/1/fd/1').info "ACTION (IN PARSER): #{action}"
17
20
  action = (action && !action.empty?) ? action.to_sym : nil
18
-
21
+
19
22
  if(compModule.nil? || compName.nil? || attributeName.nil?)
20
23
  raise "Could not resolve component module, name or attribute name for component: #{actionComponent}"
21
24
  end
@@ -21,13 +21,11 @@ module DTK::CrdParser
21
21
  attribute_name_value = BaseClass::Helper::ClassAndInstanceMixin.destructureActionComponent(component_name)[:attributeName]
22
22
  attributes = []
23
23
  attributes.push(Attribute.create_from_kube("name", attribute_name_value, {}))
24
- Logger.new('/proc/1/fd/1').info "Component attrs (in parser): #{component_attributes}"
25
24
  if component_attributes
26
25
  (component_attributes.to_hash || []).each do |attribute_name, attribute_value|
27
26
  attribute_type_info = (component_def.attribute_type_info
28
27
  .select {|attribute| attribute.name == attribute_name.to_s} || []).first
29
28
  encrypted = attribute_type_info.encrypted if attribute_type_info
30
- Logger.new('/proc/1/fd/1').info "Attribute: #{attribute_name} - #{attribute_value}"
31
29
  attributes.push Attribute.create_from_kube(attribute_name, attribute_value, {encrypted: encrypted || false})
32
30
  end
33
31
  end
@@ -45,14 +43,6 @@ module DTK::CrdParser
45
43
  end
46
44
  end
47
45
  return nil
48
- # component = (components || []).each do |component|
49
- # name = (component.to_h).keys.first.to_s.gsub!('_', '-')
50
- # componentObj = component[(component.to_h).keys.first.to_s] if (fullComponentName == name)
51
- # if(componentObj && componentObj.is_a?(Kubeclient::Resource))
52
- # return componentObj[:attributes]
53
- # end
54
- # end
55
- # return nil
56
46
  end
57
47
  end
58
48
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dtk_crd_parser
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.148
4
+ version: 0.0.149
5
5
  platform: ruby
6
6
  authors:
7
7
  - DTK
@@ -46,8 +46,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
46
46
  - !ruby/object:Gem::Version
47
47
  version: '0'
48
48
  requirements: []
49
- rubyforge_project:
50
- rubygems_version: 2.4.5.4
49
+ rubygems_version: 3.0.3
51
50
  signing_key:
52
51
  specification_version: 4
53
52
  summary: Parse kubernetes DTK crd to ruby in memory object!