puppetlabs / puppetlabs/puppet-strings

Support notdefaultfor provider DSL method

Open
#282 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature
Dominant language
Ruby
Stars
90
Forks
90
PR merge metrics
No merged PRs in 30d

Description

Use Case

Puppet added a notdefaultfor DSL method to constrain providers, similar to defaultfor. This allows providers to default to a given osfamily, except on earlier os versions. However, strings doesn't support notdefaultfor

Describe the Solution You Would Like

Strings should emit documentation when a provider uses notdefaultfor. For example, the systemd service provider defines:

  defaultfor :operatingsystem => :debian
  notdefaultfor :operatingsystem => :debian, :operatingsystemmajrelease => ["5", "6", "7"] 

I would expect to see documentation similar to defaultfor in the docs for each provider:

<div class="tags">
  <p class="tag_title">Default Provider For</p>
  <ul>

  
    
      <li><tt>osfamily &mdash; [:archlinux]</tt></li>
    
      <li><tt>osfamily &mdash; redhat, operatingsystemmajrelease &mdash; ["7", "8"]</tt></li>
    ```
See also https://tickets.puppetlabs.com/browse/PUP-8552

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing how the provider DSL's defaultfor method is extracted and rendered in provider documentation, using the systemd service provider example as a reference. Add equivalent handling for notdefaultfor and verify that generated documentation includes the expected provider constraints.

Written by the indexing model from the issue text.

Assessment

Tech stack
ruby
Domain
documentation
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.