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

gw: fix config and systemd example generation #137

Merged
merged 3 commits into from
Sep 17, 2024

Conversation

ralphlange
Copy link
Contributor

@ralphlange ralphlange commented Jan 16, 2024

The generation of example configuration and systemd files was a bit messed up:

  • systemd service was starting pvagw with itself (instead of the config file)
  • Parsing the instance name from the command line was broken for the systemd file generation
  • Printing to "-" was suggesting to save the config file as systemd file

With this change...

  • pvagw generates a systemd service template for a filename *@.service and a systemd service instance for *@instance.service.
  • Documentation clarifies that the shown command is creating a systemd service instance file.

@mdavidsaver
Copy link
Member

Would you be so kind as to extend my clearly inadequacy test case?

https://github.com/mdavidsaver/p4p/blob/936b12a978d68ce4153c83c73cc313e74ec0473d/src/p4p/test/test_gw.py#L55

@ralphlange
Copy link
Contributor Author

Oops.
I completely missed that. Sure, of course.

@ralphlange
Copy link
Contributor Author

Duh.
"Like tempfile.NamedTemporaryFile..." doesn't include being able to use the same keyword args. You assume open() args instead.
How do you want me to resolve this?

@ralphlange ralphlange force-pushed the fix-gw-examples branch 2 times, most recently from 797d35a to 93eaaec Compare January 21, 2024 15:24
accept keyword args like tempfile.NamedTemporaryFile
and forward them properly to low-level calls
@ralphlange
Copy link
Contributor Author

All's well that ends well...

@ralphlange
Copy link
Contributor Author

Ping @mdavidsaver ...

@ralphlange
Copy link
Contributor Author

Ping-ping @mdavidsaver ...

@mdavidsaver mdavidsaver merged commit 15a3b62 into epics-base:master Sep 17, 2024
33 checks passed
@ralphlange
Copy link
Contributor Author

Merci!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants