- @handler('usage : add <vpn_name> <vpn_dst> <vpn_src_ip> <vpn_src_mask>')
- def add(self, vpn_src, vpn_dst, vpn_src_ip, vpn_src_mask):
- log.debug(u'VpnHandler.add(%r, %r, %r, %r)', vpn_src, vpn_dst,
- vpn_src_ip, vpn_src_mask)
- if vpn_src in self.vpns:
- if self.vpns[vpn_src].dele:
- log.debug(u'VpnHandler.add: deleted, undeleting')
- self.vpns[vpn_src] = False
- else:
- DictSubHandler.add(self, vpn_src, vpn_dst, vpn_src_ip,
- vpn_src_mask, None, None)
-
- @handler('usage : delete <vpn_name>')
- def delete(self, vpn_src):
- log.debug(u'VpnHandler.delete(%r)', vpn_src)
- if vpn_src in self.vpns:
- self.vpns[vpn_src].dele = True;
-
-