-
-
Notifications
You must be signed in to change notification settings - Fork 197
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
[WIP] Switch to Puppet data types #244
Conversation
.fixtures.yml
Outdated
@@ -2,10 +2,10 @@ fixtures: | |||
repositories: | |||
stdlib: | |||
repo: git://github.com/puppetlabs/puppetlabs-stdlib | |||
ref: '4.6.0' | |||
ref: '4.20.0' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO we should unpin the modules here. In general we test against master to find breaking changes before they are released.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bastelfreak works for me, I'll adjust in #242
@@ -166,7 +166,7 @@ | |||
'key_cn' => 'yolo', | |||
'key_name' => 'burp', | |||
'key_ou' => 'NSA', | |||
'verb' => 'mute', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@luxflux do you know why verb is 'mute' here? It seems like mute
is a separate param, and the docs suggest that verb
should be an int as in the client?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, this seems to be wrong. Let's use an integer...
From https://openvpn.net/index.php/open-source/documentation/manuals/65-openvpn-20x-manpage.html:
--verb n
Set output verbosity to n (default=1). Each level shows all info from the previous levels. Level 3 is recommended if you want a good summary of what's happening without being swamped by output.
0 -- No output except fatal errors.
1 to 4 -- Normal usage range.
5 -- Output R and W characters to the console for each packet read and write, uppercase is used for TCP/UDP packets and lowercase is used for TUN/TAP packets.
6 to 11 -- Debug info range (see errlevel.h for additional information on debug levels).
I think we need we need to update this line as well.
@@ -166,7 +166,7 @@ | |||
'key_cn' => 'yolo', | |||
'key_name' => 'burp', | |||
'key_ou' => 'NSA', | |||
'verb' => 'mute', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, this seems to be wrong. Let's use an integer...
From https://openvpn.net/index.php/open-source/documentation/manuals/65-openvpn-20x-manpage.html:
--verb n
Set output verbosity to n (default=1). Each level shows all info from the previous levels. Level 3 is recommended if you want a good summary of what's happening without being swamped by output.
0 -- No output except fatal errors.
1 to 4 -- Normal usage range.
5 -- Output R and W characters to the console for each packet read and write, uppercase is used for TCP/UDP packets and lowercase is used for TUN/TAP packets.
6 to 11 -- Debug info range (see errlevel.h for additional information on debug levels).
I think we need we need to update this line as well.
@luxflux edited that other line as well. The bulk of the tests currently fail with the same error, if you get a sec, could you see what I need to adjust?
I think the ordering on / from the base class is not needed, though maybe that's part of the problem? |
@wyardley I'm not used to the Puppet data types. But what I can say is that a Does this help? |
@juniorsysadmin any thoughts on the test failures here? |
@wyardley Hmm, I was going to suggest re-arrangement of
in the rspec, and turning off parallel rspec to see if that is helpful in finding the problem? |
$key_name = '', | ||
$key_ou = '', | ||
$tls_auth = false, | ||
String $country, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
datatypes \o/
if $extca_server_key_file == undef { fail('extca_server_key_file has to be specified in extca mode') } | ||
if $extca_dh_file == undef and !$remote and $tls_server { fail('cant enable tls_server: missing extca_dh_file') } | ||
if $extca_tls_auth_key_file == undef and !$remote and $tls_auth { fail('cant enable tls_auth: missing extca_tls_auth_key_file') } | ||
if $extca_ca_cert_file == undef { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How do you like this?
unless $extca_ca_cert_file {}
This is maybe easier to read?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I prefer that syntax myself, though I know others don't. I'm wondering if those sort of changes are best made after we at least get the tests passing w/ the updated code, and maybe in a separate PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was actually having the exact same thought, though, when I was rebasing it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, we should not clutter up this PR.
I've rebased again, however, not sure how much time I'll be able to devote to this (it's not a module I use), and the tests still have the same failures. Is anyone interested in taking a deeper look into the test failures, or should I close this? |
I'm going to close this; agree with some comments that this is too much all at once, and not that familiar with the module, so I'll let someone else pick up this torch if they're interested. |
This adds Puppet 4 data types.