Skip to content

Commit b7a497e

Browse files
committed
Change file name limit and SmartAnalyze add file name extensions
1. Change filename length to 15 instead of 20 , 11 lengths are added for _policy_opt + 4 lengths in case the object exists by smartconnector 2. SmartAnalyze Add for Cisco and Firepower file extensions .cfg and.txt same , same as SmartMove
1 parent 507f35a commit b7a497e

File tree

3 files changed

+13
-13
lines changed

3 files changed

+13
-13
lines changed

SmartMove/AnalyzeWindow.xaml.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -107,10 +107,10 @@ private async void Analyze_OnClickAsync(object sender, RoutedEventArgs e)
107107
return;
108108
}
109109

110-
if (fileName.Length > 20)
110+
if (fileName.Length > 15)
111111
{
112-
SMDebugger.PrintToDebug(TargetFolderPath.Text + "\\", "Configuration file name is restricted to 20 characters at most.");
113-
MainWindow.ShowMessage("Configuration file name is restricted to 20 characters at most.", MessageTypes.Error);
112+
SMDebugger.PrintToDebug(TargetFolderPath.Text + "\\", "Configuration file name is restricted to 15 characters at most.");
113+
MainWindow.ShowMessage("Configuration file name is restricted to 15 characters at most.", MessageTypes.Error);
114114
return;
115115
}
116116

@@ -597,7 +597,7 @@ private void BrowseConfigFile_OnClick(object sender, RoutedEventArgs e)
597597
{
598598
case Vendor.CiscoASA:
599599
case Vendor.FirePower:
600-
filter = "conf files (*.conf, *.txt)|*.conf; *.txt|All files (*.*)|*.*";
600+
filter = "conf files (*.conf, *.txt, *.cfg)|*.conf; *.txt; *.cfg|All files (*.*)|*.*";
601601
break;
602602
case Vendor.JuniperJunosOS:
603603
filter = "xml files (*.xml)|*.xml";

SmartMove/CommandLine.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -500,14 +500,14 @@ public void DoAnalyze(CommandLine commandLine)
500500
return;
501501
}
502502

503-
if (fileName.Length > 20)
503+
if (fileName.Length > 15)
504504
{
505505
if (FormatOutput == "text")
506-
Console.WriteLine("Configuration file name is restricted to 20 characters at most.", MessageTypes.Error);
506+
Console.WriteLine("Configuration file name is restricted to 15 characters at most.", MessageTypes.Error);
507507
else
508508
{
509509
JsonReport jsonReport = new JsonReport(
510-
msg: "Configuration file name is restricted to 20 characters at most.",
510+
msg: "Configuration file name is restricted to 15 characters at most.",
511511
err: "err_cannot_convert_configuration_file");
512512
Console.WriteLine(jsonReport.PrintJson());
513513
}
@@ -933,14 +933,14 @@ public void DoMigration(CommandLine commandLine)
933933
return;
934934
}
935935

936-
if (fileName.Length > 20)
936+
if (fileName.Length > 15)
937937
{
938938
if (FormatOutput == "text")
939-
Console.WriteLine("Configuration file name is restricted to 20 characters at most.", MessageTypes.Error);
939+
Console.WriteLine("Configuration file name is restricted to 15 characters at most.", MessageTypes.Error);
940940
else
941941
{
942942
JsonReport jsonReport = new JsonReport(
943-
msg: "Configuration file name is restricted to 20 characters at most.",
943+
msg: "Configuration file name is restricted to 15 characters at most.",
944944
err: "err_cannot_convert_configuration_file");
945945
Console.WriteLine(jsonReport.PrintJson());
946946
}

SmartMove/MainWindow.xaml.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -475,10 +475,10 @@ private async void Go_OnClick(object sender, RoutedEventArgs e)
475475
return;
476476
}
477477

478-
if (fileName.Length > 20)
478+
if (fileName.Length > 15)
479479
{
480-
SMDebugger.PrintToDebug(TargetFolderPath.Text + "\\", "Configuration file name is restricted to 20 characters at most.");
481-
ShowMessage("Configuration file name is restricted to 20 characters at most.", MessageTypes.Error);
480+
SMDebugger.PrintToDebug(TargetFolderPath.Text + "\\", "Configuration file name is restricted to 15 characters at most.");
481+
ShowMessage("Configuration file name is restricted to 15 characters at most.", MessageTypes.Error);
482482
return;
483483
}
484484

0 commit comments

Comments
 (0)