Changeset 37833 for trunk/ippTools
- Timestamp:
- Jan 12, 2015, 12:53:36 PM (12 years ago)
- Location:
- trunk/ippTools
- Files:
-
- 12 edited
- 3 copied
-
share/Makefile.am (modified) (1 diff)
-
share/laptool_exposures.sql (modified) (1 prop)
-
share/pxadmin_create_tables.sql (modified) (1 diff)
-
share/remotetool_definebyquery_cam.sql (modified) (1 diff)
-
share/remotetool_definebyquery_chip.sql (modified) (2 diffs)
-
share/remotetool_definebyquery_stack.sql (modified) (1 diff)
-
share/remotetool_definebyquery_staticsky.sql (copied) (copied from branches/eam_branches/ipp-pv3-20140717-merge/ippTools/share/remotetool_definebyquery_staticsky.sql )
-
share/remotetool_definebyquery_warp.sql (modified) (1 diff)
-
share/remotetool_doneprep.sql (copied) (copied from branches/eam_branches/ipp-pv3-20140717-merge/ippTools/share/remotetool_doneprep.sql )
-
share/remotetool_listcomponent.sql (copied) (copied from branches/eam_branches/ipp-pv3-20140717-merge/ippTools/share/remotetool_listcomponent.sql )
-
src/remotetool.c (modified) (27 diffs)
-
src/remotetool.h (modified) (1 diff)
-
src/remotetoolConfig.c (modified) (6 diffs)
-
src/stacktool.c (modified) (1 prop)
-
src/stacktoolConfig.c (modified) (1 prop)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippTools/share/Makefile.am
r37551 r37833 524 524 remotetool_definebyquery_warp.sql \ 525 525 remotetool_definebyquery_stack.sql \ 526 remotetool_definebyquery_staticsky.sql \ 526 527 remotetool_dropcomponent.sql \ 528 remotetool_listcomponent.sql \ 529 remotetool_doneprep.sql \ 527 530 remotetool_updatepoll.sql -
trunk/ippTools/share/laptool_exposures.sql
- Property svn:mergeinfo set to
-
trunk/ippTools/share/pxadmin_create_tables.sql
r37769 r37833 2385 2385 remote_id BIGINT, 2386 2386 stage_id BIGINT, 2387 jobs INT 2388 state VARCHAR(64) NOT NULL, 2389 path_base VARCHAR(255), 2387 2390 KEY (stage_id), 2388 2391 FOREIGN KEY (remote_id) REFERENCES remoteRun(remote_id) -
trunk/ippTools/share/remotetool_definebyquery_cam.sql
r36968 r37833 11 11 LEFT JOIN 12 12 13 (SELECT remote_id,remoteRun.stage,remoteRun.label,remoteComponent.stage_id,remoteRun.state 14 FROM remoteRun 13 (SELECT remote_id,remoteRun.stage,remoteRun.label,remoteComponent.stage_id,remoteRun.state 14 FROM remoteRun 15 15 JOIN remoteComponent USING (remote_id) 16 16 WHERE 17 remoteRun.stage = 'camera' 17 remoteRun.stage = 'camera' and remoteComponent.state != 'retry' 18 18 -- where hook %s 19 19 ) AS R -
trunk/ippTools/share/remotetool_definebyquery_chip.sql
r36968 r37833 11 11 LEFT JOIN 12 12 13 (SELECT remote_id,remoteRun.stage,remoteRun.label,remoteComponent.stage_id,remoteRun.state 14 FROM remoteRun 13 (SELECT remote_id,remoteRun.stage,remoteRun.label,remoteComponent.stage_id,remoteRun.state 14 FROM remoteRun 15 15 JOIN remoteComponent USING (remote_id) 16 16 WHERE 17 remoteRun.stage = 'chip' 17 remoteRun.stage = 'chip' and remoteComponent.state != 'retry' 18 18 -- where hook %s 19 19 ) AS R … … 24 24 25 25 26 26 -
trunk/ippTools/share/remotetool_definebyquery_stack.sql
r36968 r37833 15 15 JOIN remoteComponent USING (remote_id) 16 16 WHERE 17 remoteRun.stage = 'stack' 17 remoteRun.stage = 'stack' and remoteComponent.state != 'retry' 18 18 -- where hook %s 19 19 ) AS R -
trunk/ippTools/share/remotetool_definebyquery_warp.sql
r36968 r37833 17 17 JOIN remoteComponent USING (remote_id) 18 18 WHERE 19 remoteRun.stage = 'warp' 19 remoteRun.stage = 'warp' and remoteComponent.state != 'retry' 20 20 -- where hook %s 21 21 ) AS R -
trunk/ippTools/src/remotetool.c
r37054 r37833 21 21 static bool listrunMode(pxConfig *config); 22 22 static bool listcomponentMode(pxConfig *config); 23 24 // list remoteRuns with all remoteComponents in state 'prep_done' or 'prep_fail' 25 static bool doneprepMode(pxConfig *config); 23 26 24 27 // Update … … 26 29 static bool updaterunMode(pxConfig *config); 27 30 static bool updatepollMode(pxConfig *config); 31 static bool updatecomponentMode(pxConfig *config); 28 32 static bool revertrunMode(pxConfig *config); 29 33 static bool revertauthMode(pxConfig *config); 34 static bool revertcomponentMode(pxConfig *config); 30 35 31 36 # define MODECASE(caseName, func) \ … … 47 52 48 53 switch (config->mode) { 49 MODECASE(REMOTETOOL_MODE_DEFINEBYQUERY, definebyqueryMode); 50 MODECASE(REMOTETOOL_MODE_LISTRUN, listrunMode); 51 MODECASE(REMOTETOOL_MODE_LISTCOMPONENT, listcomponentMode); 52 MODECASE(REMOTETOOL_MODE_DROPCOMPONENT, dropcomponentMode); 53 MODECASE(REMOTETOOL_MODE_UPDATERUN, updaterunMode); 54 MODECASE(REMOTETOOL_MODE_UPDATEPOLL, updatepollMode); 55 MODECASE(REMOTETOOL_MODE_REVERTRUN, revertrunMode); 56 MODECASE(REMOTETOOL_MODE_REVERTAUTH, revertauthMode); 54 MODECASE(REMOTETOOL_MODE_DEFINEBYQUERY, definebyqueryMode); 55 MODECASE(REMOTETOOL_MODE_LISTRUN, listrunMode); 56 MODECASE(REMOTETOOL_MODE_DONEPREP, doneprepMode); 57 MODECASE(REMOTETOOL_MODE_LISTCOMPONENT, listcomponentMode); 58 MODECASE(REMOTETOOL_MODE_DROPCOMPONENT, dropcomponentMode); 59 MODECASE(REMOTETOOL_MODE_UPDATERUN, updaterunMode); 60 MODECASE(REMOTETOOL_MODE_UPDATEPOLL, updatepollMode); 61 MODECASE(REMOTETOOL_MODE_UPDATECOMPONENT, updatecomponentMode); 62 MODECASE(REMOTETOOL_MODE_REVERTRUN, revertrunMode); 63 MODECASE(REMOTETOOL_MODE_REVERTAUTH, revertauthMode); 64 MODECASE(REMOTETOOL_MODE_REVERTCOMPONENT, revertcomponentMode); 57 65 58 66 default: … … 92 100 PXOPT_LOOKUP_BOOL(simple, config->args, "-simple", false); 93 101 PXOPT_LOOKUP_BOOL(pretend, config->args, "-pretend", false); 94 102 95 103 set_label = set_label ? set_label : label; 96 104 … … 105 113 return(false); 106 114 } 107 115 108 116 if (label) { 109 117 psStringAppend(&whereOption, "\n AND (label = '%s')", label); … … 116 124 return(false); 117 125 } 118 126 119 127 if (label) { 120 128 psStringAppend(&whereOption, "\n AND (label = '%s')", label); 121 129 } 122 } 130 } 123 131 else if (!strcmp(stage,"warp")) { 124 132 query = pxDataGet("remotetool_definebyquery_warp.sql"); … … 127 135 return(false); 128 136 } 129 137 130 138 if (label) { 131 139 // Because warp has to check to see if something other than the state is set correctly, I have to use this wonky way to pass the label in. … … 133 141 psStringAppend(&whereOption, "\n AND (label = '%s')", label); 134 142 } 135 } 143 } 136 144 else if (!strcmp(stage,"stack")) { 137 145 query = pxDataGet("remotetool_definebyquery_stack.sql"); … … 140 148 return(false); 141 149 } 142 150 143 151 if (label) { 144 152 psStringAppend(&whereOption, "\n AND (label = '%s')", label); 145 153 } 146 } 154 } 155 else if (!strcmp(stage,"staticsky")) { 156 query = pxDataGet("remotetool_definebyquery_staticsky.sql"); 157 if (!query) { 158 psError(PXTOOLS_ERR_SYS,false, "failed to retreive SQL statement"); 159 return(false); 160 } 161 162 if (label) { 163 psStringAppend(&whereOption, "\n AND (label = '%s')", label); 164 } 165 } 147 166 else { 148 167 psError(PS_ERR_UNKNOWN, true, "unknown value for stage: %s", stage); … … 191 210 // Insert the top level run object 192 211 remoteRunRow *run = remoteRunRowAlloc(0, // remote_id 193 "new", // state194 stage,195 set_label,196 path_base,197 -1, // job_id198 NULL, // last_poll199 0 // fault200 );212 "new", // state 213 stage, 214 set_label, 215 path_base, 216 -1, // job_id 217 NULL, // last_poll 218 0 // fault 219 ); 201 220 if (!run) { 202 psError(PS_ERR_UNKNOWN, false, "failed to alloc lapRun object");221 psError(PS_ERR_UNKNOWN, false, "failed to alloc remoteRun object"); 203 222 return(true); 204 223 } 205 224 206 225 if (!remoteRunInsertObject(config->dbh, run)) { 207 226 if (!psDBRollback(config->dbh)) { … … 213 232 } 214 233 psS64 remote_id = psDBLastInsertID(config->dbh); 215 234 216 235 psArray *list = psArrayAllocEmpty(limit); 217 236 for (long i=0; i < psArrayLength(output); i++) { … … 219 238 psS64 stage_id = psMetadataLookupS64(NULL, md, "stage_id"); 220 239 221 remoteComponentRow *comp = remoteComponentRowAlloc(remote_id, 222 stage_id); 240 remoteComponentRow *comp = remoteComponentRowAlloc(remote_id, stage_id, 0, "new", NULL); 223 241 if (!comp) { 224 psError(PS_ERR_UNKNOWN, false, "failed to alloc lapRunobject");242 psError(PS_ERR_UNKNOWN, false, "failed to alloc remoteComponent object"); 225 243 return(true); 226 244 } 227 245 228 246 if (!remoteComponentInsertObject(config->dbh, comp)) { 229 247 if (!psDBRollback(config->dbh)) { 230 psError(PS_ERR_UNKNOWN, false, "database error");248 psError(PS_ERR_UNKNOWN, false, "database error"); 231 249 } 232 250 psError(PS_ERR_UNKNOWN, false, "database error"); … … 237 255 psArrayAdd(list, list->n, comp); 238 256 psFree(comp); 239 257 240 258 } 241 259 psFree(run); … … 245 263 return false; 246 264 } 247 265 248 266 if (!remoteComponentPrintObjects(stdout, list, !simple)) { 249 267 if (!psDBRollback(config->dbh)) { … … 254 272 return false; 255 273 } 256 274 257 275 psFree(list); 258 276 psFree(output); 259 277 260 278 return true; 261 279 } … … 265 283 { 266 284 psMetadata *where = psMetadataAlloc(); 267 285 268 286 PXOPT_COPY_S64(config->args, where, "-remote_id", "remote_id", "=="); 269 287 PXOPT_COPY_STR(config->args, where, "-state", "state", "=="); … … 274 292 PXOPT_COPY_TIME(config->args, where, "-poll_begin", "last_poll", ">="); 275 293 PXOPT_COPY_TIME(config->args, where, "-poll_end", "last_poll", "<="); 276 294 277 295 PXOPT_COPY_S16(config->args, where, "-fault", "fault", "=="); 278 296 279 297 PXOPT_LOOKUP_S16(limit, config->args, "-limit", false, false); 280 298 PXOPT_LOOKUP_BOOL(simple, config->args, "-simple", false); 281 282 299 283 300 psArray *remRuns = NULL; 284 301 remRuns = psDBSelectRows(config->dbh, "remoteRun", where, limit); 285 302 286 303 if (!ippdbPrintMetadatas(stdout, remRuns, "remoteRun", !simple)) { 287 304 psError(PS_ERR_UNKNOWN, false, "failed to print array"); … … 299 316 300 317 PXOPT_COPY_S64(config->args, where, "-remote_id", "remote_id", "=="); 318 PXOPT_COPY_S64(config->args, where, "-stage_id", "stage_id", "=="); 319 PXOPT_COPY_S64(config->args, where, "-jobs", "jobs", "=="); 320 321 PXOPT_COPY_STR(config->args, where, "-state", "remoteComponent.state", "=="); 322 PXOPT_COPY_STR(config->args, where, "-label", "remoteRun.label", "=="); 323 301 324 PXOPT_LOOKUP_BOOL(simple, config->args, "-simple", false); 302 303 psArray *remComps = NULL; 304 remComps = psDBSelectRows(config->dbh, "remoteComponent", where, 0); 305 306 if (!ippdbPrintMetadatas(stdout, remComps, "remoteComponent", !simple)) { 325 PXOPT_LOOKUP_S16(limit, config->args, "-limit", false, false); 326 327 psString query = pxDataGet("remotetool_listcomponent.sql"); 328 if (!query) { 329 psError(PXTOOLS_ERR_SYS,false, "failed to retreive SQL statement"); 330 return(false); 331 } 332 333 if (psListLength(where->list)) { 334 psString whereClause = psDBGenerateWhereConditionSQL(where, NULL); 335 psStringAppend(&query, " WHERE %s", whereClause); 336 psFree(whereClause); 337 } 338 psFree(where); 339 340 if (limit) { 341 psString limitString = psDBGenerateLimitSQL(limit); 342 psStringAppend(&query, " %s", limitString); 343 psFree(limitString); 344 } 345 346 if (!p_psDBRunQuery(config->dbh, query)) { 347 psError(PS_ERR_UNKNOWN, false, "database error"); 348 psFree(query); 349 return false; 350 } 351 psFree(query); 352 353 psArray *output = p_psDBFetchResult(config->dbh); 354 if (!output) { 355 psError(PS_ERR_UNKNOWN, false, "database error"); 356 return false; 357 } 358 if (!psArrayLength(output)) { 359 psTrace("remotetool", PS_LOG_INFO, "no rows found"); 360 psFree(output); 361 return true; 362 } 363 364 if (!ippdbPrintMetadatas(stdout, output, "remoteComponent", !simple)) { 307 365 psError(PS_ERR_UNKNOWN, false, "failed to print array"); 308 psFree( remComps);309 return false; 310 } 311 psFree( remComps);366 psFree(output); 367 return false; 368 } 369 psFree(output); 312 370 313 371 return true; 314 372 } 315 373 374 // List 375 static bool doneprepMode(pxConfig *config) 376 { 377 psMetadata *where = psMetadataAlloc(); 378 379 PXOPT_COPY_S64(config->args, where, "-remote_id", "remote_id", "=="); 380 PXOPT_COPY_S64(config->args, where, "-job_id", "job_id", "=="); 381 382 PXOPT_COPY_STR(config->args, where, "-stage", "stage", "=="); 383 PXOPT_COPY_STR(config->args, where, "-state", "remoteRun.state", "=="); 384 PXOPT_COPY_STR(config->args, where, "-label", "label", "=="); 385 386 PXOPT_LOOKUP_S16(limit, config->args, "-limit", false, false); 387 PXOPT_LOOKUP_BOOL(simple, config->args, "-simple", false); 388 389 psString query = pxDataGet("remotetool_doneprep.sql"); 390 if (!query) { 391 psError(PXTOOLS_ERR_SYS,false, "failed to retreive SQL statement"); 392 return(false); 393 } 394 395 psString whereDone = NULL; 396 psString whereJobs = NULL; 397 if (psListLength(where->list)) { 398 psString whereClause = psDBGenerateWhereConditionSQL(where, NULL); 399 psStringAppend(&whereDone, " \n AND %s", whereClause); 400 psStringAppend(&whereJobs, " \n WHERE %s", whereClause); 401 psFree(whereClause); 402 } 403 404 if (limit) { 405 psString limitString = psDBGenerateLimitSQL(limit); 406 psStringAppend(&query, " %s", limitString); 407 psFree(limitString); 408 } 409 410 // fprintf (stderr, "query: %s\n", query); 411 // fprintf (stderr, "whereDone: %s\n", whereDone); 412 // fprintf (stderr, "whereJobs: %s\n", whereJobs); 413 414 if (!p_psDBRunQueryF(config->dbh, query, whereDone, whereJobs)) { 415 psError(PS_ERR_UNKNOWN, false, "database error"); 416 psFree(whereDone); 417 psFree(whereJobs); 418 psFree(query); 419 return false; 420 } 421 psFree(whereDone); 422 psFree(whereJobs); 423 psFree(query); 424 425 psArray *output = p_psDBFetchResult(config->dbh); 426 if (!output) { 427 psError(PS_ERR_UNKNOWN, false, "database error"); 428 return false; 429 } 430 if (!psArrayLength(output)) { 431 psTrace("remotetool", PS_LOG_INFO, "no rows found"); 432 psFree(output); 433 return true; 434 } 435 436 if (!ippdbPrintMetadatas(stdout, output, "remoteRun", !simple)) { 437 psError(PS_ERR_UNKNOWN, false, "failed to print array"); 438 psFree(output); 439 return false; 440 } 441 psFree(output); 442 443 return true; 444 } 445 316 446 // Update 317 447 318 448 static bool dropcomponentMode(pxConfig *config) 319 449 { 450 fprintf (stderr, "do we really want to use -dropcomponent?\n"); 451 exit (1); 452 320 453 // Assert that we have a unique component to operate on. 321 454 PXOPT_LOOKUP_S64(remote_id,config->args, "-remote_id",true, false); … … 329 462 return false; 330 463 } 331 464 332 465 if (!psDBTransaction(config->dbh)) { 333 466 psError(PS_ERR_UNKNOWN, false, "database error"); … … 341 474 } 342 475 psFree(query); 343 344 345 476 346 477 // point of no return … … 349 480 return false; 350 481 } 351 482 352 483 return true; 353 484 } … … 364 495 // Wheres 365 496 PXOPT_COPY_S64(config->args, where, "-remote_id", "remote_id", "=="); 366 497 367 498 // Values to set 368 499 PXOPT_COPY_STR(config->args, values, "-set_label", "label", "=="); … … 374 505 psFree(values); 375 506 376 if (rows < 1) { 377 psError(PS_ERR_UNKNOWN,false, "no rows affected"); 378 return(false); 379 } 380 507 if (rows < 1) fprintf (stderr, "no rows changed (run may already be in desired state)\n"); 381 508 return(true); 382 509 } … … 393 520 psString whereClause = psDBGenerateWhereConditionSQL(where, NULL); 394 521 psFree(where); 395 522 396 523 psString query = NULL; 397 524 query = pxDataGet("remotetool_updatepoll.sql"); … … 412 539 return(true); 413 540 } 414 415 416 541 542 static bool updatecomponentMode(pxConfig *config) 543 { 544 PS_ASSERT_PTR_NON_NULL(config, false); 545 PXOPT_LOOKUP_S64(remote_id, config->args, "-remote_id", true, false); 546 psAssert(remote_id,"This should have failed before this point."); 547 548 psMetadata *where = psMetadataAlloc(); 549 psMetadata *values = psMetadataAlloc(); 550 551 // Wheres 552 PXOPT_COPY_S64(config->args, where, "-remote_id", "remote_id", "=="); 553 PXOPT_COPY_S64(config->args, where, "-stage_id", "stage_id", "=="); 554 PXOPT_COPY_STR(config->args, where, "-state", "state", "=="); 555 556 // Values to set 557 PXOPT_COPY_S32(config->args, values, "-set_jobs", "jobs", "=="); 558 PXOPT_COPY_STR(config->args, values, "-set_path_base", "path_base", "=="); 559 PXOPT_COPY_STR(config->args, values, "-set_state", "state", "=="); 560 561 long rows = psDBUpdateRows(config->dbh, "remoteComponent", where, values); 562 psFree(values); 563 564 if (rows < 1) fprintf (stderr, "no rows changed (component may already be in desired state)\n"); 565 return true; 566 } 417 567 418 568 static bool revertrunMode(pxConfig *config) … … 426 576 PXOPT_COPY_S64(config->args, where, "-remote_id", "remote_id", "=="); 427 577 PXOPT_COPY_STR(config->args, where, "-label", "label", "=="); 428 578 PXOPT_COPY_S16(config->args, where, "-fault", "fault", "=="); 429 579 // Value to set 430 PXOPT_COPY_S16(config->args, values, "-fault", "fault", "=="); 431 long rows = psDBUpdateRows(config->dbh, "remoteRun", where, values); 432 psFree(values); 433 psFree(where); 434 if (rows < 1) { 435 psError(PS_ERR_UNKNOWN,false, "no rows affected"); 436 return(false); 437 } 438 439 return(true); 440 } 441 442 static bool revertauthMode(pxConfig *config) 443 { 444 PS_ASSERT_PTR_NON_NULL(config, false); 445 446 psMetadata *where = psMetadataAlloc(); 447 psMetadata *values = psMetadataAlloc(); 448 449 // required 450 PXOPT_COPY_S64(config->args, where, "-remote_id", "remote_id", "=="); 451 PXOPT_COPY_STR(config->args, where, "-label", "label", "=="); 452 453 psMetadataAddStr(where, PS_LIST_TAIL, "state", 0, "==", "auth"); 454 455 // Value to set 456 psMetadataAddStr(values, PS_LIST_TAIL, "state", 0, "==", "run"); 580 psMetadataAddS16(values,PS_LIST_TAIL,"fault",0, "==", 0); 457 581 458 582 long rows = psDBUpdateRows(config->dbh, "remoteRun", where, values); … … 466 590 return(true); 467 591 } 468 592 593 static bool revertcomponentMode(pxConfig *config) 594 { 595 PS_ASSERT_PTR_NON_NULL(config,false); 596 psMetadata *where = psMetadataAlloc(); 597 psMetadata *values = psMetadataAlloc(); 598 599 // required 600 PXOPT_COPY_S64(config->args, where, "-remote_id", "remote_id", "=="); 601 PXOPT_COPY_S64(config->args, where, "-stage_id", "stage_id", "=="); 602 psMetadataAddStr(where,PS_LIST_TAIL,"state",0, "LIKE", "%fail"); 603 604 // value to set 605 psMetadataAddStr(values, PS_LIST_TAIL, "state",0, "==", "retry"); 606 607 608 long rows = psDBUpdateRows(config->dbh, "remoteComponent", where, values); 609 psFree(values); 610 psFree(where); 611 if (rows < 1) { 612 psError(PS_ERR_UNKNOWN,false, "no rows affected"); 613 return(false); 614 } 615 616 return(true); 617 } 618 619 620 621 static bool revertauthMode(pxConfig *config) 622 { 623 PS_ASSERT_PTR_NON_NULL(config, false); 624 625 psMetadata *where = psMetadataAlloc(); 626 psMetadata *values = psMetadataAlloc(); 627 628 // required 629 PXOPT_COPY_S64(config->args, where, "-remote_id", "remote_id", "=="); 630 PXOPT_COPY_STR(config->args, where, "-label", "label", "=="); 631 632 psMetadataAddStr(where, PS_LIST_TAIL, "state", 0, "==", "auth"); 633 634 // Value to set 635 psMetadataAddStr(values, PS_LIST_TAIL, "state", 0, "==", "run"); 636 637 long rows = psDBUpdateRows(config->dbh, "remoteRun", where, values); 638 psFree(values); 639 psFree(where); 640 if (rows < 1) { 641 psError(PS_ERR_UNKNOWN,false, "no rows affected"); 642 return(false); 643 } 644 645 return(true); 646 } 647 -
trunk/ippTools/src/remotetool.h
r36981 r37833 12 12 REMOTETOOL_MODE_DEFINEBYQUERY, 13 13 REMOTETOOL_MODE_LISTRUN, 14 REMOTETOOL_MODE_DONEPREP, 14 15 REMOTETOOL_MODE_LISTCOMPONENT, 15 16 REMOTETOOL_MODE_DROPCOMPONENT, 16 17 REMOTETOOL_MODE_UPDATERUN, 17 18 REMOTETOOL_MODE_UPDATEPOLL, 18 REMOTETOOL_MODE_REVERTRUN, 19 REMOTETOOL_MODE_REVERTAUTH, 19 REMOTETOOL_MODE_UPDATECOMPONENT, 20 REMOTETOOL_MODE_REVERTRUN, 21 REMOTETOOL_MODE_REVERTAUTH, 22 REMOTETOOL_MODE_REVERTCOMPONENT, 20 23 } remotetoolMode; 21 24 -
trunk/ippTools/src/remotetoolConfig.c
r36981 r37833 40 40 ADD_OPT(Bool, definebyqueryArgs, "-pretend", "pretend to do this.", 0); 41 41 ADD_OPT(Bool, definebyqueryArgs,"-simple", "simple print format",0); 42 42 43 43 // -listrun 44 44 psMetadata *listrunArgs = psMetadataAlloc(); … … 59 59 ADD_OPT(S16, listrunArgs, "-limit", "limit to number of runs to display", 0); 60 60 61 // -doneprep 62 psMetadata *doneprepArgs = psMetadataAlloc(); 63 ADD_OPT(S64, doneprepArgs, "-remote_id", "run to list", 0); 64 ADD_OPT(S64, doneprepArgs, "-job_id", "job_id", 0); 65 ADD_OPT(Str, doneprepArgs, "-stage", "stage to return", NULL); 66 ADD_OPT(Str, doneprepArgs, "-state", "state to return", NULL); 67 ADD_OPT(Str, doneprepArgs, "-label", "remRun label to use", NULL); 68 69 ADD_OPT(Bool, doneprepArgs, "-simple", "simple print format", false); 70 ADD_OPT(S16, doneprepArgs, "-limit", "limit to number of runs to display", 0); 71 72 // -revertcomponent 73 psMetadata *revertcomponentArgs = psMetadataAlloc(); 74 ADD_OPT(S64, revertcomponentArgs, "-remote_id", "run to revert components from", 0); 75 ADD_OPT(S64, revertcomponentArgs, "-stage_id", "component stage_id to revert", 0); 76 77 61 78 // -listcomponents 62 psMetadata *listcomponentArgs = psMetadataAlloc(); 63 ADD_OPT(S64, listcomponentArgs, "-remote_id", "run to list", 0); 64 ADD_OPT(S16, listcomponentArgs, "-limit", "limit to number of runs to display", 0); 79 psMetadata *listcomponentArgs = psMetadataAlloc(); 80 ADD_OPT(S64, listcomponentArgs, "-remote_id", "run to list", 0); 81 ADD_OPT(S64, listcomponentArgs, "-stage_id", "run to list", 0); 82 ADD_OPT(S32, listcomponentArgs, "-jobs", "run to list", 0); 83 ADD_OPT(Str, listcomponentArgs, "-state", "run to list", NULL); 84 ADD_OPT(S16, listcomponentArgs, "-limit", "limit to number of runs to display", 0); 65 85 ADD_OPT(Bool, listcomponentArgs, "-simple", "simple print format", false); 86 ADD_OPT(Str, listcomponentArgs, "-label", "label to use", NULL); 66 87 67 88 // -dropcomponent … … 69 90 ADD_OPT(S64, dropcomponentArgs, "-remote_id", "run to update", 0); 70 91 ADD_OPT(S64, dropcomponentArgs, "-stage_id", "stage_id to remote", 0); 71 92 72 93 // -updaterun 73 94 psMetadata *updaterunArgs = psMetadataAlloc(); … … 83 104 psMetadata *updatepollArgs = psMetadataAlloc(); 84 105 ADD_OPT(S64, updatepollArgs, "-remote_id", "run to update", 0); 85 106 107 // -updatecomponent 108 psMetadata *updatecomponentArgs = psMetadataAlloc(); 109 ADD_OPT(S64, updatecomponentArgs, "-remote_id", "remote_id to update", 0); 110 ADD_OPT(S64, updatecomponentArgs, "-stage_id", "stage_id to update", 0); 111 ADD_OPT(Str, updatecomponentArgs, "-state", "limit to this remoteComponent state", NULL); 112 ADD_OPT(Str, updatecomponentArgs, "-set_state", "remoteComponent state to assign", NULL); 113 ADD_OPT(Str, updatecomponentArgs, "-set_path_base", "remoteRun path_base to assign", NULL); 114 ADD_OPT(S32, updatecomponentArgs, "-set_jobs", "number of jobs for this stage_id", 0); 115 86 116 // -revertrun 87 117 psMetadata *revertrunArgs = psMetadataAlloc(); … … 89 119 ADD_OPT(Str, revertrunArgs, "-label", "remRun label to use", NULL); 90 120 ADD_OPT(S16, revertrunArgs, "-fault", "fault code", 0); 91 121 92 122 // -revertauth 93 123 psMetadata *revertauthArgs = psMetadataAlloc(); … … 98 128 psMetadata *modes = psMetadataAlloc(); 99 129 100 PXOPT_ADD_MODE("-definebyquery", "", REMOTETOOL_MODE_DEFINEBYQUERY, definebyqueryArgs); 101 PXOPT_ADD_MODE("-listrun", "", REMOTETOOL_MODE_LISTRUN, listrunArgs); 102 PXOPT_ADD_MODE("-listcomponent", "", REMOTETOOL_MODE_LISTCOMPONENT, listcomponentArgs); 103 PXOPT_ADD_MODE("-dropcomponent", "", REMOTETOOL_MODE_DROPCOMPONENT, dropcomponentArgs); 104 PXOPT_ADD_MODE("-updaterun", "", REMOTETOOL_MODE_UPDATERUN, updaterunArgs); 105 PXOPT_ADD_MODE("-updatepoll", "", REMOTETOOL_MODE_UPDATEPOLL, updatepollArgs); 106 PXOPT_ADD_MODE("-revertrun", "", REMOTETOOL_MODE_REVERTRUN, revertrunArgs); 107 PXOPT_ADD_MODE("-revertauth", "", REMOTETOOL_MODE_REVERTAUTH, revertauthArgs); 130 PXOPT_ADD_MODE("-definebyquery", "", REMOTETOOL_MODE_DEFINEBYQUERY, definebyqueryArgs); 131 PXOPT_ADD_MODE("-listrun", "", REMOTETOOL_MODE_LISTRUN, listrunArgs); 132 PXOPT_ADD_MODE("-doneprep", "", REMOTETOOL_MODE_DONEPREP, doneprepArgs); 133 PXOPT_ADD_MODE("-listcomponent", "", REMOTETOOL_MODE_LISTCOMPONENT, listcomponentArgs); 134 PXOPT_ADD_MODE("-revertcomponent", "", REMOTETOOL_MODE_REVERTCOMPONENT, revertcomponentArgs); 135 PXOPT_ADD_MODE("-dropcomponent", "", REMOTETOOL_MODE_DROPCOMPONENT, dropcomponentArgs); 136 PXOPT_ADD_MODE("-updaterun", "", REMOTETOOL_MODE_UPDATERUN, updaterunArgs); 137 PXOPT_ADD_MODE("-updatepoll", "", REMOTETOOL_MODE_UPDATEPOLL, updatepollArgs); 138 PXOPT_ADD_MODE("-updatecomponent", "", REMOTETOOL_MODE_UPDATECOMPONENT, updatecomponentArgs); 139 PXOPT_ADD_MODE("-revertrun", "", REMOTETOOL_MODE_REVERTRUN, revertrunArgs); 140 PXOPT_ADD_MODE("-revertauth", "", REMOTETOOL_MODE_REVERTAUTH, revertauthArgs); 108 141 109 142 -
trunk/ippTools/src/stacktool.c
- Property svn:mergeinfo set to
-
trunk/ippTools/src/stacktoolConfig.c
- Property svn:mergeinfo set to
Note:
See TracChangeset
for help on using the changeset viewer.
