Support misusability file import from cimport
@@ -25,7 +25,7 @@ __author__ = 'Shamal Faily'
def main(args=None):
parser = argparse.ArgumentParser(description='Computer Aided Integration of Requirements and Information Security - Model Import')
parser.add_argument('modelFile',help='model file to import')
- parser.add_argument('--type',dest='modelFormat',help='model type to import. One of securitypattern, attackpattern, tvtypes, directory, requirements, riskanalysis, usability, project, domainvalues, architecturalpattern, associations, synopses, processes, assets, locations or all')
+ parser.add_argument('--type',dest='modelFormat',help='model type to import. One of securitypattern, attackpattern, tvtypes, directory, requirements, riskanalysis, usability, misusability, project, domainvalues, architecturalpattern, associations, synopses, processes, assets, locations or all')
parser.add_argument('--overwrite',dest='isOverwrite',help='Where appropriate, overwrite an existing CAIRIS model with this model')
parser.add_argument('--image_dir',dest='imageDir',help='Where appropriate, directory for model images (overwrites default_image_dir value in cairis.cnf)')
args = parser.parse_args()
@@ -47,7 +47,7 @@ def file_import(importFile,mFormat,overwriteFlag,session_id = None):
if (os.access(importFile, os.R_OK)) == False:
raise ARMException("Cannot access " + importFile)
- from cairis.mio.ModelImport import importSecurityPatterns, importAttackPattern,importTVTypeFile,importDirectoryFile,importRequirementsFile, importRiskAnalysisFile, importUsabilityFile, importAssociationsFile, importProjectFile, importDomainValuesFile, importComponentViewFile, importSynopsesFile,importProcessesFile,importAssetsFile,importLocationsFile,importModelFile
+ from cairis.mio.ModelImport import importSecurityPatterns, importAttackPattern,importTVTypeFile,importDirectoryFile,importRequirementsFile, importRiskAnalysisFile, importUsabilityFile, importAssociationsFile, importProjectFile, importDomainValuesFile, importComponentViewFile, importSynopsesFile,importProcessesFile,importAssetsFile,importLocationsFile,importModelFile,importMisusabilityFile
msgStr = ''
if (mFormat == 'securitypattern' or mFormat == 'Security Pattern'):
@@ -64,6 +64,8 @@ def file_import(importFile,mFormat,overwriteFlag,session_id = None):
msgStr += importRiskAnalysisFile(importFile,session_id)
elif (mFormat == 'usability' or mFormat == 'Usability'):
msgStr += importUsabilityFile(importFile,session_id)
+ elif (mFormat == 'misusability' or mFormat == 'Misusability'):
+ msgStr += importMisusabilityFile(importFile,session_id)
elif (mFormat == 'associations' or mFormat == 'Associations'):
msgStr += importAssociationsFile(importFile,session_id)
elif (mFormat == 'project' or mFormat == 'Project data'):
