AMBARI-23822. Add --skip-generate-restore-host-cores option to migrationHelper.py (only read the json file, do not generate it)
diff --git a/ambari-infra-solr-client/README.md b/ambari-infra-solr-client/README.md
index 681b9a1..c2e2c16 100644
--- a/ambari-infra-solr-client/README.md
+++ b/ambari-infra-solr-client/README.md
@@ -618,6 +618,9 @@
                         core filter for replica folders
   --skip-cores=SKIP_CORES
                         specific cores to skip (comma separated)
+  --skip-generate-restore-host-cores
+                        Skip the generation of restore_host_cores.json, just 
+                        read the file itself, can be useful if command failed at some point.
   --shards=SOLR_SHARDS  number of shards (required to set properly for
                         restore)
   --solr-hdfs-path=SOLR_HDFS_PATH
diff --git a/ambari-infra-solr-client/src/main/python/migrationHelper.py b/ambari-infra-solr-client/src/main/python/migrationHelper.py
index 2226346..0328106 100755
--- a/ambari-infra-solr-client/src/main/python/migrationHelper.py
+++ b/ambari-infra-solr-client/src/main/python/migrationHelper.py
@@ -152,6 +152,8 @@
     params['solr_hdfs_path'] = options.solr_hdfs_path
   if options.solr_keep_backup:
     params['solr_keep_backup'] = True
+  if options.skip_generate_restore_host_cores:
+    params['solr_skip_generate_restore_host_cores'] = True
   return params
 
 def validte_common_options(options, parser):
@@ -238,10 +240,12 @@
   parser.add_option("--disable-solr-host-check", dest="disable_solr_host_check", action="store_true", default=False, help="Disable to check solr hosts are good for the collection backups")
   parser.add_option("--core-filter", dest="core_filter", default=None, type="string", help="core filter for replica folders")
   parser.add_option("--skip-cores", dest="skip_cores", default=None, type="string", help="specific cores to skip (comma separated)")
+  parser.add_option("--skip-generate-restore-host-cores", dest="skip_generate_restore_host_cores", default=False, action="store_true", help="Skip the generation of restore_host_cores.json, just read the file itself, can be useful if command failed at some point.")
   parser.add_option("--shards", dest="solr_shards", type="int", default=0, help="number of shards (required to set properly for restore)")
   parser.add_option("--solr-hdfs-path", dest="solr_hdfs_path", type="string", default=None, help="Base path of Solr (where collections are located) if HDFS is used (like /user/infra-solr)")
   parser.add_option("--solr-keep-backup", dest="solr_keep_backup", default=False, action="store_true", help="If it is turned on, Snapshot Solr data will not be deleted from the filesystem during restore.")
 
+
   (options, args) = parser.parse_args()
   if options.action is None:
      parser.print_help()