Changeset 230
- Timestamp:
- 11/13/08 17:21:17 (8 weeks ago)
- Location:
- one/trunk
- Files:
-
- 43 added
- 53 modified
- 3 copied
-
SConstruct (modified) (2 diffs)
-
include/Attribute.h (modified) (6 diffs)
-
include/DispatchManager.h (modified) (1 diff)
-
include/FixedLeases.h (added)
-
include/History.h (modified) (3 diffs)
-
include/Host.h (modified) (1 diff)
-
include/HostShare.h (modified) (1 diff)
-
include/Leases.h (added)
-
include/Nebula.h (modified) (6 diffs)
-
include/PoolSQL.h (modified) (2 diffs)
-
include/RangedLeases.h (added)
-
include/RequestManager.h (modified) (4 diffs)
-
include/Template.h (modified) (1 diff)
-
include/TemplateSQL.h (modified) (1 diff)
-
include/TransferManager.h (modified) (6 diffs)
-
include/TransferManagerDriver.h (added)
-
include/VirtualMachine.h (modified) (9 diffs)
-
include/VirtualNetwork.h (added)
-
include/VirtualNetworkPool.h (added)
-
include/VirtualNetworkTemplate.h (copied) (copied from one/trunk/src/vm/VirtualMachineTemplate.cc) (1 diff)
-
install.sh (modified) (4 diffs)
-
share/etc/oned.conf (modified) (3 diffs)
-
share/examples/private.net (added)
-
share/examples/public.net (added)
-
share/examples/vm.schema (modified) (1 diff)
-
share/examples/vm.template (modified) (1 diff)
-
src/client/ruby/client_utilities.rb (modified) (1 diff)
-
src/client/ruby/one.rb (modified) (13 diffs)
-
src/client/ruby/onehost (modified) (11 diffs)
-
src/client/ruby/onenetwork (added)
-
src/client/ruby/onevm (modified) (18 diffs)
-
src/common/Attribute.cc (modified) (2 diffs)
-
src/dm/DispatchManagerActions.cc (modified) (3 diffs)
-
src/dm/DispatchManagerStates.cc (modified) (3 diffs)
-
src/host/Host.cc (modified) (5 diffs)
-
src/host/HostPool.cc (modified) (1 diff)
-
src/host/HostShare.cc (modified) (6 diffs)
-
src/im_mad/im_ssh/one_im_ssh.rb (modified) (5 diffs)
-
src/lcm/LifeCycleActions.cc (modified) (2 diffs)
-
src/lcm/LifeCycleStates.cc (modified) (8 diffs)
-
src/mad/ruby/ThreadScheduler.rb (added)
-
src/mad/ruby/one_mad.rb (modified) (5 diffs)
-
src/mad/ruby/one_ssh.rb (modified) (10 diffs)
-
src/nebula/Nebula.cc (modified) (7 diffs)
-
src/nebula/NebulaTemplate.cc (modified) (2 diffs)
-
src/nebula/SConstruct (modified) (4 diffs)
-
src/rm/RequestManager.cc (modified) (2 diffs)
-
src/rm/RequestManagerDeploy.cc (modified) (1 diff)
-
src/rm/RequestManagerMigrate.cc (modified) (1 diff)
-
src/rm/RequestManagerVirtualNetworkAllocate.cc (copied) (copied from one/trunk/src/vm/VirtualMachinePool.cc) (1 diff)
-
src/rm/RequestManagerVirtualNetworkDelete.cc (added)
-
src/rm/RequestManagerVirtualNetworkInfo.cc (added)
-
src/rm/SConstruct (modified) (1 diff)
-
src/scheduler/SConstruct (modified) (1 diff)
-
src/template/Template.cc (modified) (2 diffs)
-
src/template/TemplateSQL.cc (modified) (1 diff)
-
src/tm/SConstruct (modified) (1 diff)
-
src/tm/TransferManager.cc (modified) (7 diffs)
-
src/tm/TransferManagerDriver.cc (added)
-
src/tm_mad (added)
-
src/tm_mad/TMScript.rb (added)
-
src/tm_mad/nfs (added)
-
src/tm_mad/nfs/tm_clone.sh (added)
-
src/tm_mad/nfs/tm_delete.sh (added)
-
src/tm_mad/nfs/tm_ln.sh (added)
-
src/tm_mad/nfs/tm_mkimage.sh (added)
-
src/tm_mad/nfs/tm_mkswap.sh (added)
-
src/tm_mad/nfs/tm_mv.sh (added)
-
src/tm_mad/nfs/tm_nfs.conf (added)
-
src/tm_mad/nfs/tm_nfsrc (added)
-
src/tm_mad/one_tm (added)
-
src/tm_mad/one_tm.rb (added)
-
src/tm_mad/ssh (added)
-
src/tm_mad/ssh/tm_clone.sh (added)
-
src/tm_mad/ssh/tm_delete.sh (added)
-
src/tm_mad/ssh/tm_ln.sh (added)
-
src/tm_mad/ssh/tm_mkimage.sh (added)
-
src/tm_mad/ssh/tm_mkswap.sh (added)
-
src/tm_mad/ssh/tm_mv.sh (added)
-
src/tm_mad/ssh/tm_ssh.conf (added)
-
src/tm_mad/ssh/tm_sshrc (added)
-
src/tm_mad/tm_common.sh (added)
-
src/vm/History.cc (modified) (12 diffs)
-
src/vm/VirtualMachine.cc (modified) (15 diffs)
-
src/vm/VirtualMachinePool.cc (modified) (2 diffs)
-
src/vm/VirtualMachineTemplate.cc (modified) (1 diff)
-
src/vmm/LibVirtDriver.cc (modified) (5 diffs)
-
src/vmm/VirtualMachineManager.cc (modified) (3 diffs)
-
src/vmm/VirtualMachineManagerDriver.cc (modified) (1 diff)
-
src/vmm/XenDriver.cc (modified) (5 diffs)
-
src/vmm_mad/xen/one_vmm_xen.rb (modified) (6 diffs)
-
src/vnm (added)
-
src/vnm/FixedLeases.cc (added)
-
src/vnm/Leases.cc (added)
-
src/vnm/RangedLeases.cc (added)
-
src/vnm/SConstruct (added)
-
src/vnm/VirtualNetwork.cc (added)
-
src/vnm/VirtualNetworkPool.cc (added)
-
src/vnm/VirtualNetworkTemplate.cc (copied) (copied from one/trunk/src/vm/VirtualMachineTemplate.cc) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
one/trunk/SConstruct
r164 r230 36 36 cwd+'/src/im', 37 37 cwd+'/src/rm', 38 cwd+'/src/vnm', 38 39 ]) 39 40 … … 104 105 'src/im/SConstruct', 105 106 'src/dm/SConstruct', 106 'src/scheduler/SConstruct', 107 'src/scheduler/SConstruct', 108 'src/vnm/SConstruct', 107 109 ] 108 110 -
one/trunk/include/Attribute.h
r110 r230 34 34 public: 35 35 36 Attribute( string& aname):attribute_name(aname)36 Attribute(const string& aname):attribute_name(aname) 37 37 { 38 38 transform ( … … 78 78 * Builds a new attribute from a string. 79 79 */ 80 virtual void unmarshall( string& sattr) = 0;80 virtual void unmarshall(const string& sattr) = 0; 81 81 82 82 /** … … 105 105 public: 106 106 107 SingleAttribute( string& name):Attribute(name){};108 109 SingleAttribute( string& name,string& value):107 SingleAttribute(const string& name):Attribute(name){}; 108 109 SingleAttribute(const string& name, const string& value): 110 110 Attribute(name),attribute_value(value){}; 111 111 112 SingleAttribute(const char * name, string& value):112 SingleAttribute(const char * name, const string& value): 113 113 Attribute(name),attribute_value(value){}; 114 114 … … 140 140 * Builds a new attribute from a string. 141 141 */ 142 void unmarshall( string& sattr)142 void unmarshall(const string& sattr) 143 143 { 144 144 attribute_value = sattr; 145 145 }; 146 146 147 /** 148 * Replaces the attribute value from a string. 149 */ 150 void replace(const string& sattr) 151 { 152 attribute_value = sattr; 153 }; 154 147 155 /** 148 156 * Returns the attribute type … … 170 178 public: 171 179 172 VectorAttribute( string& name):Attribute(name){};173 174 VectorAttribute( string& name,map<string,string>& value):180 VectorAttribute(const string& name):Attribute(name){}; 181 182 VectorAttribute(const string& name,const map<string,string>& value): 175 183 Attribute(name),attribute_value(value){}; 176 184 … … 202 210 * "VAL_NAME_1=VAL_VALUE_1,...,VAL_NAME_N=VAL_VALUE_N". 203 211 */ 204 void unmarshall(string& sattr); 212 void unmarshall(const string& sattr); 213 214 /** 215 * Replace the value of the given attribute with the provided map 216 */ 217 void replace(const map<string,string>& attr); 218 205 219 206 220 /** -
one/trunk/include/DispatchManager.h
r88 r230 215 215 216 216 /** 217 * Pointer to the HostPool, to access hosts217 * Pointer to the Virtual Machine Pool, to access hosts 218 218 */ 219 219 VirtualMachinePool * vmpool; -
one/trunk/include/History.h
r10 r230 67 67 enum ColNames 68 68 { 69 OID = 0,69 VID = 0, 70 70 SEQ = 1, 71 71 HOSTNAME = 2, … … 116 116 117 117 string hostname; 118 string vm_ rdir;118 string vm_dir; 119 119 120 120 int hid; … … 139 139 //Non-persistent history fields 140 140 string vm_lhome; 141 string transfer_file; 142 string deployment_file; 143 141 144 string vm_rhome; 142 143 string deployment_lfile;144 string deployment_rfile;145 146 145 string checkpoint_file; 147 146 string rdeployment_file; 147 148 148 friend int history_select_cb ( 149 149 void * _history, -
one/trunk/include/Host.h
r9 r230 426 426 enum ColNames 427 427 { 428 HID = 0,428 OID = 0, 429 429 HOST_NAME = 1, 430 430 STATE = 2, -
one/trunk/include/HostShare.h
r2 r230 172 172 enum ColNames 173 173 { 174 H SID= 0,174 HID = 0, 175 175 ENDPOINT = 1, 176 176 DISK_USAGE = 2, -
one/trunk/include/Nebula.h
r3 r230 25 25 26 26 #include "VirtualMachinePool.h" 27 #include "VirtualNetworkPool.h" 27 28 #include "HostPool.h" 28 29 … … 88 89 return hpool; 89 90 }; 91 92 VirtualNetworkPool * get_vnpool() 93 { 94 return vnpool; 95 }; 90 96 91 97 // -------------------------------------------------------------- … … 122 128 // -------------------------------------------------------------- 123 129 124 string& get_nebula_location()130 const string& get_nebula_location() 125 131 { 126 132 return nebula_location; 127 133 }; 128 134 135 136 const string& get_nebula_hostname() 137 { 138 return hostname; 139 }; 140 129 141 static string version() 130 142 { 131 return "ONE 0.1";143 return "ONE1.1"; 132 144 }; 133 145 … … 149 161 // ----------------------------------------------------------------------- 150 162 151 Nebula():nebula_configuration(0),db(0),vmpool(0),hpool(0), lcm(0),163 Nebula():nebula_configuration(0),db(0),vmpool(0),hpool(0),vnpool(0),lcm(0), 152 164 vmm(0),im(0),tm(0),dm(0),rm(0){}; 153 165 … … 214 226 215 227 string nebula_location; 228 string hostname; 216 229 217 230 // --------------------------------------------------------------- … … 225 238 // --------------------------------------------------------------- 226 239 227 SqliteDB *db;240 SqliteDB * db; 228 241 VirtualMachinePool * vmpool; 229 HostPool * hpool; 242 HostPool * hpool; 243 VirtualNetworkPool * vnpool; 230 244 231 245 // --------------------------------------------------------------- -
one/trunk/include/PoolSQL.h
r2 r230 157 157 158 158 /** 159 * The pool is implemented with a Map ,of SQL object pointers, using the159 * The pool is implemented with a Map of SQL object pointers, using the 160 160 * OID as key. 161 161 */ … … 176 176 /** 177 177 * FIFO-like replacement policy function. Before removing an object (pop) 178 * from the cache it 's lock is checked. The object is removed only if178 * from the cache its lock is checked. The object is removed only if 179 179 * the associated mutex IS NOT blocked. Otherwise the oid is sent to the 180 180 * back of the queue. -
one/trunk/include/RequestManager.h
r104 r230 22 22 #include "VirtualMachinePool.h" 23 23 #include "HostPool.h" 24 24 #include "VirtualNetworkPool.h" 25 25 26 26 #include <xmlrpc-c/base.hpp> … … 41 41 VirtualMachinePool * _vmpool, 42 42 HostPool * _hpool, 43 VirtualNetworkPool * _vnpool, 43 44 int _port, 44 45 string _xml_log_file) 45 :vmpool(_vmpool),hpool(_hpool), port(_port),socket_fd(-1),46 :vmpool(_vmpool),hpool(_hpool),vnpool(_vnpool),port(_port),socket_fd(-1), 46 47 xml_log_file(_xml_log_file) 47 48 { … … 99 100 100 101 /** 102 * Pointer to the VM Pool, to access Virtual Machines 103 */ 104 VirtualMachinePool * vmpool; 105 106 /** 101 107 * Pointer to the Host Pool, to access hosts 102 108 */ 103 VirtualMachinePool * vmpool;104 105 /**106 * Pointer to the Host Pool, to access hosts107 */108 109 HostPool * hpool; 110 111 /** 112 * Pointer to the VN Pool, to access Virtual Netowrks 113 */ 114 VirtualNetworkPool * vnpool; 109 115 110 116 /** … … 353 359 HostPool * hpool; 354 360 355 }; 361 }; 362 363 /* ---------------------------------------------------------------------- */ 364 /* Virtual Network Interface */ 365 /* ---------------------------------------------------------------------- */ 366 367 368 class VirtualNetworkAllocate: public xmlrpc_c::method 369 { 370 public: 371 VirtualNetworkAllocate(VirtualNetworkPool * _vnpool):vnpool(_vnpool) 372 { 373 _signature="A:ss"; 374 _help="Creates a virtual network"; 375 }; 376 377 ~VirtualNetworkAllocate(){}; 378 379 void execute( 380 xmlrpc_c::paramList const& paramList, 381 xmlrpc_c::value * const retvalP); 382 383 private: 384 VirtualNetworkPool * vnpool; 385 }; 386 387 /* ---------------------------------------------------------------------- */ 388 389 class VirtualNetworkInfo: public xmlrpc_c::method 390 { 391 public: 392 VirtualNetworkInfo(VirtualNetworkPool * _vnpool):vnpool(_vnpool) 393 { 394 _signature="A:si"; 395 _help="Returns virtual network information"; 396 }; 397 398 ~VirtualNetworkInfo(){}; 399 400 void execute( 401 xmlrpc_c::paramList const& paramList, 402 xmlrpc_c::value * const retvalP); 403 404 private: 405 VirtualNetworkPool * vnpool; 406 407 }; 408 409 /* ---------------------------------------------------------------------- */ 410 411 class VirtualNetworkDelete: public xmlrpc_c::method 412 { 413 public: 414 VirtualNetworkDelete(VirtualNetworkPool * _vnpool):vnpool(_vnpool) 415 { 416 _signature="A:si"; 417 _help="Deletes a virtual network"; 418 }; 419 420 ~VirtualNetworkDelete(){}; 421 422 void execute( 423 xmlrpc_c::paramList const& paramList, 424 xmlrpc_c::value * const retvalP); 425 426 private: 427 VirtualNetworkPool * vnpool; 428 429 }; 356 430 }; 357 431 -
one/trunk/include/Template.h
r3 r230 97 97 */ 98 98 virtual int get( 99 string& name,99 const string& name, 100 100 vector<const Attribute*>& values) const; 101 102 /** 103 * Gets all the attributes with the given name, non-const version 104 * @param name the attribute name. 105 * @returns the number of elements in the vector 106 */ 107 virtual int get( 108 const string& name, 109 vector<Attribute*>& values); 101 110 102 111 /** -
one/trunk/include/TemplateSQL.h
r65 r230 93 93 * @param value of the new attribute. 94 94 */ 95 int replace_attribute(SqliteDB * db, string& name, string& value); 95 int replace_attribute(SqliteDB * db, const string& name, const string& value); 96 96 97 }; 97 98 -
one/trunk/include/TransferManager.h
r2 r230 23 23 #include "VirtualMachinePool.h" 24 24 #include "LifeCycleManager.h" 25 #include "TransferManagerDriver.h" 25 26 26 27 using namespace std; … … 33 34 34 35 TransferManager( 35 VirtualMachinePool * pool, 36 VirtualMachinePool * _vmpool, 37 HostPool * _hpool, 36 38 vector<const Attribute*>& _mads): 37 39 MadManager(_mads), 38 hpool(pool) 40 vmpool(_vmpool), 41 hpool(_hpool) 39 42 { 40 43 am.addListener(this); … … 46 49 { 47 50 PROLOG, 51 PROLOG_MIGR, 52 PROLOG_RESUME, 48 53 EPILOG, 54 EPILOG_STOP, 49 55 CHECKPOINT, 50 56 FINALIZE … … 76 82 * sudo application. 77 83 */ 78 void load_mads(int uid) {};84 void load_mads(int uid); 79 85 80 86 /** … … 94 100 95 101 /** 96 * Pointer to the V M Pool, to access virtual machines102 * Pointer to the Virtual Machine Pool, to access VMs 97 103 */ 98 VirtualMachinePool * hpool; 104 VirtualMachinePool * vmpool; 105 106 /** 107 * Pointer to the Host Pool, to access hosts 108 */ 109 HostPool * hpool; 99 110 100 111 /** 101 112 * Action engine for the Manager 102 113 */ 103 ActionManager am;114 ActionManager am; 104 115 116 /** 117 * Returns a pointer to a Transfer Manager driver. 118 * @param uid of the owner of the driver 119 * @param name of an attribute of the driver (e.g. its type) 120 * @param value of the attribute 121 * @return the TM driver owned by uid with attribute name equal to value 122 * or 0 in not found 123 */ 124 const TransferManagerDriver * get( 125 int uid, 126 const string& name, 127 const string& value) 128 { 129 return static_cast<const TransferManagerDriver *> 130 (MadManager::get(uid,name,value)); 131 }; 132 133 /** 134 * Returns a pointer to a Transfer Manager driver. The driver is 135 * searched by its name.
