rubbos installation guide
[bottlenecks.git] / vstf / vstf / agent / env / plugins / Readme
1 All the plugins should subclass EnvBuilderPlugin from "model.py".
2
3 The EnvBuilderPlugin is a template class with a template algorithm:
4
5         def __init__(self, ):
6                 pass
7         @abstractmethod    
8     def clean(self):
9         #clean Environment before goes further.
10     @abstractmethod        
11     def install(self):
12         #install network virtualization software from source code.
13     @abstractmethod
14     def load_drivers(self):
15         #loads drivers for network card.
16     @abstractmethod    
17     def create_brs(self):         
18         #creates virtual switches.         
19     @abstractmethod
20     def config_br_ports(self):
21         #config the vlan property for vswitch ports.
22     def create_vms(self):
23         #create vms         
24     def wait_vms(self):
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.
30         self.clean()
31         self.download_and_compile()
32         self.load_drivers()
33         self.create_brs()
34         self.create_vms()
35         self.wait_vms()
36         self.config_tap_vlans()
37         self.check_vm_connectivity()
38         
39 You should implements the abstract methods left empty, however you can make some methods do nothing to skip steps..
40
41 The plugin receives a "cfg_intent", The "cfg_intent" is a python dict parsed from a env-build configuration file.
42
43 It contains the detail configurations for the plugin to build a "virtual network" for testing.
44
45 There are some example json config files for building different type of "virtual network" under "etc/vstf/env" that you can refer to.
46
47 Before you creates a new plugin, you should make sure you understand these json config file properly.   
48
49