Uploaded image for project: 'Puppet'
  1. Puppet
  2. PUP-5948

write puppet-generate to transform ruby resource type to pcore resource type

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: PUP 4.6.0
    • Component/s: Docs
    • Labels:
      None
    • Template:
    • Story Points:
      5
    • Sprint:
      Language 2016-07-13, Language 2016-07-27, Language 2016-08-10
    • Release Notes:
      Bug Fix
    • Release Notes Summary:
      Hide
      The feature in this ticket is part of a larger feature (environment isolation). However - the work on this changes {{create_resources}} slightly in that the created resources are not immediately evaluated - instead they follow the same rules as if the same resource had been created in the manifest at the point where the call to {{create_resources}} is made. This changes the order of evaluation between the created resources and those created in manifests. Earlier the resources added to the catalog using {{create_resoures}} "jumped the queue" and were added before any unevaluated resources. The resources created by {{create_resources}} are now lazily evaluated just like all other resources. Logic that depends on the order of evaluation between resources created in one call to {{create_resources}} and manifest created resources may need to be changed as a consequence when relying on manifest ordering to define the order of application or when using calls to {{defined}} immediately after a call to {{create_resources}}.
      Show
      The feature in this ticket is part of a larger feature (environment isolation). However - the work on this changes {{create_resources}} slightly in that the created resources are not immediately evaluated - instead they follow the same rules as if the same resource had been created in the manifest at the point where the call to {{create_resources}} is made. This changes the order of evaluation between the created resources and those created in manifests. Earlier the resources added to the catalog using {{create_resoures}} "jumped the queue" and were added before any unevaluated resources. The resources created by {{create_resources}} are now lazily evaluated just like all other resources. Logic that depends on the order of evaluation between resources created in one call to {{create_resources}} and manifest created resources may need to be changed as a consequence when relying on manifest ordering to define the order of application or when using calls to {{defined}} immediately after a call to {{create_resources}}.

      Description

      Implement a tool that loads a module's / puppet core's types and writes PCore representations of those types.

      The tools should generate the .pp logic that describes a resource type as best it can, and for constructs that cannot be automatically translated, issue warnings/help how to work around those issues.

      This tool is considered a one time translation. If changes are made to the underlying ruby type, the user should manually bring the pcore representation up to date, or regenerate it from Ruby source.

      • The tools should prevent accidental overwrite of existing code
      • Generated code should contain comments that instruct user how to overcome non translatable constructs.
      • The tools should encourage users to add typing of parameters where typing does not exist.
      • When encountering a non translatable construct the tool should encourage users to modify the implementation (or be prepared to maintain the Pcore representation manually).

        Attachments

          Issue Links

            Activity

              jsd-sla-details-panel

                People

                • Assignee:
                  qa qa
                  Reporter:
                  henrik.lindberg Henrik Lindberg
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  3 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: