lighting XEN management README[ Updating in the progress…]

These set of scripts used to manage xen dom0s and domUs.

1. Struchture

File Structure:


bin: Control Center bin files.
plugin-bin: Dom0 Plugin-bin files
libs: System libiraries.
hvs_web_cgi: gathering info of instance & and show them via web server.


iamges: standard.img

1.2 Control Introduction.

Control Center
———————————————- DOM0_NAME cmd… DOMU_NAME cmd…
dom0-1 dom0-2 dom0-…. dom0-20
-domU1 . . . . . . . . . . .. . . . . . . . . .domUx


2. Command introduction Client-Plugin

xen_create_instance : create instance on dom0s
xen_delete_instance : remove instance on dom0s
xen_getimg : download standard iamges for instance creation

3. See Also

Cool Command line options parser–Python Optparse

Reference Link:

#!/usr/bin/env python

from optparse import OptionParser

def main():
parser = OptionParser(usage=”usage: %prog [options] filename”,
version=”%prog 1.0″)
parser.add_option(“-x”, “–xhtml”,
help=”create a XHTML template instead of HTML”)
parser.add_option(“-c”, “–cssfile”,
action=”store”, # optional because action defaults to “store”
help=”CSS file to link”,)
(options, args) = parser.parse_args()

if len(args) != 1:
parser.error(“wrong number of arguments”)

print options
print args

if __name__ == ‘__main__’:

See Also:
(options, args) = parser.parse_args()
(If you like, you can pass a custom argument list to parse_args(), but that’s rarely necessary: by default it uses sys.argv[1:].)

parse_args() returns two values:

options, an object containing values for all of your options—e.g. if –file takes a single string argument, then options.file will be the filename supplied by the user, or None if the user did not supply that option
args, the list of positional arguments leftover after parsing options
This tutorial section only covers the four most important option attributes: action, type, dest (destination), and help. Of these, action is the most fundamental.