1 ##############################################################################
2 # Copyright (c) 2015 Huawei Technologies Co.,Ltd and others.
4 # All rights reserved. This program and the accompanying materials
5 # are made available under the terms of the Apache License, Version 2.0
6 # which accompanies this distribution, and is available at
7 # http://www.apache.org/licenses/LICENSE-2.0
8 ##############################################################################
10 from abc import ABCMeta
11 from abc import abstractmethod
15 __metaclass__ = ABCMeta
19 """implement this clean function to clean environment before and after calling any other functions.
26 """implements this init function to setup necessary Preconditions.
32 def create_br(self, br_cfg):
33 """Create a bridge(virtual switch). Return True for success, return False for failure.
35 :param dict br_cfg: configuration for bridge creation like
42 "vlan_mode": "access",
53 def set_tap_vid(self, tap_cfg):
54 """set vlan id or vxlan id for tap device(virtual nic for vm).
56 :param dict tap_cfg: dictionary config for tap device like
59 "vlan_mode": "access",
66 def set_fastlink(self, br_cfg):