Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add additional types Stdlib::Port::Dynamic,Ephemeral,Registered,User} #1128

Merged
merged 1 commit into from
Sep 28, 2020

Conversation

b4ldr
Copy link
Collaborator

@b4ldr b4ldr commented Sep 23, 2020

The IANA port registry and rfc6335 specify the following port ranges

  • the System Ports, also known as the Well Known Ports, from 0-1023 (assigned by IANA)
  • the User Ports, also known as the Registered Ports, from 1024-49151 (assigned by IANA)
  • the Dynamic Ports, also known as the Private or Ephemeral Ports, from 49152-65535 (never assigned)

This PR adds the following types to capture this:

  • Stdlib::Port::User
  • Stdlib::Port::Registered (alias to Stdlib::Port::User)
  • Stdlib::Port::Dynamic
  • Stdlib::Port::Ephemeral (alias to Stdlib::Port::Dynamic)

We could drop the aliases and just pick on name to use or use both i dont have a strong prefrence; however my gut feeling is that most uses of the current Stdlib::Port::Unprivileged type would be better served by this newer Stdlib::Port::User type.

https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xhtml

The IANA port registery and rfc6335 specify the following port ranges

   o  the System Ports, also known as the Well Known Ports, from 0-1023
      (assigned by IANA)

   o  the User Ports, also known as the Registered Ports, from 1024-
      49151 (assigned by IANA)

   o  the Dynamic Ports, also known as the Private or Ephemeral Ports,
      from 49152-65535 (never assigned)

This PR adds the following types to capture this with the following typs
  Stdlib::Port::User
  Stdlib::Port::Registered (alias to Stdlib::Port::User)
  Stdlib::Port::Dynamic
  Stdlib::Port::Ephemeral (alias to Stdlib::Port::Dynamic)

  We can drop the aliases and just pick which ever name we prefer. My
  gut feeling is that most uses of the current Stdlib::Port::Unprivileged
  type would be better served by this newer Stdlib::Port::User type.

https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xhtml
@b4ldr b4ldr requested a review from a team as a code owner September 23, 2020 16:54
@codecov-commenter
Copy link

codecov-commenter commented Sep 23, 2020

Codecov Report

Merging #1128 into main will increase coverage by 0.67%.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff            @@
##            main   #1128      +/-   ##
========================================
+ Coverage   5.31%   5.98%   +0.67%     
========================================
  Files        185     185              
  Lines       5273    5212      -61     
========================================
+ Hits         280     312      +32     
+ Misses      4993    4900      -93     
Impacted Files Coverage Δ
lib/facter/facter_dot_d.rb 39.39% <0.00%> (+0.39%) ⬆️
lib/puppet/parser/functions/dig44.rb 53.33% <0.00%> (+53.33%) ⬆️
lib/puppet/parser/functions/has_interface_with.rb 92.30% <0.00%> (+92.30%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7c1ae25...e938abd. Read the comment docs.

@daianamezdrea
Copy link
Contributor

Hi @b4ldr, thank you for your contribution!

@daianamezdrea daianamezdrea merged commit 3df397f into puppetlabs:main Sep 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants