aboutsummaryrefslogtreecommitdiffstats
path: root/vicn/resource/symmetric_channel.py
diff options
context:
space:
mode:
Diffstat (limited to 'vicn/resource/symmetric_channel.py')
-rw-r--r--vicn/resource/symmetric_channel.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/vicn/resource/symmetric_channel.py b/vicn/resource/symmetric_channel.py
new file mode 100644
index 00000000..d8a35030
--- /dev/null
+++ b/vicn/resource/symmetric_channel.py
@@ -0,0 +1,16 @@
+from netmodel.model.key import Key
+from vicn.core.attribute import Attribute
+from vicn.core.task import inherit_parent
+from vicn.resource.interface import Interface
+from vicn.resource.channel import Channel
+
+class SymmetricChannel(Channel):
+ src = Attribute(Interface, mandatory = True)
+ dst = Attribute(Interface, mandatory = True)
+
+ __key__ = Key(src, dst)
+
+ @inherit_parent
+ def __create__(self):
+ self.interfaces << self.src
+ self.interfaces << self.dst