Bug 750130

Summary: Add skynet validate command
Product: [Community] PressGang CCMS Reporter: Joshua Wulf <jwulf>
Component: CSProcessorAssignee: Lee Newson <lnewson>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 1.xCC: jwulf, lcarlon, lnewson
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 0.15.0 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-02-22 03:01:57 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 751251    

Description Joshua Wulf 2011-10-31 05:33:27 UTC
Add a command that performs the validation only, and returns either "Content Spec Valid", or the list of errors encountered.

The validate command is used to check a Content Spec for validity, and does not write anything to the database.

Comment 1 Ali Abbas 2011-11-02 05:05:27 UTC
This is done now Josh. A new command (validate) was created to validate a new/edit content spec, or an existing topic. This is done as follows:

-To validate a new content spec:
java -jar skynet.jar validate -cn zanata.txt

-To validate an edit content spec:
java -jar skynet.jar validate -ce zanata.txt

-To validate an existing topic xml:
java -jar skynet.jar validate -tx 7

We also removed the --validate option when pulling a topic since that is now done using this Validate command.

Comment 2 Joshua Wulf 2011-11-04 10:12:25 UTC
No worky:

Demonstrating that the connection to the server works:

[jwulf@gaura Topic-based_authoring]$ skynet pull -c --post 8 -o /dev/null
Skynet client version: 0.0.13
Loading configuration from /home/jwulf/.config/skynet.ini
Web Service at http://localhost:8080/ version: 0.0.14

INFO: Output saved to: /dev/null

Demonstrating that validate no worky:

[jwulf@gaura Topic-based_authoring]$ skynet validate -cn post-Writing_with_Topics.txt
Skynet client version: 0.0.13
Loading configuration from /home/jwulf/.config/skynet.ini
Web Service at http://localhost:8080/ version: 0.0.14

ERROR: Cannot resolve the server address!


Looks like it does see the server, because it gets the correct version. Error message might be misleading.

Comment 3 Joshua Wulf 2011-11-04 10:12:46 UTC
Don't forget to target this to a release.

Comment 4 Lee Newson 2011-11-07 00:56:55 UTC
Fixed. The problem was that the web address was wrong. I'm sure I saw Ali fix this but maybe he didn't commit and I overwrote the changes. Will be released in client version 0.13.1 (which will be released in 0.15.0 for the csprocessor).

(Note: I'll change this to ON_QA when I can get Ali to assign the bug to me)

Comment 5 Joshua Wulf 2012-02-22 03:01:57 UTC
[jwulf@radhe Content_Spec_Processor]$ csprocessor validate -ce post-Content_Spec_Processor_Guide.spec 
CSProcessor client version: 0.17.0
Loading configuration from /home/jwulf/.config/csprocessor.ini
Web Service at http://csprocessor.cloud.lab.eng.bne.redhat.com:8080/ version: 0.21.4

INFO:  The Content Specification is valid.