Changes between Version 1 and Version 2 of Internal/WiMAX/AggMgr/ogs_wimaxvm
- Timestamp:
- Nov 15, 2009, 7:07:58 PM (15 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Internal/WiMAX/AggMgr/ogs_wimaxvm
v1 v2 8 8 9 9 {{{ 10 root@cons-wm-02:/usr/lib/ruby/1.8/omf-aggmgr/ogs_wimaxvm 11 10 12 <?xml version='1.0'?> 11 <services><serviceGroup name='wimaxcl' prefix='/wimaxcl'> 12 <info>Service to start,stop and create a Virtual machine</info> 13 <services><serviceGroup name='wimaxvm' prefix='/wimaxvm'><info>Service to control virtual machines</info> 13 14 14 <service name='addclient'><info>Service to Add a wimax client</info><args><arg name='vmname' isRequired='true' value='vmname'><info>Name of the virtual machine</info></arg><arg name='clientmac' isRequired='true' value='clientmac'><info>MAC address of the client</info></arg></args></service> 15 <service name='addclient'> 16 <info>Service to Add a wimax client</info><args><arg name='clientmac' isRequired='true' value='clientmac'><info>MAC address of the client</info></arg><arg name='vmname' isRequired='true' value='vmname'><info>Name of the virtual machine</info></arg></args></service> 15 17 16 <service name='create'><info>Service to create a VM</info><args><arg name='vmname' isRequired='true' value='vmname'><info>Name of the virtual machine</info></arg><arg name='mac' isRequired='true' value='mac'><info>MAC address of the vm</info></arg><arg name='ip' isRequired='true' value='ip'><info>IP address of the vm</info></arg></args></service> 18 <service name='create'> 19 <info>Service to create a VM</info><args><arg name='mac' isRequired='true' value='mac'><info>MAC address of the vm</info></arg><arg name='ip' isRequired='true' value='ip'><info>IP address of the vm</info></arg><arg name='vmname' isRequired='true' value='vmname'><info>Name of the virtual machine</info></arg></args></service> 17 20 18 <service name='init'/><service name='start'><info>Service to start a VM</info><args><arg name='vmname' isRequired='true' value='vmname'><info>Name of the virtual machine</info></arg></args></service> 21 <service name='initvms'/><service name='start'><info>Service to start a VM</info><args><arg name='vmname' isRequired='true' value='vmname'><info>Name of the virtual machine</info></arg></args></service><service name='startshaping'><info>Service to start vnts controller</info> 22 </service> 19 23 20 <service name='stop'><info>Service to stop a VM</info><args><arg name='vmname' isRequired='true' value='vmname'><info>Name of the virtual machine</info></arg></args></service> 24 <service name='stop'> 25 <info>Service to stop a VM</info><args><arg name='vmname' isRequired='true' value='vmname'><info>Name of the virtual machine</info></arg></args> 26 </service><service name='stopshaping'><info>Stop shaping scrip 27 t</info></service><service name='vmlist'><info>List all VMs</info></service> 21 28 22 <service name='vmlist'><info>List all VMs</info></service>23 29 24 <service name='vmstat'><info>Service to query info from a VM</info><args><arg name='vmname' isRequired='true' value='vmname'><info>Name of the virtual machine</info></arg></args></service> 30 <service name='vmstat'> 31 <info>Service to query info from a VM</info><args><arg name='vmname' isRequired='true' value='vmname'><info>Name of the virtual machine</info></arg></args></service></serviceGroup></services> 25 32 26 </serviceGroup></services>27 33 }}} 28 34 29 === Example Outputs ===35 === Sample Queries and corresponding outputs === 30 36 37 1) To initialize the service. 38 - Checks for the number of running VMs, populates MAC list and also 39 assigns VLAN ids. 40 - Is also supposed to send the VLAN information to the server on ASN-GW 41 {{{ 42 43 wget http://wm-asngw-02:5012/wimaxvm/initvms 44 45 46 vm30 VLANid 7 mac address='52:52:52:52:52:52'/ 47 vm7 VLANid 2 mac address='52:54:00:1c:00:cb'/ 48 vm10 VLANid 6 mac address='54:52:00:2c:05:7a'/ 49 vm55 VLANid 3 mac address='01:23:45:67:89:ab'/ 50 vm57 VLANid 4 mac address='01:32:54:67:98:ba'/ 51 vm58 VLANid 5 mac address='01:65:23:67:98:ba'/ 52 vm5 VLANid 0 mac address='52:54:00:2a:85:b6'/ 53 vm6 VLANid 1 mac address='52:54:00:34:aa:a3'/ 54 }}} 55 56 57 2) Start VM 58 - Start vm, assign vlan tag and send info to server on ASNGW 59 - Socket part is yet to be integrated 60 {{{ 61 http://wm-asngw-02:5012/wimaxvm/start/?vmname=vm30 62 Domain vm30 started with vlan tag 9 63 }}} 64 65 66 3) Stop VM 67 - Similar to start VM, but does exactly the opposite 68 {{{ 69 http://wm-asngw-02:5012/wimaxvm/stop/?vmname=vm8 70 Domain vm8 destroyed 71 }}} 72 73 4) Get statistics about a VM 74 - Gets all relavent information for a particular VM name 75 {{{ 76 http://wm-asngw-02:5012/wimaxvm/vmstat/?vmname=vm8 77 <domain type='kvm' id='40'> 78 <name>vm30</name> 79 <uuid>94c79efa-01b1-64e7-3bd7-2baedd3cfb1a</uuid> 80 <memory>262144</memory> 81 <currentMemory>262144</currentMemory> 82 <vcpu>1</vcpu> 83 <os> 84 <type arch='i686' machine='pc'>hvm</type> 85 <boot dev='hd'/> 86 </os> 87 <features> 88 <acpi/> 89 </features> 90 <clock offset='utc'/> 91 <on_poweroff>destroy</on_poweroff> 92 <on_reboot>restart</on_reboot> 93 <on_crash>destroy</on_crash> 94 <devices> 95 <emulator>/usr/bin/kvm</emulator> 96 <disk type='file' device='disk'> 97 <source file='/home/native/vm30/disk0.qcow2'/> 98 <target dev='hda' bus='ide'/> 99 </disk> 100 <interface type='network'> 101 <mac address='52:52:52:52:52:52'/> 102 <source network='default'/> 103 <target dev='vnet6'/> 104 <model type='virtio'/> 105 </interface> 106 <input type='mouse' bus='ps2'/> 107 <graphics type='vnc' port='5905' autoport='yes' listen='127.0.0.1'/> 108 </devices> 109 </domain> 110 }}} 111 112 5) Get VM list 113 - Useful for an admin and gives a list of all VMs. 114 - Format is vmname, Vlanid, vm-mac-addr. 115 {{{ 116 http://wm-asngw-02:5012/wimaxvm/vmlist 117 118 vm30 VLANid 7 mac address='52:52:52:52:52:52'/ 119 vm7 VLANid 2 mac address='52:54:00:1c:00:cb'/ 120 vm10 VLANid 6 mac address='54:52:00:2c:05:7a'/ 121 vm55 VLANid 3 mac address='01:23:45:67:89:ab'/ 122 vm57 VLANid 4 mac address='01:32:54:67:98:ba'/ 123 vm58 VLANid 5 mac address='01:65:23:67:98:ba'/ 124 vm5 VLANid 0 mac address='52:54:00:2a:85:b6'/ 125 vm6 VLANid 1 mac address='52:54:00:34:aa:a3'/ 126 }}}