diff options
Diffstat (limited to 'vstf/vstf/agent/env')
32 files changed, 0 insertions, 110 deletions
diff --git a/vstf/vstf/agent/env/Readme b/vstf/vstf/agent/env/Readme deleted file mode 100755 index d178a6fd..00000000 --- a/vstf/vstf/agent/env/Readme +++ /dev/null @@ -1,9 +0,0 @@ -Modules in the directory are for "Environment Building". -"Environment Building" is for creating "virtual network" for Performance Evaluation. -The builder.py contains the quick test code for creates a "virtual network" from a config file. - -Usage: - python builder.py --config /etc/vstf/env/Tn.json - -Please modify example config file "/etc/vstf/model/Tn.json" to suit your own Environment. - diff --git a/vstf/vstf/agent/env/__init__.py b/vstf/vstf/agent/env/__init__.py index df7d24d0..df7d24d0 100755..100644 --- a/vstf/vstf/agent/env/__init__.py +++ b/vstf/vstf/agent/env/__init__.py diff --git a/vstf/vstf/agent/env/basic/Readme b/vstf/vstf/agent/env/basic/Readme deleted file mode 100755 index cf7a877f..00000000 --- a/vstf/vstf/agent/env/basic/Readme +++ /dev/null @@ -1,39 +0,0 @@ -the modules in this directory include some basic common purpose functions that can be used for other plugins. -you can see the modules in this directory as libraries that you can import for ease of creating your own plugin. - -the main functions of the modules are listed as follows: - -ImageManger: - role: - virtual machine images manager. used by VmManager. - wraps 'qemu-img' command as underlying mechanism. - features: - provides a function to create child image from a parent image. - provides a function to delete child image. - -SourceManager: - role: - source code manager. - using 'pramiko' as underlying mechanism. - features: - provides a function to download source code - provides a function which wrap 'make clean;make;make install' to compile and install. - -VmManager: - role: - virtual machine manager which can create vm and configure vm on bootstrap. - use libvirt as underlying mechanism. wrap 'virsh' command for creating vm. - features: - provides a function to create vm from a vm configuration context. - provides functions to detect if vm boots up successfully and onfigure bootstrap options for vm like ip and rabbitmq conf file. - -vm9pfs: - used by VmManager. - host side 9pfs operation (mainly file operations) to communicate with vm by libvirt 9pfs. - see as communication protocol on client side. The vm runs a agent for receiving the commands. - -VmXmlHelp: - used by VmManager. - just some divided libvirt xml string templates for building a complete libvirt xml file on demand by VmManager. - - diff --git a/vstf/vstf/agent/env/basic/__init__.py b/vstf/vstf/agent/env/basic/__init__.py index df7d24d0..df7d24d0 100755..100644 --- a/vstf/vstf/agent/env/basic/__init__.py +++ b/vstf/vstf/agent/env/basic/__init__.py diff --git a/vstf/vstf/agent/env/basic/collect.py b/vstf/vstf/agent/env/basic/collect.py index 126a7d55..126a7d55 100755..100644 --- a/vstf/vstf/agent/env/basic/collect.py +++ b/vstf/vstf/agent/env/basic/collect.py diff --git a/vstf/vstf/agent/env/basic/commandline.py b/vstf/vstf/agent/env/basic/commandline.py index e4df9b27..e4df9b27 100755..100644 --- a/vstf/vstf/agent/env/basic/commandline.py +++ b/vstf/vstf/agent/env/basic/commandline.py diff --git a/vstf/vstf/agent/env/basic/device_manager.py b/vstf/vstf/agent/env/basic/device_manager.py index 8b5387fe..8b5387fe 100755..100644 --- a/vstf/vstf/agent/env/basic/device_manager.py +++ b/vstf/vstf/agent/env/basic/device_manager.py diff --git a/vstf/vstf/agent/env/basic/image_manager.py b/vstf/vstf/agent/env/basic/image_manager.py index c3b5c6b3..c3b5c6b3 100755..100644 --- a/vstf/vstf/agent/env/basic/image_manager.py +++ b/vstf/vstf/agent/env/basic/image_manager.py diff --git a/vstf/vstf/agent/env/basic/source_manager.py b/vstf/vstf/agent/env/basic/source_manager.py index 6edd14ca..6edd14ca 100755..100644 --- a/vstf/vstf/agent/env/basic/source_manager.py +++ b/vstf/vstf/agent/env/basic/source_manager.py diff --git a/vstf/vstf/agent/env/basic/vm9pfs.py b/vstf/vstf/agent/env/basic/vm9pfs.py index 7364f8b2..7364f8b2 100755..100644 --- a/vstf/vstf/agent/env/basic/vm9pfs.py +++ b/vstf/vstf/agent/env/basic/vm9pfs.py diff --git a/vstf/vstf/agent/env/basic/vm_manager.py b/vstf/vstf/agent/env/basic/vm_manager.py index 60a3b37b..60a3b37b 100755..100644 --- a/vstf/vstf/agent/env/basic/vm_manager.py +++ b/vstf/vstf/agent/env/basic/vm_manager.py diff --git a/vstf/vstf/agent/env/basic/vm_xml_help.py b/vstf/vstf/agent/env/basic/vm_xml_help.py index 6f9131e7..6f9131e7 100755..100644 --- a/vstf/vstf/agent/env/basic/vm_xml_help.py +++ b/vstf/vstf/agent/env/basic/vm_xml_help.py diff --git a/vstf/vstf/agent/env/builder.py b/vstf/vstf/agent/env/builder.py index a66a8873..a66a8873 100755..100644 --- a/vstf/vstf/agent/env/builder.py +++ b/vstf/vstf/agent/env/builder.py diff --git a/vstf/vstf/agent/env/driver_plugins/__init__.py b/vstf/vstf/agent/env/driver_plugins/__init__.py index fc9802be..fc9802be 100755..100644 --- a/vstf/vstf/agent/env/driver_plugins/__init__.py +++ b/vstf/vstf/agent/env/driver_plugins/__init__.py diff --git a/vstf/vstf/agent/env/driver_plugins/manager.py b/vstf/vstf/agent/env/driver_plugins/manager.py index 6f895656..6f895656 100755..100644 --- a/vstf/vstf/agent/env/driver_plugins/manager.py +++ b/vstf/vstf/agent/env/driver_plugins/manager.py diff --git a/vstf/vstf/agent/env/driver_plugins/model.py b/vstf/vstf/agent/env/driver_plugins/model.py index ddc07449..ddc07449 100755..100644 --- a/vstf/vstf/agent/env/driver_plugins/model.py +++ b/vstf/vstf/agent/env/driver_plugins/model.py diff --git a/vstf/vstf/agent/env/driver_plugins/origin_driver.py b/vstf/vstf/agent/env/driver_plugins/origin_driver.py index bf3c15c8..bf3c15c8 100755..100644 --- a/vstf/vstf/agent/env/driver_plugins/origin_driver.py +++ b/vstf/vstf/agent/env/driver_plugins/origin_driver.py diff --git a/vstf/vstf/agent/env/fsmonitor/FSMonitor.py b/vstf/vstf/agent/env/fsmonitor/FSMonitor.py index e6559362..e6559362 100755..100644 --- a/vstf/vstf/agent/env/fsmonitor/FSMonitor.py +++ b/vstf/vstf/agent/env/fsmonitor/FSMonitor.py diff --git a/vstf/vstf/agent/env/fsmonitor/Readme b/vstf/vstf/agent/env/fsmonitor/Readme deleted file mode 100755 index f2bf9a8e..00000000 --- a/vstf/vstf/agent/env/fsmonitor/Readme +++ /dev/null @@ -1,13 +0,0 @@ -FSMonitor is a daemon process which runs in the vm. -FSMonitor receive "commands" from 'VmManager' by libvirt 9pfs. - -Basically the process works like this: - 1.The 'VmManager' writes 'command string' to 'command' file on the libvirt 9pfs used by vm. - 2.The FSMonitor constantly detects file changes on the libvirt 9pfs. - 3.The FSMonitor finds the newly created file, it then reads the file and execute the command. - -All the dependencies of FSMonitor should be satisfied by modules in this directory. - -When deploying FSMonitor, just copy this directory into the vm. - - diff --git a/vstf/vstf/agent/env/fsmonitor/__init__.py b/vstf/vstf/agent/env/fsmonitor/__init__.py index 83b8d15d..83b8d15d 100755..100644 --- a/vstf/vstf/agent/env/fsmonitor/__init__.py +++ b/vstf/vstf/agent/env/fsmonitor/__init__.py diff --git a/vstf/vstf/agent/env/fsmonitor/constant.py b/vstf/vstf/agent/env/fsmonitor/constant.py index 33b37eb4..33b37eb4 100755..100644 --- a/vstf/vstf/agent/env/fsmonitor/constant.py +++ b/vstf/vstf/agent/env/fsmonitor/constant.py diff --git a/vstf/vstf/agent/env/fsmonitor/utils.py b/vstf/vstf/agent/env/fsmonitor/utils.py index 5bdb4159..5bdb4159 100755..100644 --- a/vstf/vstf/agent/env/fsmonitor/utils.py +++ b/vstf/vstf/agent/env/fsmonitor/utils.py diff --git a/vstf/vstf/agent/env/plugins/Readme b/vstf/vstf/agent/env/plugins/Readme deleted file mode 100755 index a2879ba0..00000000 --- a/vstf/vstf/agent/env/plugins/Readme +++ /dev/null @@ -1,49 +0,0 @@ -All the plugins should subclass EnvBuilderPlugin from "model.py". - -The EnvBuilderPlugin is a template class with a template algorithm: - - def __init__(self, ): - pass - @abstractmethod - def clean(self): - #clean Environment before goes further. - @abstractmethod - def install(self): - #install network virtualization software from source code. - @abstractmethod - def load_drivers(self): - #loads drivers for network card. - @abstractmethod - def create_brs(self): - #creates virtual switches. - @abstractmethod - def config_br_ports(self): - #config the vlan property for vswitch ports. - def create_vms(self): - #create vms - def wait_vms(self): - #wait vm to boot up and config vm for ips and other configurations. - def check_vm_connectivity(self): - #check if the vms correctly setup the control panel ips. - def build(self, cfg_intent): - self.host_cfg = cfg_intent #please retrieve options from self.host_cfg for your use in other methods. - self.clean() - self.download_and_compile() - self.load_drivers() - self.create_brs() - self.create_vms() - self.wait_vms() - self.config_tap_vlans() - self.check_vm_connectivity() - -You should implements the abstract methods left empty, however you can make some methods do nothing to skip steps.. - -The plugin receives a "cfg_intent", The "cfg_intent" is a python dict parsed from a env-build configuration file. - -It contains the detail configurations for the plugin to build a "virtual network" for testing. - -There are some example json config files for building different type of "virtual network" under "etc/vstf/env" that you can refer to. - -Before you creates a new plugin, you should make sure you understand these json config file properly. - - diff --git a/vstf/vstf/agent/env/plugins/__init__.py b/vstf/vstf/agent/env/plugins/__init__.py index 83b8d15d..83b8d15d 100755..100644 --- a/vstf/vstf/agent/env/plugins/__init__.py +++ b/vstf/vstf/agent/env/plugins/__init__.py diff --git a/vstf/vstf/agent/env/plugins/libvirt_plugin.py b/vstf/vstf/agent/env/plugins/libvirt_plugin.py index 27af8063..27af8063 100755..100644 --- a/vstf/vstf/agent/env/plugins/libvirt_plugin.py +++ b/vstf/vstf/agent/env/plugins/libvirt_plugin.py diff --git a/vstf/vstf/agent/env/plugins/model.py b/vstf/vstf/agent/env/plugins/model.py index b19ceb96..b19ceb96 100755..100644 --- a/vstf/vstf/agent/env/plugins/model.py +++ b/vstf/vstf/agent/env/plugins/model.py diff --git a/vstf/vstf/agent/env/plugins/tester_env_plugin.py b/vstf/vstf/agent/env/plugins/tester_env_plugin.py index 0682aac8..0682aac8 100755..100644 --- a/vstf/vstf/agent/env/plugins/tester_env_plugin.py +++ b/vstf/vstf/agent/env/plugins/tester_env_plugin.py diff --git a/vstf/vstf/agent/env/vswitch_plugins/__init__.py b/vstf/vstf/agent/env/vswitch_plugins/__init__.py index 83b8d15d..83b8d15d 100755..100644 --- a/vstf/vstf/agent/env/vswitch_plugins/__init__.py +++ b/vstf/vstf/agent/env/vswitch_plugins/__init__.py diff --git a/vstf/vstf/agent/env/vswitch_plugins/bridge_plugin.py b/vstf/vstf/agent/env/vswitch_plugins/bridge_plugin.py index 21b8f82c..21b8f82c 100755..100644 --- a/vstf/vstf/agent/env/vswitch_plugins/bridge_plugin.py +++ b/vstf/vstf/agent/env/vswitch_plugins/bridge_plugin.py diff --git a/vstf/vstf/agent/env/vswitch_plugins/manager.py b/vstf/vstf/agent/env/vswitch_plugins/manager.py index 785a1db8..785a1db8 100755..100644 --- a/vstf/vstf/agent/env/vswitch_plugins/manager.py +++ b/vstf/vstf/agent/env/vswitch_plugins/manager.py diff --git a/vstf/vstf/agent/env/vswitch_plugins/model.py b/vstf/vstf/agent/env/vswitch_plugins/model.py index 5d700411..5d700411 100755..100644 --- a/vstf/vstf/agent/env/vswitch_plugins/model.py +++ b/vstf/vstf/agent/env/vswitch_plugins/model.py diff --git a/vstf/vstf/agent/env/vswitch_plugins/ovs_plugin.py b/vstf/vstf/agent/env/vswitch_plugins/ovs_plugin.py index 7ea56d4a..7ea56d4a 100755..100644 --- a/vstf/vstf/agent/env/vswitch_plugins/ovs_plugin.py +++ b/vstf/vstf/agent/env/vswitch_plugins/ovs_plugin.py |