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

added node_prefix as an ENV option #14

Merged
merged 2 commits into from
Apr 17, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
better check for existing prefix
travisbcotton committed Apr 4, 2024

Verified

This commit was signed with the committer’s verified signature.
travisbcotton Travis Cotton
commit e39bd57f9d9508f7dde29d94403b8ca629193eee
5 changes: 3 additions & 2 deletions dnsmasq-dhcpd-dynamic/smd.py
Original file line number Diff line number Diff line change
@@ -11,8 +11,9 @@ def getSMD(url):
return data

def getNID(c_data, xname):
node_prefix = os.environ['node_prefix']
if not node_prefix:
if 'node_prefix' in os.environ:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this generally how we want to set config options, or have we done it in different ways across different containers?

node_prefix = os.environ['node_prefix']
else:
node_prefix="nid"
for c in c_data:
if xname == c['ID']: