def convertIxncfgToJson(self, ixncfgFile, destinationPath): """ Description This function takes the input .ixncfg config file to be loaded and then convert it to json format. The filename will be the same as the input .ixncfg filename, but the extension will be .json. The converted .json file will be saved in the path variable destinationPath. Parameters ixncfgFile: (str): The binary IxNetwork .ixncfg file. destinationPath: (str): The destination path to save the .json config file. """ self.loadConfigFile(ixncfgFile) filename = ixncfgFile.split('/')[-1] match = re.match('(.*).ixncfg', filename) if match: filename = match.group(1) jsonFilename = destinationPath+'/'+filename+'.json' self.exportJsonConfigFile(jsonFilename)