|
User can select and extend functionality of Svengali through plugin mechanism. Svengali is composed of plugins except for core parts. By this design..
We are aiming for above. We adopt this design so that we will develop Svengali with users.
How to use pluginPlugin can be load by calling load_plugin method. load_plugin("eucalyptus")
Plugin name to pass is file name of files on plugins directory except for extention part. Unfortunately, there are no plugins user can uses as of Aug 5th, 2010. However, as we explain how to write original plugin , plase make your original one :-)
How to write pluginWriting plugin is very simple. You only have to write some Ruby code and place it to plugins directory. If you want to use a function named "hoge"... #my_plugin.rb def hoge() #codes you want end You only have to write code like above and place it on plugins directory. If you want to introduce your original class, steps needed are same with above. If you want to change or extend original functionalities, you can realize it by replacing function or class definition. You know, such modification can be realized easily in Light weight language such as Ruby For example, Machine#install_package method is implemented as plugin which extends Machine class, class Machine
def install_package(package_name_str)
return @ssh.exec!(ExtStr.cmd["package_install"] + " " + package_name_str)
end
end
and Svengali loads it by default. #svengali/svengali.rb
----------- ( cutdowned ) -----------
#load default plugins
load_plugin("machine_config")
load_plugin("package")
----------- ( cutdowned ) -----------
We ask your cooperationWe want to import user wrote plugins to official code. So, please send your plugin to ryo.contact at gmail.com :-) If you are familiar with github. You can send your code through pull request of github. # repository -> http://github.com/ryogrid/svengali Names of contributor will go on project official site. To build Svengali into "good" software, your cooperation is needed. |