From af82e868d25497e22a8f04d81dbeb11cf6577df3 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Wed, 17 Jan 2018 10:06:05 -0500 Subject: [PATCH] Alter nodemedia command Add the glob protection and have attach do a list after. --- confluent_client/bin/nodemedia | 4 +++- confluent_client/confluent_env.sh | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/confluent_client/bin/nodemedia b/confluent_client/bin/nodemedia index 6c2e76c9..1a2582ba 100644 --- a/confluent_client/bin/nodemedia +++ b/confluent_client/bin/nodemedia @@ -64,7 +64,9 @@ def attach_media(noderange, media): global exitcode session = client.Command() resource = '/noderange/{0}/media/attach'.format(noderange) - print(repr(list(session.update(resource, {'url': media})))) + for rsp in session.update(resource, {'url': media}): + printerror(res) + list_media(noderange, media) def list_media(noderange, media): diff --git a/confluent_client/confluent_env.sh b/confluent_client/confluent_env.sh index 55a0cd02..057fdd61 100644 --- a/confluent_client/confluent_env.sh +++ b/confluent_client/confluent_env.sh @@ -29,6 +29,7 @@ alias nodehealth='CURRENT_CMDLINE=$(HISTTIMEFORMAT= builtin history 1); export C alias nodeidentify='CURRENT_CMDLINE=$(HISTTIMEFORMAT= builtin history 1); export CURRENT_CMDLINE; nodeidentify' alias nodeinventory='CURRENT_CMDLINE=$(HISTTIMEFORMAT= builtin history 1); export CURRENT_CMDLINE; nodeinventory' alias nodelist='CURRENT_CMDLINE=$(HISTTIMEFORMAT= builtin history 1); export CURRENT_CMDLINE; nodelist' +alias nodemedia='CURRENT_CMDLINE=$(HISTTIMEFORMAT= builtin history 1); export CURRENT_CMDLINE; nodemedia' alias nodepower='CURRENT_CMDLINE=$(HISTTIMEFORMAT= builtin history 1); export CURRENT_CMDLINE; nodepower' alias noderemove='CURRENT_CMDLINE=$(HISTTIMEFORMAT= builtin history 1); export CURRENT_CMDLINE; noderemove' alias nodereseat='CURRENT_CMDLINE=$(HISTTIMEFORMAT= builtin history 1); export CURRENT_CMDLINE; nodereseat'