From 16f2a2b1ebbd5c6b1b46943ccee57a04246df838 Mon Sep 17 00:00:00 2001 From: Allen Lin37 Date: Tue, 28 Feb 2017 13:51:36 -0500 Subject: [PATCH] Updated for broken expressions --- confluent_client/bin/nodeattrib | 6 +++++- confluent_client/doc/man/nodeattrib.ronn | 9 ++++----- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/confluent_client/bin/nodeattrib b/confluent_client/bin/nodeattrib index 2ae05aa1..e0120be4 100644 --- a/confluent_client/bin/nodeattrib +++ b/confluent_client/bin/nodeattrib @@ -121,7 +121,11 @@ if len(args) > 0: attrout = '{0}: {1}: ********'.format(node, attr) else: attrout = '{0}: {1}:'.format(node, attr) - if options.blame: + elif 'broken' in currattr: + attrout = '{0}: {1}: *ERROR* BROKEN EXPRESSION: ' \ + '{2}'.format(node, attr, + currattr['broken']) + if options.blame or 'broken' in currattr: blamedata = [] if 'inheritedfrom' in currattr: blamedata.append('inherited from group {0}'.format( diff --git a/confluent_client/doc/man/nodeattrib.ronn b/confluent_client/doc/man/nodeattrib.ronn index 63ecf145..dc330b0c 100644 --- a/confluent_client/doc/man/nodeattrib.ronn +++ b/confluent_client/doc/man/nodeattrib.ronn @@ -66,11 +66,10 @@ This is different from setting the value to an empty string. `n2`: console.method: serial `n2`: hardwaremanagement.manager: 172.30.3.2 - * Clear attribute on nodes of a simple noderange: + * Clear attribute on nodes of a simple noderange, if you want to retain the variable set the attribute to "": `# nodeattrib n1-n2 -c console.method` - `n1`: console.method: - `n1`: hardwaremanagement.manager: 172.30.3.1 - `n2`: console.method: - `n2`: hardwaremanagement.manager: 172.30.3.2 + `# nodeattrib n1-n2 console.method` + Error: console.logging not a valid attribute +