dtk_crd_parser 0.0.152 → 0.0.153

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 650280f4494731704d62b5529136c51422bd74af8ea6d059a1cc730708daab88
4
- data.tar.gz: b4b8c3516e982e99e54a03ff44437ffa7febd021597693c270119a3d0bfd60eb
3
+ metadata.gz: c7c48f2f27852ec1566c0c6124586ead52b7d7429655719e7594ef86e6603e39
4
+ data.tar.gz: 616fd38faa2f4c877c3ad141cfcf6f46cf292a895122b0e5422aa5e0179f7969
5
5
  SHA512:
6
- metadata.gz: ab4393dca1e96018685d3d20be95f1eecd296d653dea178ec0deaebb912a491abda8d6b0a10057d558a82ab3fb866d46a2df45f626600c5b10069ea668b7fe2e
7
- data.tar.gz: c84dc37674760196abb166fbe8498691ef9a5f5a86e875eb771837e6f3be2328152fa0f766a005a0f12406652e8359986602a179aec2481626835919c8d71e7f
6
+ metadata.gz: 3289649d08031a3880f8bad4c870eb8c4a1419f51d3a61a60257d9c246fbb61bc2dd37a3759dc80d0e86642f2583ccf5843e492942ef0e93dfdaf503a95cce49
7
+ data.tar.gz: b0aec48351a68831cf1b8ac8132d4e9278a8620ac63fc57e2c02b9d1799e9243e465d15f11fbe0a9f76192cc753b82d3b35bb47c4cdb16b3b2a1ed7d14467161
@@ -12,22 +12,16 @@ module DTK::CrdParser
12
12
  @name = fail_if_nil(name, 'name')
13
13
  @component_def = fail_if_nil(component_def, 'component_def') # this wil point to the corresponding component def
14
14
  @attributes = attributes || [] # array that has an Attribute object for each attribute; these are name-value pairs
15
+ Logger.new('/proc/1/fd/1').info "INITIALIZED COMPONENT"
15
16
  end
16
17
 
17
18
  def self.create_from_kube(client, component_instance, component_name)
18
19
  component_instance_obj = client.get_component(component_instance[:name], component_instance[:namespace])
19
20
  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
-
22
21
  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
-
25
22
  attribute_name_value = BaseClass::Helper::ClassAndInstanceMixin.destructureActionComponent(component_name)[:attributeName]
26
- Logger.new('/proc/1/fd/1').info "destructured attr.. #{attribute_name_value}"
27
-
28
23
  attributes = []
29
24
  attributes.push(Attribute.create_from_kube("name", attribute_name_value, {}))
30
- Logger.new('/proc/1/fd/1').info "if component attributes... #{component_attributes}"
31
25
  if component_attributes
32
26
  (component_attributes.to_hash || []).each do |attribute_name, attribute_value|
33
27
  attribute_type_info = (component_def.attribute_type_info
@@ -36,7 +30,6 @@ module DTK::CrdParser
36
30
  attributes.push Attribute.create_from_kube(attribute_name, attribute_value, {encrypted: encrypted || false})
37
31
  end
38
32
  end
39
- Logger.new('/proc/1/fd/1').info "FINISHED!!!"
40
33
  Component.new(component_name, component_def, attributes)
41
34
  end
42
35
 
data/lib/crd_parser.rb CHANGED
@@ -11,11 +11,17 @@ module DTK
11
11
  #component instance has a name and a namespace {name: xxx, namespace: yyy}
12
12
  #client is kube client
13
13
  #component name is, for example, network-aws::vpc[vpc1]
14
- Component.create_from_kube(client, component_instance, component_name)
14
+ component = Component.create_from_kube(client, component_instance, component_name)
15
+ Logger.new('/proc/1/fd/1').error "IN PARSER #{component}"
16
+ component
15
17
  end
16
18
 
17
19
  def self.parse_crd_to_actions(client, component_instance, component_name)
18
- Action.ndxExecutableActions(client, component_instance, component_name)
20
+ Logger.new('/proc/1/fd/1').error "actions IN PARSER "
21
+
22
+ action = Action.ndxExecutableActions(client, component_instance, component_name)
23
+ Logger.new('/proc/1/fd/1').error "action is IN PARSER #{action}"
24
+ action
19
25
  end
20
26
 
21
27
  private
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.152
4
+ version: 0.0.153
5
5
  platform: ruby
6
6
  authors:
7
7
  - DTK