dtk_crd_parser 0.0.3 → 0.0.4

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
2
  SHA256:
3
- metadata.gz: 0b316954698aad33c94166b5b09753eab5cf18e7dcae410dcd44e01238438283
4
- data.tar.gz: 77bcb6650089a88cb5b807095727307a3d407d90a1b9cbc16a1cc5f84e0d7e26
3
+ metadata.gz: 505ba3ebe0d7ef11e0db8b7de82d4517781ba74bcac3a25f2da0cd2a77a343da
4
+ data.tar.gz: cab35dcd25589d822fe06c10927b1687366116255e04365cb2783521d6d42e35
5
5
  SHA512:
6
- metadata.gz: 35870fce2c10a834ca1607e44a5162f68009d4799bb185872daa867a24098fd50f8f9d564af1995685bb33210f0349964c399e0dd6e4c1eb673800ba1f30d0a6
7
- data.tar.gz: 8cfa8662fac82c19972a5b1748deb4513fb23ed76659dc6cc3050a228c7ba13e33e8fafd344a1ed6882f29833b76612920fc30a81703c161421e8f5e6aee2a9f
6
+ metadata.gz: fec66cb8ea4ebe45a4dd76cecd8c48e7154d2f165522423ecf43a175beb9ebe4e38913967c500bf28e14cf7e20acc6f68296206e3f97fccd40150167aed39e87
7
+ data.tar.gz: 17637b3fb82aa7d3402d4fb805202449ba52450ea3273a5e0ccc4ba73feb712e8970262fc5a4c0a2f2f2f6eb5592818229a8390e6b7a522d21ee3f3111d51ff3
@@ -27,7 +27,6 @@ module DTK::CrdParser
27
27
  end
28
28
 
29
29
  def self.destructureActionComponent(actionComponent)
30
- puts actionComponent
31
30
  # regex to match component: module::name[attrName].action
32
31
  regex = /(.*)::(.*)\[(.*)\].?(.*)/
33
32
  # if component on node group node, get full name first
@@ -10,13 +10,7 @@ module DTK::CrdParser
10
10
  end
11
11
 
12
12
  def self.create_from_kube(client, component_instance, component_name)
13
- puts component_instance
14
- unless client.discovered
15
- client.discover
16
- end
17
- puts client.methods - Object.methods
18
13
  component_instance_obj = client.get_component(component_instance[:name], component_instance[:namespace])
19
- puts component_instance_obj
20
14
  component_def = ComponentDef.create_from_kube(client, component_instance_obj, component_name)
21
15
  component_attributes = getComponentAttributes(component_name, component_instance_obj[:spec][:components])
22
16
  attributes = []
@@ -17,7 +17,7 @@ module DTK::CrdParser
17
17
  end
18
18
 
19
19
  def self.create_from_kube(client, component_instance, component_def_name)
20
- puts 'COMPONENT DEF'
20
+ puts 'Component def...'
21
21
  module_name = destructureActionComponent(component_def_name)[:moduleName]
22
22
  module_ref = resolveModuleReference(component_instance.module_refs, component_def_name, module_name)
23
23
  componentDef = client.get_componentdef(component_def_name, module_ref[:namespace])
@@ -59,13 +59,17 @@ module DTK::CrdParser
59
59
  end
60
60
 
61
61
  def self.destructureActionComponent(actionComponent)
62
- puts actionComponent
63
62
  # regex to match component: module::name[attrName].action
64
63
  regex = /(.*)::(.*)\[(.*)\].?(.*)/
65
64
  # if component on node group node, get full name first
66
65
  # i.e ec2::node[ng-1]/(node-utility::ssh-access[ubuntu])
66
+ puts 'Action component is: '
67
+ puts actionComponent
68
+ puts isOnSpecificNode(actionComponent)
67
69
  nodeName, actionComponent = actionComponent.match(/(.*)\/(.*)/).captures if isOnSpecificNode(actionComponent)
68
- compModule, compName, attributeName, action = actionComponent.match(regex).captures if actionComponent
70
+ puts 'captures: '
71
+ puts actionComponent.match(regex)
72
+ compModule, compName, attributeName, action = actionComponent.match(regex).captures if actionComponent.match(regex)
69
73
  action = !action.empty? ? action.to_sym : :create
70
74
 
71
75
  if(compModule.nil? || compName.nil? || attributeName.nil?)
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.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - DTK