Skip to content
This repository was archived by the owner on Jan 16, 2020. It is now read-only.

Conversation

@mateusz-gozdek-sociomantic
Copy link
Contributor

Part of #11 and #12. It's also a clean up, to make fixing #8 easier.

@mateusz-gozdek-sociomantic
Copy link
Contributor Author

Rebased and fixed some aligment.

@whefter
Copy link
Owner

whefter commented May 19, 2016

If I read your changes correctly, then this will remove the user's ability to specify arbitrary options for a device because you are setting a fixed set of parameters through Augeas but not using the options parameter anymore.

Based on this, I can't merge this as it might break the module for users who have specified the options parameter. I'm not sure why you moved the Augeas changes into the manifest? The commit I added just now should take care of the devices per folder issue.

The other changes concern proper formatting of the XML file and the ability to manage an arbitrary number of addresses per device, if I read them correctly. If you add those on top of my newest commit, I'll be happy to merge them.

In any case, thank you for the contributions!

@mateusz-gozdek-sociomantic
Copy link
Contributor Author

Thanks for reviewing my PR.

$option

Yes, this PR will remove user ability to specify $options parameter. Instead, they should use syncthing::address class, because, according to documentation, device element can contain only <address> childs.

I understand why you can't merge it and I agree with you. So my idea would be to add deprecation warning about using option parameter and bring it back, to provide backward compatibility.

Moving augeas to puppet manifest

In my opinion, generating YAML file from template, parsing it using puppet and assigning to variable, it'a bit hacky way to do it, and also, it's not very clear, when reading code. That's why I wanted to move it directly to manifest.

Other changes

You understand rest of the changes correctly, It's some crazy logic to proper format XML file and managing device addresses.

I will put it on top of your commits soon.

@mateusz-gozdek-sociomantic mateusz-gozdek-sociomantic force-pushed the move-config-device-into-manifest branch 2 times, most recently from b6513dd to 486bcf1 Compare May 24, 2016 11:33
@mateusz-gozdek-sociomantic
Copy link
Contributor Author

OK, I rebased to master and updated my code.

I generalized syncthing::address to syncthing::element, which is now more flexible and can be used in different classes. syncthing::element is now used to bring back support of $options.

I also updated device, to be able to specify multiple addresses as array or single address as string.

@whefter
Copy link
Owner

whefter commented Jul 24, 2016

There appear to be some problems with this merge as indicated by the failing check. I've created a dev branch, could you re-create the pull request for that branch? Then I can merge it and take a look.

There are still some changes in your PR that I'm not happy with, e.g. the deprecation of the options array. There's no valid reason to get rid of it, even if in the end it's simply handled by an each loop and the new ::element defined type. But it's a convenient way of passing options quickly to a device configuration.

@mateusz-gozdek-sociomantic
Copy link
Contributor Author

Hi, yeah, the problem with check is because I always use parser_future=true in my environment and by this, I have iterators available, which are not in standard parser. I don't have an idea how to solve it yet. Using template how you did it, did the trick, but in my opinion it's unreadable as hell. I'll think over it and create another PR.

@mateusz-gozdek-sociomantic mateusz-gozdek-sociomantic force-pushed the move-config-device-into-manifest branch from 486bcf1 to 520007e Compare July 25, 2016 08:18
@whefter
Copy link
Owner

whefter commented Nov 1, 2017

Hi, what's the status on this?

@mateusz-gozdek-sociomantic
Copy link
Contributor Author

I am not using this module anymore, I just wrote my simple implementation, which I can't make public for now. I just ticked "Allow edits from maintainers.", so feel free to adapt it for whatever you need or just close it. For curious: I'm using datacat and single template to generate entire config file, which seems to be a good way to go.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants