-
Notifications
You must be signed in to change notification settings - Fork 17
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
Node name templates #175
Merged
justparking
merged 16 commits into
museumsvictoria:master
from
justparking:feat_nameTemplates
Apr 29, 2020
Merged
Node name templates #175
justparking
merged 16 commits into
museumsvictoria:master
from
justparking:feat_nameTemplates
Apr 29, 2020
+390
−63
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
… (searchability); extraneous notes/comments in node/signal/action names
… was inspected and merge safe.
…-8 for gradle build to avoid errors
Built a related release, see https://github.com/justparking/nodel/releases/tag/feat_nameTemplates-2.2.1-rev425. |
…e of lingering process.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This allows for dynamic node naming using conventional dollar-sign substitution (i.e.
$NAME
or${NAME WITH SYMBOLS}
) with several useful resolution techniques.By example, the first node created could be:
Nodel Recipes Sync for $HOSTNAME ${http port} (${os.name}, ${mac})
This would expand out to be:
Nodel Recipes Sync for MYCOMPUTER 8085 (Windows 10, fc:f8:ae:3e:5f:17)
I envisage name templates to be quite convenient when used with
Computer
andApplication
nodes.Resolution steps in order tried:
hostname
¹ returns the hostname as provided by the environment²IP
,IP Address
orIP Addresses
(¹) return the IP addresses of bound interfacesMAC
,MAC Address
orMAC Addresses
(¹) return the MAC addresses² of bound interfacesHTTP Port
¹ returns the HTTP port of the Nodel hostVersion
¹ returns the version of the Nodel hostHosting Rule
¹ returns the hosting rule(s) of the Nodel host—
¹ case-and-symbol insensitive
² result is case matched according to name, e.g.
MAC
returnsAA:BB:..
,mac
returnsaa:bb...
³ on Windows, lookup is case-insensitive. Others likely case-sensitive.
⁴ likely case-sensitive