| Issue 49: | Validation of xml policy files | |
| 1 person starred this issue and may be notified of changes. | Back to list |
The xml files entered by the user while enabling the OHSM should be verified. Rishi and Sneha are working on it.
Jan 30, 2009
#1
postri...@gmail.com
Jan 30, 2009
Quick !!! Really quick. Keep rocking, Updates the Logs.
Jan 30, 2009
The log generated for the attached sample allocation file : ohsm : error 101 uid not present on system ohsm : error tier does not exists ohsm : error 509 uid not present on system ohsm : error 503 uid not present on system ohsm : error 5090 uid not present on system ohsm : error 509 uid not present on system ohsm : error 504 uid not present on system ohsm : error number of users in <info> is less than the entered users ohsm ; error gid 501 appears 2 times in allocation file ohsm : error tier does not exists ohsm : error tier does not exists ohsm : error in parsing the allocation policy file alloc.xml ohsm : cannot be enabled
Jan 30, 2009
ohsm : error 101 uid not present on system ohsm : error tier does not exists ohsm : error 503 uid not present on system ohsm : error 503 uid not present on system ohsm : error 504 uid not present on system ohsm ; error uid 502 appears 2 times in allocation file ohsm : error number of users in <info> greater than users spcified ohsm ; error 5021 gid not present on system ohsm : error tier does not exists ohsm : error number of groups in <info> is less than the entered groups ohsm : error tier does not exists ohsm : error in parsing the allocation policy file alloc.xml ohsm : cannot be enabled
Jan 30, 2009
we are trying to print the line numbers also where the error was found. I think that will make it look better. Any more suggestions
Status:
Review-Req
Jan 30, 2009
The parsing of tier info xml file has been changed heavily. This will take some time to finish
Status:
In-progress
Jan 30, 2009
I am rectifying sam table problem in issue 48 . This issue is on hold for now.
Jan 30, 2009
I am using temporary file for getting the tier device info.
Jan 30, 2009
Relocation xml file validation done.
Jan 30, 2009
Got the line numbers. printing it successfully ...
Jan 30, 2009
Errors will now be showing line nos. also :)
Jan 30, 2009
It would be better if you can provide some logs.
Jan 30, 2009
The temporary file issue has been resolved by SKS. We are using stat() on file name
Jan 30, 2009
The validation is almost complete. small changes remains like removing the use of temp file and adding line numbers to more types of errors will be completed soon Good Work Sneha !!
Jan 30, 2009
ohsm [5] : wrong value in <INFO> tag ohsm [5] : fatal : cannot proceed further Error in parsing the relocation file
Jan 30, 2009
ohsm [12] : wrong value in <FAA> tag ohsm [19] : wrong value in <FSIZE> tag ohsm [19] : wrong value in <REL> tag Error in parsing relocate.xml
Jan 30, 2009
ohsm [11] : error 501 uid not present on system ohsm [14] : wrong value in <group> tag ohsm [14]: fatal : cannot proceed further ohsm : error in parsing the allocation policy file alloc.xml ohsm : cannot be enabled
Jan 30, 2009
If for the wrong entrance of the value in xml file further malloc fails Then program is aborted there itself before the system. Else the program keeps on listing the errors and aborts in the end doesn't pass the structure. Rather passes NULL
Jan 30, 2009
Error is not displayed if a proper invalid start and end tag is entered. eg. <abc> 500 </abc> instead of <user> 500 </user>
Jan 31, 2009
The use of temp file has not been eliminated
Jan 31, 2009
Got the way to validate the xml file for tags through DTD in libxml2 Just have write a dtd for the file and run the command xmllint --valid --noout file.xml :)
Jan 31, 2009
Now writing the DTD for the files
Jan 31, 2009
finished validating alloc file with dtd working perfectly fine without any errors
Jan 31, 2009
major change have occured in the alloc.xml file since the <users> was defined twice for information as well as in the user tier information i.e. previously it was <info> <users>1</users> <groups>1</groups> <types>10</types> </info> <users> <user>501</user> <tier>2</tier> </users> ......and so on now it will be like: <info> <USER> 2 </USER> <GROUP>1</GROUP> <TYPE>10</TYPE> </info> <users> <user>500</user> <tier>2</tier> </users> ...and so on
Jan 31, 2009
I think same thing may happen in relocation code too Now starting the dtd for relocation file
Jan 31, 2009
Validation for relocation xml file completed successfully No changes were made to the relocate.xml file for this
Jan 31, 2009
DTD validation finished for the device file also Here are all the files Just type the command in the same directory. xmllint --valid --noout file.xml
Feb 1, 2009
The merging of the codes were remaining. It has now been finished. The parser and validation is over now. Testing remains ... will get on to it shortly.
Feb 3, 2009
The coding is finished and is working fine
Status:
Verified
|