summaryrefslogtreecommitdiffstats
path: root/extras/vpp_config/vpplib/VPPUtil.py
diff options
context:
space:
mode:
authorjdenisco <jdenisco@cisco.com>2018-11-20 11:25:17 -0500
committerDave Barach <openvpp@barachs.net>2018-11-20 17:24:29 +0000
commit7c37a67fda3c467272f2c5cebff08329ba94994a (patch)
tree247fde8c736fa467d7f5b4a152def35e28986688 /extras/vpp_config/vpplib/VPPUtil.py
parent8ee72514d392e1d16638656d5c4a6dc63d3d90cc (diff)
Fix inspection for 18.10, requirements
Change-Id: I1ecc278f43afff184a26f6f18fe22a49d8916eb1 Signed-off-by: jdenisco <jdenisco@cisco.com>
Diffstat (limited to 'extras/vpp_config/vpplib/VPPUtil.py')
-rw-r--r--extras/vpp_config/vpplib/VPPUtil.py32
1 files changed, 20 insertions, 12 deletions
diff --git a/extras/vpp_config/vpplib/VPPUtil.py b/extras/vpp_config/vpplib/VPPUtil.py
index 336097d6e0a..89e2d74fc5d 100644
--- a/extras/vpp_config/vpplib/VPPUtil.py
+++ b/extras/vpp_config/vpplib/VPPUtil.py
@@ -138,7 +138,9 @@ class VPPUtil(object):
# When using release
reps += 'release/ubuntu {} main ./\n'.format(ubuntu_version)
# When using master
- # reps += 'master/ubuntu {} main/ ./\n'.format(ubuntu_version)
+ # reps += 'master/ubuntu {} main ./\n'.format(ubuntu_version)
+ # When using 1807
+ # reps += '1807/ubuntu {} main ./\n'.format(ubuntu_version)
with open(sfile, 'w') as sfd:
sfd.write(reps)
@@ -146,8 +148,8 @@ class VPPUtil(object):
# Add the key
key = requests.get('https://packagecloud.io/fdio/{}/gpgkey'.format('release'))
- # cmd = 'curl -L https://packagecloud.io/fdio/{}/gpgkey | apt-key add -'.format(fdio_release)
- # cmd = 'curl -L https://packagecloud.io/fdio/{}/gpgkey | apt-key add -'.format('mastert')
+ # key = requests.get('https://packagecloud.io/fdio/{}/gpgkey'.format('master'))
+ # key = requests.get('https://packagecloud.io/fdio/{}/gpgkey'.format('1807'))
cmd = 'echo "{}" | apt-key add -'.format(key.content)
(ret, stdout, stderr) = self.exec_command(cmd)
if ret != 0:
@@ -541,19 +543,25 @@ class VPPUtil(object):
interfaces[name]['carrier'] = spl[1]
# Socket
- rfall = re.findall(r'cpu socket', line)
+ rfall = re.findall(r'numa \d+', line)
if rfall:
- spl = line.split('cpu socket ')
- interfaces[name]['cpu socket'] = spl[1]
+ spl = rfall[0].split()
+ interfaces[name]['numa'] = rfall[0].split()[1]
# Queues and Descriptors
- rfall = re.findall(r'rx queues', line)
+ rfall = re.findall(r'rx\: queues \d+', line)
if rfall:
- spl = line.split(',')
- interfaces[name]['rx queues'] = spl[0].lstrip(' ').split(' ')[2]
- interfaces[name]['rx descs'] = spl[1].split(' ')[3]
- interfaces[name]['tx queues'] = spl[2].split(' ')[3]
- interfaces[name]['tx descs'] = spl[3].split(' ')[3]
+ interfaces[name]['rx queues'] = rfall[0].split()[2]
+ rdesc = re.findall(r'desc \d+', line)
+ if rdesc:
+ interfaces[name]['rx descs'] = rdesc[0].split()[1]
+
+ rfall = re.findall(r'tx\: queues \d+', line)
+ if rfall:
+ interfaces[name]['tx queues'] = rfall[0].split()[2]
+ rdesc = re.findall(r'desc \d+', line)
+ if rdesc:
+ interfaces[name]['tx descs'] = rdesc[0].split()[1]
return interfaces