From 8eca6b156bf2ad34619d9e6e0a74abe1be341268 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Fri, 3 Nov 2017 10:31:00 -0400 Subject: [PATCH] Automatically request static when setting ip If someone is setting IP address, they are implying static. Change that implicit reality to explicit statement. --- confluent_client/bin/nodeconfig | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/confluent_client/bin/nodeconfig b/confluent_client/bin/nodeconfig index 76bf465f..739dbdc2 100644 --- a/confluent_client/bin/nodeconfig +++ b/confluent_client/bin/nodeconfig @@ -57,6 +57,10 @@ cfgpaths = { 'ipv4_gateway'), } +autodeps = { + 'bmc.ipv4': (('bmc.ipv4_method', 'static'),) +} + try: noderange = args[0] except IndexError: @@ -76,6 +80,8 @@ for param in args[1:]: key, _, value = param.partition('=') if key not in cfgpaths: bailout('Unrecognized setting: {0}'.format(key)) + for depkey, depval in autodeps.get(key, []): + assignment[depkey] = depval assignment[key] = value else: if setmode is None: