Changeset 1286

Show
Ignore:
Timestamp:
03/19/10 14:54:16 (23 months ago)
Author:
Gary
Message:

unxsVZ datacenter/vzImport.sh work continues;

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/tools/datacenter/vzImport.sh

    r1285 r1286  
    2323uCreatedBy=1; 
    2424#      CTID      NPROC STATUS  IP_ADDR         HOSTNAME                         
    25 #       181         48 running 174.121.136.100 ns1.ringcarrier.com   
     25#       181         48 running 174.34.136.100 ns1.singtone.com   
    2626vzlist -a  | \ 
    2727while read cvzlist 
     
    4242        echo cLabel=$cLabel; 
    4343        echo cHostname=$cHostname; 
    44         #uVeth=0; 
    45         #uIPv4= from select of first available tIP.uIP then we need to mark unavailble in 2nd query. 
     44        #uVeth=0; default is 0 so we can even omit this from insert query. 
     45        #uIPv4= from select Must preload tIP with the clone range from source unxsVZ db. 
     46        echo $cIP; 
    4647        #uOSTemplate from select. Must preload tOSTemplate from mysqldump of source unxsVZ db. 
    4748        echo cOSTemplate=$cOSTemplate; 
     
    6162        echo ""; 
    6263         
    63 #cQuery="INSERT INTO tContainer SET uContainer=$uContainer,cLabel='$cLabel',uIPv4=(SELECT uIP FROM tIP WHERE cLabel='$cIP'),uOSTemplate=(SELECT uOSTemplate FROM tOSTemplate WHERE cLabel='$cOSTemplate'),uConfig=(SELECT uConfig FROM tConfig WHERE cLabel='$cConfig',uNameserver=$uNameserver,uSearchdomain=(SELECT uSearchdomain FROM tSearchdomain WHERE cLabel='$cSearchdomain',uDatacenter=$uDatacenter,uNode=$uNode,uStatus=$uStatus,uOwner=$uOwner,uCreatedBy=$uCreatedBy,uCreatedDate=UNIX_TIMESTAMP(NOW())"; 
     64#cQuery="INSERT INTO tContainer SET uContainer=$uContainer,cLabel='$cLabel',uIPv4=(SELECT uIP FROM tIP WHERE cLabel='$cIP' AND uAvailable=1),uOSTemplate=(SELECT uOSTemplate FROM tOSTemplate WHERE cLabel='$cOSTemplate'),uConfig=(SELECT uConfig FROM tConfig WHERE cLabel='$cConfig',uNameserver=$uNameserver,uSearchdomain=$uSearchdomain,uDatacenter=$uDatacenter,uNode=$uNode,uStatus=$uStatus,uOwner=$uOwner,uCreatedBy=$uCreatedBy,uCreatedDate=UNIX_TIMESTAMP(NOW())"; 
    6465#       echo $cQuery; 
    6566done