aboutsummaryrefslogtreecommitdiffstats
path: root/bin/common/srtool_common.py
diff options
context:
space:
mode:
Diffstat (limited to 'bin/common/srtool_common.py')
-rwxr-xr-xbin/common/srtool_common.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/bin/common/srtool_common.py b/bin/common/srtool_common.py
index a098fc7e..66e980af 100755
--- a/bin/common/srtool_common.py
+++ b/bin/common/srtool_common.py
@@ -452,6 +452,9 @@ def gen_schema_header():
fd.write(" %s_%s = %d\n" % ('PRIORITY','LOW' ,2))
fd.write(" %s_%s = %d\n" % ('PRIORITY','MEDIUM' ,3))
fd.write(" %s_%s = %d\n" % ('PRIORITY','HIGH' ,4))
+ fd.write(" %s = '%s'\n" % ('PRIORITY_STR', \
+ 'Undefined,Minor,Low,Medium,High' \
+ ))
fd.write(" %s_%s = %d\n" % ('STATUS','HISTORICAL' ,0))
fd.write(" %s_%s = %d\n" % ('STATUS','NEW' ,1))
@@ -459,6 +462,9 @@ def gen_schema_header():
fd.write(" %s_%s = %d\n" % ('STATUS','INVESTIGATE' ,3))
fd.write(" %s_%s = %d\n" % ('STATUS','VULNERABLE' ,4))
fd.write(" %s_%s = %d\n" % ('STATUS','NOT_VULNERABLE',5))
+ fd.write(" %s = '%s'\n" % ('STATUS_STR', \
+ 'Historical,New,New_Reserved,Investigate,Vulnerable,Not_Vulnerable' \
+ ))
fd.write(" %s_%s = %d\n" % ('PUBLISH','UNPUBLISHED',0))
fd.write(" %s_%s = %d\n" % ('PUBLISH','NOPUBLISH',1))
@@ -466,11 +472,17 @@ def gen_schema_header():
fd.write(" %s_%s = %d\n" % ('PUBLISH','REQUEST',3))
fd.write(" %s_%s = %d\n" % ('PUBLISH','UPDATE',4))
fd.write(" %s_%s = %d\n" % ('PUBLISH','SUBMITTED',5))
+ fd.write(" %s = '%s'\n" % ('PUBLISH_STR', \
+ 'Unpublished,Nopublish,Published,Request,Update,Submitted' \
+ ))
fd.write(" %s_%s = %d\n" % ('OUTCOME','OPEN' ,0))
fd.write(" %s_%s = %d\n" % ('OUTCOME','CLOSED' ,1))
fd.write(" %s_%s = %d\n" % ('OUTCOME','FIXED' ,2))
fd.write(" %s_%s = %d\n" % ('OUTCOME','NOT_FIX',3))
+ fd.write(" %s = '%s'\n" % ('OUTCOME_STR', \
+ 'Open,Closed,Fixed,Not_Fix' \
+ ))
fd.write(" %s_%s = %d\n" % ('DEFECT','UNRESOLVED' ,0))
fd.write(" %s_%s = %d\n" % ('DEFECT','RESOLVED' ,1))
@@ -483,6 +495,9 @@ def gen_schema_header():
fd.write(" %s_%s = %d\n" % ('DEFECT','REPLACED_BY_REQUIREMENT' ,8))
fd.write(" %s_%s = %d\n" % ('DEFECT','CANNOT_REPRODUCE' ,9))
fd.write(" %s_%s = %d\n" % ('DEFECT','DONE' ,10))
+ fd.write(" %s_%s = '%s'\n" % ('DEFECT','RESOLUTION_STR', \
+ 'Unresolved,Resolved,Fixed,Will_Not_Fix,Withdrawn,Rejected,Duplicate,Not_Applicable,Replaced_By_Requirement,Cannot_Reproduce,Done' \
+ ))
fd.write(" %s_%s = %d\n" % ('PACKAGE','FOR' ,0))
fd.write(" %s_%s = %d\n" % ('PACKAGE','AGAINST' ,1))
@@ -504,6 +519,7 @@ def gen_schema_header():
fd.write(" # General routine to return string name of a constant (e.g. 'DATASOURCE_FREQUENCY_STR')\n")
fd.write(" @staticmethod\n")
fd.write(" def get_orm_string(value,string_set):\n")
+ fd.write(" if None == value: return('None')\n")
fd.write(" string_list = string_set.split(',')\n")
fd.write(" string_count = len(string_list)\n")
fd.write(" value = int(value)\n")