Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parse issue when attribute is a nested hash with an array value #223

Closed
erezzarum opened this issue Jan 31, 2017 · 1 comment
Closed

Parse issue when attribute is a nested hash with an array value #223

erezzarum opened this issue Jan 31, 2017 · 1 comment
Assignees
Labels
Milestone

Comments

@erezzarum
Copy link

OK

foo => {
  bar => { }
}
Results:
vars.foo["bar"] = {
}

OK

foo1 => [ 'bar1' ] 
Results:
vars.foo1 = [ "bar1 "]

Fail

foo2 => {
  bar2 => [ 'bar3', 'bar4', ],
}
Results:
vars.foo2bar2 = [ "bar3", "bar4" ]

Expected:
vars.foo2["bar2"] = [ "bar3", "bar4" ]

OK

foo3 => {
 bar => {
  bar1 => { },
}
Results:
vars.foo3["bar"] = {
  bar1 = {        
  }               
}                 

Fail

foo4 => { }
Results: 
Removed (does not exist)

Expected: 
vars.foo4 = {
}

Fail

foo5 => {
  bar1 => [ 'bar2', 'bar3', ],
  bar4 => { bar5 => 'bar6' },
}
Results:
vars.foo5bar1 = [ "bar2", "bar3", ]     
vars.foo5["bar4"] = {                   
  bar5 = "bar6"                         
}
                            
Expected:
vars.foo5["bar1"] = [ "bar2", "bar3" ]
vars.foo5["bar4"] = {
  bar5 = "bar6"
}  

Fail

foo6 => {
  bar1 => { bar2 => 'bar3' },
  bar4 => [ 'bar5', 'bar6', ],
}
Results:
vars.foo6["bar1"] = {                
  bar2 = "bar3"                      
}                                    
vars.foo6bar4 = [ "bar5", "bar6", ]  

Expected: 
vars.foo6["bar1"] = {
  bar2 = "bar3"
}
foo6["bar4"] = [ "bar5", "bar6" ]

OK

foo7 => {
        bar1 => { bar2 => 'bar3', bar4 => 'bar5', },
}
Results:
vars.foo7["bar1"] = {
  bar2 = "bar3"
  bar4 = "bar5"
}
@erezzarum erezzarum changed the title Parse issue when attribute is a nested with an array value Parse issue when attribute is a nested hash with an array value Jan 31, 2017
erezzarum pushed a commit to erezzarum/puppet-icinga2 that referenced this issue Jan 31, 2017
@lbetz
Copy link
Contributor

lbetz commented Feb 2, 2017

merged into master, added some unit tests.

@lbetz lbetz closed this as completed Feb 2, 2017
@bobapple bobapple added the bug label Feb 3, 2017
@bobapple bobapple added this to the v1.0.3 milestone Feb 3, 2017
@lbetz lbetz self-assigned this Feb 4, 2017
@bobapple bobapple modified the milestones: v1.1.0, v1.0.3 Mar 13, 2017
n00by pushed a commit to n00by/puppet-icinga2 that referenced this issue Apr 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants