diff --git a/postservice/31-one-netmng b/postservice/31-one-netmng index f2b7f27..21eec1c 100755 --- a/postservice/31-one-netmng +++ b/postservice/31-one-netmng @@ -9,6 +9,7 @@ import sys import os import csv import logging +import re LOG_FILE = '/var/log/one/eole-one-node.log' @@ -56,10 +57,11 @@ class OneClient(): self.auth = res[1].split(':') def __run_cmd__(self, cmd): - cmd.extend(['--user', self.auth[0]]) - cmd.extend(['--password', self.auth[1]]) + command = list(cmd) + command.extend(['--user', self.auth[0]]) + command.extend(['--password', self.auth[1]]) - res = process.system_out(cmd) + res = process.system_out(command) if res[0] == 0: if 'list' in cmd: out_lines = [] @@ -67,7 +69,7 @@ class OneClient(): for line in res[1].split('\n'): if len(line) == 0: next - elif 'ID' in line: + elif re.match('^.*ID ', line): next else: out_lines.append(line.split())