aboutsummaryrefslogtreecommitdiffstats
path: root/vicn/resource/symmetric_channel.py
blob: d8a350306986495514730cef7cde86e2b0a6a3a9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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