aboutsummaryrefslogtreecommitdiffstats
path: root/vicn/resource/icn/cicn.py
diff options
context:
space:
mode:
authorMarcel Enguehard <mengueha+fdio@cisco.com>2017-10-09 08:44:59 +0200
committerMarcel Enguehard <mengueha+fdio@cisco.com>2017-10-09 08:55:46 +0200
commit5f8867a3454164ad20ae427dc9d2c7d65ea00a90 (patch)
treec8ff40fb147a76af2baa77790ba8a6ac968e51b4 /vicn/resource/icn/cicn.py
parentaf2dd545d04cfca7e7ec066035abf78c3d541915 (diff)
Several fixes related to async_set, ip addressing, and memif interfaces for VPP
Change-Id: I26b7928751f41ea66ba47bb1becac33cf5195915 Signed-off-by: Marcel Enguehard <mengueha+fdio@cisco.com>
Diffstat (limited to 'vicn/resource/icn/cicn.py')
-rw-r--r--vicn/resource/icn/cicn.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/vicn/resource/icn/cicn.py b/vicn/resource/icn/cicn.py
index 8ab36ec9..597692c8 100644
--- a/vicn/resource/icn/cicn.py
+++ b/vicn/resource/icn/cicn.py
@@ -71,7 +71,7 @@ class CICNForwarder(Forwarder):
@inherit_parent
def __get__(self):
def parse(rv):
- if rv.return_value > 0 or 'cicn: not enabled' in rv.stdout:
+ if rv.return_value > 0 or 'cicn: not enabled' in rv.stdout or "Forwarder : disabled" in rv.stdout:
raise ResourceNotFound
return BashTask(self.node, CMD_VPP_CICN_GET,
lock = self.node.vpp.vppctl_lock, parse=parse)
@@ -134,6 +134,9 @@ class CICNForwarder(Forwarder):
def _get_cache_size(self):
def parse(rv):
- return int(rv.stdout)
+ if not rv.stdout:
+ return 0
+ else:
+ return int(rv.stdout)
return BashTask(self.node, CMD_VPP_CICN_GET_CACHE_SIZE, parse=parse,
lock = self.node.vpp.vppctl_lock)