Details
-
New Feature
-
Status: Closed
-
Normal
-
Resolution: Fixed
-
None
-
None
-
None
-
1
-
Language 2016-04-20
-
Not Needed
-
This is a highly specialized feature that can be considered internal. You have to be super expert to benefit from this. It is also part of the larger Pcore feature.
Description
Currently the Runtime type can describe only one class at the time. As we plan to use this to provide mappings from general models to an implementation (e.g. to bind AST related classes like Locator, or the AST itself) to puppet names in such a way that implementations in different languages can read/write a data stream where instances are identified by the puppet name), it is onerous having to individually define those mappings (AST =~ 100 classes).
To support this, the Runtime type should provide regular expression substitution support by stating a Regular expression and a substitution. Currently it only accepts a single classname.
$in_my_package_t = Runtime[ruby, [/MyPackage::(.*)/, 'MyModule::\1']] |
can then be used to answer if an implementation instance is an instance of that runtime type.
ACCEPTANCE CRITERIA
There is very little that can be done with instances of Runtime in Puppet. Consider this an internal enablement that needs to be covered by unit tests.
Attachments
Issue Links
- blocks
-
PUP-1829 Define PCore - the Puppet Meta Meta Model
-
- Closed
-
-
PUP-5929 Allow type alias to define a mapping between puppet names and runtime types
-
- Closed
-
-
PUP-5907 Define the PCore Serialization API and Features
-
- Resolved
-
- supports
-
PUP-5906 Native Puppet Parser - make puppet use native parse and validate
-
- Closed
-
- links to