fixed shebangs in non executable .py files
[nepi.git] / src / nepi / util / tags.py
1 # -*- coding: utf-8 -*-
2
3 MOBILE = "mobile"
4 NODE = "node"
5 INTERFACE = "interface"
6 WIRELESS = "wireless"
7 APPLICATION = "application"
8 NAT = "nat"
9 SWITCH = "switch"
10 PPP = "point-to-point"
11 PROTOCOL = "protocol"
12 TUNNEL = "tunnel"
13 INTERNET = "internet"
14 HUB = "hub"
15 ALLOW_ADDRESSES = "allow_addresses"
16 ALLOW_ROUTES = "allow_routes"
17 HAS_ADDRESSES = "has_addresses"
18 HAS_ROUTES = "has_routes"
19
20 class Taggable(object):
21     def __init__(self):
22         super(Taggable, self).__init__()
23         self._tags = list()
24
25     @property
26     def tags(self):
27         return self._tags
28
29     def add_tag(self, tag_id):
30         self._tags.append(tag_id)
31
32     def has_tag(self, tag_id):
33         return tag_id in self._tags
34