1 All the plugins should subclass EnvBuilderPlugin from "model.py".
3 The EnvBuilderPlugin is a template class with a template algorithm:
9 #clean Environment before goes further.
12 #install network virtualization software from source code.
14 def load_drivers(self):
15 #loads drivers for network card.
18 #creates virtual switches.
20 def config_br_ports(self):
21 #config the vlan property for vswitch ports.
25 #wait vm to boot up and config vm for ips and other configurations.
26 def check_vm_connectivity(self):
27 #check if the vms correctly setup the control panel ips.
28 def build(self, cfg_intent):
29 self.host_cfg = cfg_intent #please retrieve options from self.host_cfg for your use in other methods.
31 self.download_and_compile()
36 self.config_tap_vlans()
37 self.check_vm_connectivity()
39 You should implements the abstract methods left empty, however you can make some methods do nothing to skip steps..
41 The plugin receives a "cfg_intent", The "cfg_intent" is a python dict parsed from a env-build configuration file.
43 It contains the detail configurations for the plugin to build a "virtual network" for testing.
45 There are some example json config files for building different type of "virtual network" under "etc/vstf/env" that you can refer to.
47 Before you creates a new plugin, you should make sure you understand these json config file properly.