<< Back to previous view |
![]() |
[QB-1059] Set grid node attribute via RESTful API and script
|
|
Status: | Closed |
Project: | QuickBuild |
Component/s: | None |
Affects Version/s: | 3.1.61 |
Fix Version/s: | None |
Type: | Improvement | Priority: | Major |
Reporter: | Robin Shen | Assigned To: | Robin Shen |
Resolution: | Won't Fix | Votes: | 0 |
Remaining Estimate: | Unknown | Time Spent: | Unknown |
Original Estimate: | Unknown |
Comments |
Comment by Robin Shen [ 28/Sep/11 03:14 AM ] |
Sorry this is already possible in QB3.1, to modify an user attribute, please run below script in a step on QB server:
[code]groovy: def node = grid.getNode("matrix:8811"); def userAttributes = node.userAttributes; userAttributes.put("attribute1", "value1"); node.setUserAttributes(userAttributes, true);[/code] You may also read the user attributes from an external file and parse it to construct a Groovy map, then call method node.setUserAttributes(map, true); |