Merge branch 'fix-13050'
This commit is contained in:
commit
4a9aed61bc
|
@ -9,6 +9,7 @@ import sys
|
||||||
import os
|
import os
|
||||||
import csv
|
import csv
|
||||||
import logging
|
import logging
|
||||||
|
import re
|
||||||
|
|
||||||
LOG_FILE = '/var/log/one/eole-one-node.log'
|
LOG_FILE = '/var/log/one/eole-one-node.log'
|
||||||
|
|
||||||
|
@ -56,10 +57,11 @@ class OneClient():
|
||||||
self.auth = res[1].split(':')
|
self.auth = res[1].split(':')
|
||||||
|
|
||||||
def __run_cmd__(self, cmd):
|
def __run_cmd__(self, cmd):
|
||||||
cmd.extend(['--user', self.auth[0]])
|
command = list(cmd)
|
||||||
cmd.extend(['--password', self.auth[1]])
|
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 res[0] == 0:
|
||||||
if 'list' in cmd:
|
if 'list' in cmd:
|
||||||
out_lines = []
|
out_lines = []
|
||||||
|
@ -67,7 +69,7 @@ class OneClient():
|
||||||
for line in res[1].split('\n'):
|
for line in res[1].split('\n'):
|
||||||
if len(line) == 0:
|
if len(line) == 0:
|
||||||
next
|
next
|
||||||
elif 'ID' in line:
|
elif re.match('^.*ID ', line):
|
||||||
next
|
next
|
||||||
else:
|
else:
|
||||||
out_lines.append(line.split())
|
out_lines.append(line.split())
|
||||||
|
|
Loading…
Reference in New Issue