Bug 833400 - Minor error in Viewing a Resource's Configuration Settings example
Minor error in Viewing a Resource's Configuration Settings example
Status: CLOSED CURRENTRELEASE
Product: JBoss Operations Network
Classification: JBoss
Component: Documentation (Show other bugs)
JON 3.1.0
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Deon Ballard
Mike Foley
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-06-19 08:22 EDT by Filip Brychta
Modified: 2014-10-23 08:29 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-07-20 12:51:53 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Filip Brychta 2012-06-19 08:22:32 EDT
Description of problem:
Link to doc: http://docs.redhat.com/docs/en-US/JBoss_Operations_Network/3.1/html/Dev_Writing_JON_Command-Line_Scripts/config.html

Original example:
rhqadmin@localhost:7080$ criteria = new ResourceCriteria(); // find the resource
rhqadmin@localhost:7080$ criteria.addFilterResourceTypeName('Samba')
rhqadmin@localhost:7080$ criteria.addFilterAgentName('agent1.example.com')
rhqadmin@localhost:7080$ var resource = ResourceManager.findResourcesByCriteria(criteria);

rhqadmin@localhost:7080$ ConfigurationManager.getResourceConfiguration(resource.id)  <<< resource is list, resource.get(0).id is correct

fixed version:
rhqadmin@localhost:7080$ criteria = new ResourceCriteria(); // find the resource
rhqadmin@localhost:7080$ criteria.addFilterResourceTypeName('Samba')
rhqadmin@localhost:7080$ criteria.addFilterAgentName('agent1.example.com')
rhqadmin@localhost:7080$ var resources = ResourceManager.findResourcesByCriteria(criteria);

rhqadmin@localhost:7080$ ConfigurationManager.getResourceConfiguration(resources.get(0).id)
Comment 1 Filip Brychta 2012-06-19 09:40:23 EDT
Same problem in Changing a Simple Property example on the same page.

Note You need to log in before you can comment on or make changes to this bug.