Infrastructure Container Auto Binds
-
I have to think that others have gotten this to work, but neither myself, CoPilot or Grok have been able to.
'All' I want to do is bind nodes that may have, between various sites, an IP that could be in one of three subnets per site, and bind them to that specific container that has IP specific auto bind rules.
I cannot find any examples that point me in the right direction from within the past 2-3 years that get me any where.
Does anyone have any code snippets that show this working like I am attempting to use it?
Thanks!
-
If I understand your correctly, this should be enough:
InetAddress("10.5.3.0", 24).contains($node.ipAddress)This autobind script will collect all 10.5.3.0/24 nodes into container.
$node.ipAddress is detected management address, if you want to do it based on the interfaces:for (i : $node.interfaces) { for (addr : i.ipAddressList) { if (InetAddress("10.5.3.0", 24).contains(addr)) { return true; } } } return false;
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login