Bug 696857

Summary: topic.conf file is not validated
Product: [Other] Topic Tool Reporter: Stephen Gordon <sgordon>
Component: cli-Topic_ToolAssignee: Stephen Gordon <sgordon>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: low Docs Contact:
Priority: unspecified    
Version: 0.0.x   
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: topic-tool-0.0.8-0 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-09-29 04:23:51 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Stephen Gordon 2011-04-15 02:39:22 UTC
Description of problem:

When the topic tool loads it checks for a topic.conf file in the user's home directory. If one is not found it is created based on the default template (with some user input), if however one is found it is not checked for correctness.

In particular the tool assumes a number of values are set:

 * TOPIC_REPO
 * TOPIC_INDEX
 * TOPIC_SEARCH
 * AUTHOR
 * AUTHOR_EMAIL

If the file is present but doesn't contain one of these values then when a verb is invoked that uses that value an Exception is thrown without providing much feedback to the user.

Ideally we should check these 'mandatory' values are correct up front and provide better feedback to the user as to how to correct it.

Version-Release number of selected component (if applicable):

0.0.3-2

Comment 1 Stephen Gordon 2011-09-08 06:48:54 UTC
Committed revision 70110.

Modified to check for TOPIC_REPO, TOPIC_INDEX, AUTHOR, and AUTHOR_EMAIL at the top. The search logic itself checks the presence of TOPIC_SEARCH, left the check at this level as unlike the others it is only required for one function, search.