Changeset 96980ce


Ignore:
Timestamp:
07/28/15 10:07:26 (5 weeks ago)
Author:
Ken Moore <moorekou@…>
Branches:
master, releng/10.2
Children:
b3e548b
Parents:
5ff1585c
Message:

Add a new "installed" value for jails which will list the pbicage origin, also update the "jail cages" output so every jail now returns both <origin> and <ID> for the jail (space delimited).

Location:
src-sh/syscache
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src-sh/syscache/client/main.cpp

    rc35eaf9 r96980ce  
    2525  \"WID\":      Get the iocage jail ID #\n\ 
    2626  \"tag\":      Get the iocage jail tag\n\ 
     27  \"installed\": Get the origin of the installed pbicage\n\ 
    2728  \"ipv4\":     Get the jail ipv4 address setting\n\ 
    2829  \"alias-ipv4\":       Get the jail ipv4 alias setting\n\ 
  • src-sh/syscache/daemon/DB.cpp

    r5ff1585c r96980ce  
    926926      else if(tmp[j].startsWith("type:")){ TYPE = val; } 
    927927    } 
     928      QString inst = TAG.section("pbicage-",1,10); //installed cage for this jail 
     929      //Need to replace the first "-" in the tag with a "/" (category/name format, but name might have other "-" in it) 
     930      int catdash = inst.indexOf("-"); 
     931      if(catdash>0){ inst = inst.replace(catdash,1,"/"); } 
     932       
    928933      //Save this info into the hash 
    929934      QString prefix = "Jails/"+HOST+"/"; 
     
    932937      HASH->insert(prefix+"WID", ID); //iocage ID 
    933938      HASH->insert(prefix+"tag",TAG); //iocage tag 
     939      HASH->insert(prefix+"installed", inst); //Installed pbicage origin 
    934940      HASH->insert(prefix+"iocage-all",tmp.join("<br>") ); 
    935941      HASH->insert(prefix+"ipv4", IPV4); 
     
    956962      QString hasup = "false"; //TO-DO 
    957963      HASH->insert(prefix+"hasupdates", hasup); 
    958       QString inst = TAG.section("pbicage-",1,10); 
    959       //Need to replace the first "-" in the tag with a "/" (category/name format, but name might have other "-" in it) 
    960       int catdash = inst.indexOf("-"); 
    961       if(catdash>0){ inst = inst.replace(catdash,1,"/"); } 
    962       installedcages << inst; 
     964 
     965      installedcages << inst+" "+ID; 
    963966  } 
    964967  HASH->insert("StoppedJailList",inactive.join(LISTDELIMITER)); 
Note: See TracChangeset for help on using the changeset viewer.