Jira (PUP-6948) generate() should allow calls with variable number of arguments

2017-05-31 Thread Henrik Lindberg (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Henrik Lindberg updated an issue 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 Puppet /  PUP-6948 
 
 
 
  generate() should allow calls with variable number of arguments  
 
 
 
 
 
 
 
 
 

Change By:
 
 Henrik Lindberg 
 
 
 

Sprint:
 
 PDE Triage 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.14#64029-sha1:ae256fe) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups "Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-bugs@googlegroups.com.
Visit this group at https://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/d/optout.


Jira (PUP-6948) generate() should allow calls with variable number of arguments

2017-05-31 Thread Henrik Lindberg (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Henrik Lindberg updated an issue 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 Puppet /  PUP-6948 
 
 
 
  generate() should allow calls with variable number of arguments  
 
 
 
 
 
 
 
 
 

Change By:
 
 Henrik Lindberg 
 
 
 

Sprint:
 
 Forge - To Accept 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.14#64029-sha1:ae256fe) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups "Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-bugs@googlegroups.com.
Visit this group at https://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/d/optout.


Jira (PUP-6948) generate() should allow calls with variable number of arguments

2016-12-01 Thread Henrik Lindberg (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Henrik Lindberg commented on  PUP-6948 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
  Re: generate() should allow calls with variable number of arguments  
 
 
 
 
 
 
 
 
 
 
Great. That means I will close this as a "won't do". 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.14#64029-sha1:ae256fe) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups "Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-bugs@googlegroups.com.
Visit this group at https://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/d/optout.


Jira (PUP-6948) generate() should allow calls with variable number of arguments

2016-12-01 Thread JIRA
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Matthias Hörmann commented on  PUP-6948 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
  Re: generate() should allow calls with variable number of arguments  
 
 
 
 
 
 
 
 
 
 
The splat operator seems to be exactly what I need for my use case. Thanks for the explanation. I wasn't aware of it. 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.14#64029-sha1:ae256fe) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups "Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-bugs@googlegroups.com.
Visit this group at https://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/d/optout.


Jira (PUP-6948) generate() should allow calls with variable number of arguments

2016-12-01 Thread Henrik Lindberg (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Henrik Lindberg commented on  PUP-6948 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
  Re: generate() should allow calls with variable number of arguments  
 
 
 
 
 
 
 
 
 
 
The generate() function already takes a variable number of arguments. Don't understand what you are proposing. 
If you mean you want to expand a number of arguments in an array as if they are extra arguments you can do so in 3.x with future parser and in 4.x using the so called "splat" operator. 
Example using puppet function as illustration 
 
 
 
 
 
 
# capture a variable number of arguments into an array 
 
 
 
 
function example(*$args) { 
 
 
 
 
  notice $args 
 
 
 
 
} 
 
 
 
 
$arr = [4,5,6] 
 
 
 
 
example(1,2,3,*$arr)
 
 
 
 
 
 
 
 
 
 
 
 
 
puppet apply pup6948.pp 
 
 
 
 
Notice: Scope(Class[main]): [1, 2, 3, 4, 5, 6]
 
 
 
 
  

Jira (PUP-6948) generate() should allow calls with variable number of arguments

2016-12-01 Thread Henrik Lindberg (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Henrik Lindberg assigned an issue to Matthias Hörmann 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 Puppet /  PUP-6948 
 
 
 
  generate() should allow calls with variable number of arguments  
 
 
 
 
 
 
 
 
 

Change By:
 
 Henrik Lindberg 
 
 
 

Assignee:
 
 Matthias Hörmann 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.14#64029-sha1:ae256fe) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups "Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-bugs@googlegroups.com.
Visit this group at https://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/d/optout.


Jira (PUP-6948) generate() should allow calls with variable number of arguments

2016-11-30 Thread Josh Cooper (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Josh Cooper updated an issue 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 Puppet /  PUP-6948 
 
 
 
  generate() should allow calls with variable number of arguments  
 
 
 
 
 
 
 
 
 

Change By:
 
 Josh Cooper 
 
 
 

Team:
 
 Puppet Developer Support 
 
 
 

Sprint:
 
 PDS Triage 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.14#64029-sha1:ae256fe) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups "Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-bugs@googlegroups.com.
Visit this group at https://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/d/optout.


Jira (PUP-6948) generate() should allow calls with variable number of arguments

2016-11-30 Thread JIRA
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Matthias Hörmann created an issue 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 Puppet /  PUP-6948 
 
 
 
  generate() should allow calls with variable number of arguments  
 
 
 
 
 
 
 
 
 

Issue Type:
 
  New Feature 
 
 
 

Affects Versions:
 

 PUP 4.8.1 
 
 
 

Assignee:
 

 Unassigned 
 
 
 

Components:
 

 Language 
 
 
 

Created:
 

 2016/11/30 12:53 AM 
 
 
 

Priority:
 
  Normal 
 
 
 

Reporter:
 
 Matthias Hörmann 
 
 
 
 
 
 
 
 
 
 
It would often be useful to allow generate() calls with a variable number of arguments, e.g. when generate is used to generate file content containing multiple entries (e.g. one per user or one per server) with the identifiers for the exact content specified on the commandline. 
One option to achieve this would be to allow generate to take an array parameter value which would be treated as if length(array) individual parameters had been passed in its place. 
Another option would be to create a more general apply construct in the language (not sure if even a built-in function could achieve that since function names are probably not first class entities in the puppet language) that allows calling any function by name and an array of parameters.