IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Sep 23, 2009, 10:22:33 AM (17 years ago)
Author:
bills
Message:

In distribution server merge rcDSProduct into rcDestination. It was illogical for
a product to be shared by multiple destinations.
In defineinterest define by query to allow destination names and target parameters
to be used. Much more administrator friendly.
Add a label to pstampRequest. Not used yet.
Split reverting of faults in distRuns from faults building components.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippTools/src/disttoolConfig.c

    r25429 r25493  
    111111    psMetadataAddS32(addprocessedcomponentArgs, PS_LIST_TAIL, "-fault", 0, "define fault code", 0);
    112112
     113    // -revertcomponent
     114    psMetadata *revertcomponentArgs = psMetadataAlloc();
     115    psMetadataAddS64(revertcomponentArgs, PS_LIST_TAIL, "-dist_id", 0, "define dist_id", 0);
     116    psMetadataAddStr(revertcomponentArgs, PS_LIST_TAIL, "-component", 0, "define component", NULL);
     117    psMetadataAddStr(revertcomponentArgs, PS_LIST_TAIL, "-stage",    0, "define stage", NULL);
     118    psMetadataAddS64(revertcomponentArgs, PS_LIST_TAIL, "-stage_id", 0, "define stage_id", 0);
     119    psMetadataAddStr(revertcomponentArgs, PS_LIST_TAIL, "-state",    0, "define state", NULL);
     120    psMetadataAddStr(revertcomponentArgs, PS_LIST_TAIL, "-label",    0, "define label", NULL);
     121    psMetadataAddS16(revertcomponentArgs, PS_LIST_TAIL, "-fault", 0, "define fault code", 0);
     122    psMetadataAddBool(revertcomponentArgs, PS_LIST_TAIL, "-all",    0, "revert all faulted runs", NULL);
     123
    113124    // -processedcomponent
    114125    psMetadata *processedcomponentArgs = psMetadataAlloc();
     
    189200    psMetadataAddBool(revertrcrunArgs, PS_LIST_TAIL, "-all",     0, "revert all faulted runs", NULL);
    190201
    191     // -definedsproduct
    192     psMetadata *definedsproductArgs = psMetadataAlloc();
    193     psMetadataAddStr(definedsproductArgs, PS_LIST_TAIL, "-name",  0, "define product name", NULL);
    194     psMetadataAddStr(definedsproductArgs, PS_LIST_TAIL, "-ds_dbname",0, "define data store database name", NULL);
    195     psMetadataAddStr(definedsproductArgs, PS_LIST_TAIL, "-ds_dbhost",0, "define data store database host", NULL);
    196 
    197     // -updatedsproduct
    198     // does this mode make sense?
    199     psMetadata *updatedsproductArgs = psMetadataAlloc();
    200     psMetadataAddS64(updatedsproductArgs, PS_LIST_TAIL, "-prod_id",   0, "select by prod_id", 0);
    201     // can't select by name because it isn't necssarily unique
    202     psMetadataAddStr(updatedsproductArgs, PS_LIST_TAIL, "-ds_dbname",0, "define data store database name", NULL);
    203     psMetadataAddStr(updatedsproductArgs, PS_LIST_TAIL, "-ds_dbhost",0, "define data store database host", NULL);
    204 
    205202    // -definedestination
    206203    psMetadata *definedestinationArgs = psMetadataAlloc();
    207     psMetadataAddS64(definedestinationArgs, PS_LIST_TAIL, "-prod_id",     0, "define prod_id (required)", 0);
    208204    psMetadataAddStr(definedestinationArgs, PS_LIST_TAIL, "-name",        0, "define destination name (required)", NULL);
     205    psMetadataAddStr(definedestinationArgs, PS_LIST_TAIL, "-ds_dbname",0, "define data store database name (required)", NULL);
     206    psMetadataAddStr(definedestinationArgs, PS_LIST_TAIL, "-ds_dbhost",0, "define data store database host (required)", NULL);
    209207    psMetadataAddStr(definedestinationArgs, PS_LIST_TAIL, "-status_uri",  0, "define status_uri", NULL);
    210208    psMetadataAddStr(definedestinationArgs, PS_LIST_TAIL, "-comment",     0, "define comment", NULL);
     
    215213    psMetadata *updatedestinationArgs = psMetadataAlloc();
    216214    psMetadataAddS64(updatedestinationArgs, PS_LIST_TAIL, "-dest_id",     0, "define dest_id", 0);
    217     psMetadataAddS64(updatedestinationArgs, PS_LIST_TAIL, "-prod_id",     0, "define prod_id", 0);
    218215    psMetadataAddStr(updatedestinationArgs, PS_LIST_TAIL, "-name",        0, "define destination name", NULL);
    219216    psMetadataAddStr(updatedestinationArgs, PS_LIST_TAIL, "-status_uri",  0, "define status_uri", NULL);
    220217    psMetadataAddStr(updatedestinationArgs, PS_LIST_TAIL, "-comment",     0, "define comment", NULL);
    221 //  last_fileset gets updated by -updatercrun
    222 //  psMetadataAddStr(updatedestinationArgs, PS_LIST_TAIL, "-set_last_fileset",0, "define last_fileset", NULL);
    223218    psMetadataAddStr(updatedestinationArgs, PS_LIST_TAIL, "-set_state",   0, "define state", NULL);
    224219
     
    254249    // -defineinterest
    255250    psMetadata *defineinterestArgs = psMetadataAlloc();
    256     psMetadataAddS64(defineinterestArgs, PS_LIST_TAIL, "-dest_id",   0, "define dest_id (required)", 0);
    257     psMetadataAddS64(defineinterestArgs, PS_LIST_TAIL, "-target_id", 0, "define target_id (required)", 0);
     251    psMetadataAddS64(defineinterestArgs, PS_LIST_TAIL, "-dest_id",   0, "define dest_id", 0);
     252    psMetadataAddStr(defineinterestArgs, PS_LIST_TAIL, "-dest_name", 0, "define destination name (LIKE comparison)", NULL);
     253    psMetadataAddS64(defineinterestArgs, PS_LIST_TAIL, "-target_id", 0, "define target_id", 0);
     254    psMetadataAddStr(defineinterestArgs, PS_LIST_TAIL, "-stage",     0, "define stage", NULL);
     255    psMetadataAddStr(defineinterestArgs, PS_LIST_TAIL, "-label",     0, "define label", NULL);
     256    psMetadataAddStr(defineinterestArgs, PS_LIST_TAIL, "-filter",    0, "define filter (LIKE comparison)", NULL);
     257    psMetadataAddBool(defineinterestArgs, PS_LIST_TAIL,"-clean",     0, "list clean targets", false);
    258258    psMetadataAddStr(defineinterestArgs, PS_LIST_TAIL, "-set_state", 0, "define state", NULL);
     259    psMetadataAddU64(defineinterestArgs, PS_LIST_TAIL, "-limit",     0, "limit number of targets listed to N", 0);
    259260
    260261    // -updateinterest
     
    265266    psMetadataAddStr(updateinterestArgs, PS_LIST_TAIL, "-set_state", 0, "define state (required)", NULL);
    266267
     268    // -listinterest
     269    psMetadata *listinterestArgs = psMetadataAlloc();
     270    psMetadataAddS64(listinterestArgs, PS_LIST_TAIL, "-target_id", 0, "list interests with target_id", 0);
     271    psMetadataAddS64(listinterestArgs, PS_LIST_TAIL, "-dest_id", 0, "list interests with dest_id", 0);
     272    psMetadataAddS64(listinterestArgs, PS_LIST_TAIL, "-int_id", 0, "list interests with int_id", 0);
     273    psMetadataAddStr(listinterestArgs, PS_LIST_TAIL, "-dest_name",  0, "list interests for destinationn name)", NULL);
     274    psMetadataAddStr(listinterestArgs, PS_LIST_TAIL, "-label",  0, "list interests for label (LIKE comparison)", NULL);
     275    psMetadataAddStr(listinterestArgs, PS_LIST_TAIL, "-filter",    0, "list interests by filter (LIKE comparison)", NULL);
     276    psMetadataAddStr(listinterestArgs, PS_LIST_TAIL, "-stage",     0, "list interests for stage", NULL);
     277    psMetadataAddBool(listinterestArgs, PS_LIST_TAIL,"-clean",     0, "list clean interests", false);
     278    psMetadataAddBool(listinterestArgs, PS_LIST_TAIL,"-full",      0, "list full interests", false);
     279    psMetadataAddStr(listinterestArgs, PS_LIST_TAIL, "-state",     0, "list interests in state", NULL);
     280    psMetadataAddU64(listinterestArgs, PS_LIST_TAIL, "-limit",     0, "limit number of interests listed to N", 0);
     281    psMetadataAddBool(listinterestArgs, PS_LIST_TAIL, "-simple",  0, "use the simple output format", false);
     282
    267283    psMetadata *argSets = psMetadataAlloc();
    268284    psMetadata *modes = psMetadataAlloc();
     
    272288    PXOPT_ADD_MODE("-updaterun",    "", DISTTOOL_MODE_UPDATERUN, updaterunArgs);
    273289    PXOPT_ADD_MODE("-revertrun",    "", DISTTOOL_MODE_REVERTRUN, revertrunArgs);
    274     PXOPT_ADD_MODE("-pendingcomponent",       "", DISTTOOL_MODE_PENDINGCOMPONENT,    pendingcomponentArgs);
    275     PXOPT_ADD_MODE("-addprocessedcomponent",      "", DISTTOOL_MODE_ADDPROCESSEDCOMPONENT, addprocessedcomponentArgs);
     290    PXOPT_ADD_MODE("-pendingcomponent",   "", DISTTOOL_MODE_PENDINGCOMPONENT,    pendingcomponentArgs);
     291    PXOPT_ADD_MODE("-addprocessedcomponent", "", DISTTOOL_MODE_ADDPROCESSEDCOMPONENT, addprocessedcomponentArgs);
     292    PXOPT_ADD_MODE("-revertcomponent",    "", DISTTOOL_MODE_REVERTCOMPONENT, revertcomponentArgs);
    276293    PXOPT_ADD_MODE("-processedcomponent", "", DISTTOOL_MODE_PROCESSEDCOMPONENT, processedcomponentArgs);
    277294    PXOPT_ADD_MODE("-toadvance",          "", DISTTOOL_MODE_TOADVANCE, toadvanceArgs);
     
    284301    PXOPT_ADD_MODE("-pendingdest",        "", DISTTOOL_MODE_PENDINGDEST, pendingdestArgs);
    285302
    286     PXOPT_ADD_MODE("-definedsproduct",    "", DISTTOOL_MODE_DEFINEDSPRODUCT, definedsproductArgs);
    287     PXOPT_ADD_MODE("-updatedsproduct",    "", DISTTOOL_MODE_UPDATEDSPRODUCT, updatedsproductArgs);
    288 //  PXOPT_ADD_MODE("-listdsproduct",      "", DISTTOOL_MODE_LISTDSPRODUCT, updatedsproductArgs);
    289 
    290303    PXOPT_ADD_MODE("-definedestination",  "", DISTTOOL_MODE_DEFINEDESTINATION, definedestinationArgs);
    291304    PXOPT_ADD_MODE("-updatedestination",  "", DISTTOOL_MODE_UPDATEDESTINATION, updatedestinationArgs);
     
    298311    PXOPT_ADD_MODE("-defineinterest",     "", DISTTOOL_MODE_DEFINEINTEREST, defineinterestArgs);
    299312    PXOPT_ADD_MODE("-updateinterest",     "", DISTTOOL_MODE_UPDATEINTEREST, updateinterestArgs);
    300 //  PXOPT_ADD_MODE("-listinterest",       "", DISTTOOL_MODE_LISTINTEREST, listinterestArgs);
     313    PXOPT_ADD_MODE("-listinterest",       "", DISTTOOL_MODE_LISTINTEREST, listinterestArgs);
    301314
    302315    if (!pxGetOptions(stderr, argc, argv, config, modes, argSets)) {
Note: See TracChangeset for help on using the changeset viewer.