Feature #1461

Module metadata should support platform specification

Added by Martha Greenberg over 3 years ago. Updated 9 months ago.

Status:Accepted Start date:07/30/2008
Priority:Normal Due date:
Assignee:- % Done:

0%

Category:modules
Target version:Telly
Affected Puppet version:0.24.8 Branch:
Keywords:class confine
Votes: 1

Description

It would be very useful (especially for the CommonModules project) to be able to confine a class to, say, a specific OS. Ideally, one should be able to confine objects as well.

(nigel) – Ticket retargeted at metadata instead of the DSL.


Related issues

duplicated by Puppet - Feature #2955: Classes should be able to statically declare platform sup... Duplicate 12/18/2009

History

Updated by Luke Kanies over 3 years ago

  • Subject changed from confine to Class 'confine' capability

Updated by James Turnbull over 3 years ago

  • Category set to language
  • Status changed from Unreviewed to Accepted
  • Target version set to 0.25.0
  • Keywords set to class confine

Updated by Luke Kanies about 3 years ago

  • Target version changed from 0.25.0 to 4

Again, not going to make it into 0.25.

Updated by James Turnbull over 2 years ago

  • Target version changed from 4 to 2.6.0
  • Affected Puppet version changed from 0.24.5 to 0.24.8

Updated by Luke Kanies over 2 years ago

This should probably actually be at the module granularity, rather than the class level.

Updated by Luke Kanies over 2 years ago

  • Priority changed from Normal to High

Updated by James Turnbull over 2 years ago

Why? Wouldn’t it make more sense to have one module with multiple classes and only select the relevant classes based on the confine? I think more granular is better than less.

Updated by Luke Kanies almost 2 years ago

What should the syntax for this look like? It’d have to be parse-time, but I can’t think of a clean syntax. Something like:

class foo confine(operatingsystem => somethingorother) {
...
}

Seems a bit messy – we don’t otherwise support hashes in the class prototype.

The internals of this would be very easy now that we’ve pulled the classes out of the AST stuff, but the specification seems a bit hard.

Updated by Jesse Wolfe almost 2 years ago

  • Target version changed from 2.6.0 to 2.7.x

Updated by Nigel Kersten 10 months ago

  • Status changed from Accepted to Needs More Information
  • Priority changed from High to Normal

We need much more info around how this would actually look given we have reasonable workarounds.

I’m not actually convinced this is a high priority, do you remember why it was raised initially Luke?

Updated by Nigel Kersten 10 months ago

  • Target version changed from 2.7.x to Telly

Updated by Luke Kanies 10 months ago

Hmm, I don’t actually remember. I think it was mostly around making it straightforward to ask a class where it worked, by e.g. the dashboard.

Updated by Nigel Kersten 10 months ago

That feels like we’d be better off using the module metadata rather than a strict confine?

Updated by Uwe Stuehler 9 months ago

Is #2955 a duplicate of this? I’ve marked it as such for now.

Updated by Nigel Kersten 9 months ago

  • Subject changed from Class 'confine' capability to Module metadata should support platform specification
  • Category changed from language to modules
  • Status changed from Needs More Information to Accepted

I think this really belongs as metadata.

Thanks for the ticket gardening work Uwe!

Also available in: Atom PDF