aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--vicn/resource/icn/ccnx_consumer_producer_test.py14
-rw-r--r--vicn/resource/icn/face.py26
-rw-r--r--vicn/resource/icn/icn_tools.py2
-rw-r--r--vicn/resource/vpp/vpp_commands.py2
4 files changed, 22 insertions, 22 deletions
diff --git a/vicn/resource/icn/ccnx_consumer_producer_test.py b/vicn/resource/icn/ccnx_consumer_producer_test.py
index f682657d..76e4979c 100644
--- a/vicn/resource/icn/ccnx_consumer_producer_test.py
+++ b/vicn/resource/icn/ccnx_consumer_producer_test.py
@@ -32,17 +32,17 @@ class CcnxConsumerTest(Consumer):
Test consumer exchanging dummy data.
"""
- __package_names__ = ["libconsumer-producer-ccnx"]
+ __package_names__ = ["libicnet"]
- prefixes = Attribute(String,
+ prefixes = Attribute(String,
description = "Name served by the producer server test",
default = lambda self: self.default_name(),
mandatory = False,
multiplicity = Multiplicity.OneToMany)
node = Attribute(Node,
requirements=[
- Requirement("forwarder",
- capabilities = set(['ICN_SUITE_CCNX_1_0']),
+ Requirement("forwarder",
+ capabilities = set(['ICN_SUITE_CCNX_1_0']),
properties = {"protocol_suites" : ICN_SUITE_CCNX_1_0})
])
@@ -77,11 +77,11 @@ class CcnxProducerTest(Producer):
Test producer exchanging dummy data.
"""
- __package_names__ = ["libconsumer-producer-ccnx"]
+ __package_names__ = ["libicnet"]
node = Attribute(Node,
- requirements = [Requirement("forwarder",
- capabilities = set(['ICN_SUITE_CCNX_1_0']),
+ requirements = [Requirement("forwarder",
+ capabilities = set(['ICN_SUITE_CCNX_1_0']),
properties = {"protocol_suites" : ICN_SUITE_CCNX_1_0})])
#--------------------------------------------------------------------------
diff --git a/vicn/resource/icn/face.py b/vicn/resource/icn/face.py
index db72730d..641d10e7 100644
--- a/vicn/resource/icn/face.py
+++ b/vicn/resource/icn/face.py
@@ -54,24 +54,24 @@ class Face(Resource):
requirements = [
Requirement('forwarder')
])
- protocol = Attribute(String,
- description = 'Face underlying protocol',
+ protocol = Attribute(String,
+ description = 'Face underlying protocol',
mandatory = True)
id = Attribute(String, description = 'Local face ID',
ro = True)
# Cisco's extensions
- wldr = Attribute(Bool, description = 'flag: WLDR enabled',
+ wldr = Attribute(Bool, description = 'flag: WLDR enabled',
default = False)
- x2 = Attribute(Bool, description = 'flag: X2 face',
+ x2 = Attribute(Bool, description = 'flag: X2 face',
default = False)
# NFD extensions
- permanent = Attribute(Bool, description = 'flag: permanent face',
+ permanent = Attribute(Bool, description = 'flag: permanent face',
default = True)
nfd_uri = Attribute(String, description = 'Face uri',
func = lambda self : self._lambda_nfd_uri())
- nfdc_flags = Attribute(String,
+ nfdc_flags = Attribute(String,
description = 'Flags for face creation with NFDC',
func = lambda self : self._lambda_nfdc_flags())
@@ -83,7 +83,7 @@ class Face(Resource):
flags += 'wldr '
if self.x2:
flags += 'x2 '
- sibling_face_name = self.data.get('sibling_face', None)
+ sibling_face_name = self._internal_data.get('sibling_face', None)
sibling_face = self._state.manager.by_name(sibling_face_name) \
if sibling_face_name else None
dst_node = sibling_face.node.name if sibling_face else None
@@ -111,12 +111,12 @@ class Face(Resource):
class L2Face(Face):
- src_nic = Attribute(Interface,
+ src_nic = Attribute(Interface,
description = "Name of the network interface linked to the face",
mandatory=True)
- dst_mac = Attribute(String, description = "destination MAC address",
+ dst_mac = Attribute(String, description = "destination MAC address",
mandatory=True)
- ether_proto = Attribute(String,
+ ether_proto = Attribute(String,
description = "Ethernet protocol number used by the face",
default=DEFAULT_ETHER_PROTO)
@@ -128,12 +128,12 @@ class L2Face(Face):
class L4Face(Face):
ip_version = Attribute(Integer, description = "IPv4 or IPv6", default = 4)
- src_ip = Attribute(String, description = "local IP address",
+ src_ip = Attribute(String, description = "local IP address",
mandatory = True)
src_port = Attribute(Integer, description = "local TCP/UDP port")
- dst_ip = Attribute(String, descrition = "remote IP address",
+ dst_ip = Attribute(String, descrition = "remote IP address",
mandatory=True)
- dst_port = Attribute(Integer, description = "remote TCP/UDP port",
+ dst_port = Attribute(Integer, description = "remote TCP/UDP port",
mandatory=True)
def _lambda_nfd_uri(self):
diff --git a/vicn/resource/icn/icn_tools.py b/vicn/resource/icn/icn_tools.py
index 54823719..5c4624c9 100644
--- a/vicn/resource/icn/icn_tools.py
+++ b/vicn/resource/icn/icn_tools.py
@@ -23,4 +23,4 @@ class ICNTools(ICNApplication):
Resource: ICNTools
"""
- __package_names__ = ['libconsumer-producer-ccnx']
+ __package_names__ = ['libicnet']
diff --git a/vicn/resource/vpp/vpp_commands.py b/vicn/resource/vpp/vpp_commands.py
index 8ee64bf6..63c74808 100644
--- a/vicn/resource/vpp/vpp_commands.py
+++ b/vicn/resource/vpp/vpp_commands.py
@@ -37,5 +37,5 @@ CMD_VPP_CICN_GET = "timeout 1 vppctl cicn show" #We timeout if vpp is not starte
CMD_VPP_ADD_ICN_ROUTE = 'vppctl cicn cfg fib add prefix {route.prefix} face {route.face.id}'
CMD_VPP_ADD_ICN_FACE = 'vppctl cicn cfg face add local {face.src_ip}:{face.src_port} remote {face.dst_ip}:{face.dst_port}'
-CMD_VPP_CICN_GET_CACHE_SIZE = 'vppctl cicn show | grep "CS entries" | grep -E "[0-9]+"'
+CMD_VPP_CICN_GET_CACHE_SIZE = 'vppctl cicn show | grep "CS entries" | grep -Eo "[0-9]+"'
CMD_VPP_CICN_SET_CACHE_SIZE = 'vppctl cicn control param cs size {self.cache_size}'