Bug 750130 - Add skynet validate command
Summary: Add skynet validate command
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: PressGang CCMS
Classification: Community
Component: CSProcessor
Version: 1.x
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: Lee Newson
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: 751251
TreeView+ depends on / blocked
 
Reported: 2011-10-31 05:33 UTC by Joshua Wulf
Modified: 2014-10-19 22:59 UTC (History)
3 users (show)

Fixed In Version: 0.15.0
Clone Of:
Environment:
Last Closed: 2012-02-22 03:01:57 UTC
Embargoed:


Attachments (Terms of Use)

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.


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