Add option for forced direct SSH connection

 - Added --ssh-direct option
 - Added 2019.2.14 package versions
 - Updated kaas package versions
 - --tag option forces update if build repos set
 - Rebuilt tags archive to hold only active versions

Change-Id: I69886f960eb385fc1647d8c1080344ea2508712c
Related-PROD: PROD-35903
diff --git a/cfg_checker/modules/packages/repos.py b/cfg_checker/modules/packages/repos.py
index 1a040ff..6853a8f 100644
--- a/cfg_checker/modules/packages/repos.py
+++ b/cfg_checker/modules/packages/repos.py
@@ -12,6 +12,8 @@
 from cfg_checker.common.const import _repos_info_archive
 from cfg_checker.common.const import _repos_versions_archive
 from cfg_checker.common.const import ubuntu_releases
+from cfg_checker.common.const import kaas_ubuntu_active
+from cfg_checker.common.const import mcp_active_tags as active_tags
 from cfg_checker.common.file_utils import ensure_folder_exists
 from cfg_checker.common.file_utils import get_gzipped_file
 from cfg_checker.common.settings import pkg_dir
@@ -218,14 +220,27 @@
                 _tags.remove('hotfix')
             if "update" in _tags:
                 _tags.remove('update')
+            # Filter out not active tags
+            logger_cli.info("Active tags for mcp: {}".format(
+                ", ".join(active_tags)
+            ))
+            logger_cli.info("Active kaas ubuntu repos: {}".format(
+                ", ".join(kaas_ubuntu_active)
+            ))
+            _active_tags = [t for t in _tags if t in active_tags]
+
             # search tags in subfolders
             _h_tags, _ = self._ls_repo_page(base_url + 'hotfix')
             _u_tags, _ = self._ls_repo_page(base_url + 'update')
-            _tags.extend([t for t in _h_tags if t not in _tags])
-            _tags.extend([t for t in _u_tags if t not in _tags])
-            _progress = Progress(len(_tags))
+            _active_tags.extend(
+                [t for t in _h_tags if t not in _tags and t in active_tags]
+            )
+            _active_tags.extend(
+                [t for t in _u_tags if t not in _tags and t in active_tags]
+            )
+            _progress = Progress(len(_active_tags))
             _index = 0
-            for _tag in _tags:
+            for _tag in _active_tags:
                 _repos.update(self._find_tag(_tag, base_url))
                 _repos.update(self._find_tag(_tag, base_url, label="hotfix"))
                 _repos.update(self._find_tag(_tag, base_url, label="update"))
@@ -237,7 +252,7 @@
         for _label in _repos.keys():
             logger_cli.info("-> processing tag '{}'".format(_label))
             _name = _label + ".json"
-            if _repotgz.has_file(_name):
+            if _repotgz.has_file(_name) and not tag:
                 logger_cli.info(
                     "-> skipping, '{}' already has '{}'".format(
                         _repos_info_archive,
@@ -271,7 +286,7 @@
                 )
 
                 # Searching Package collections
-                if _stag in ubuntu_releases or _stag.startswith("ubuntu-2020"):
+                if _stag in ubuntu_releases or _stag in kaas_ubuntu_active:
                     # if stag is the release, this is all packages
                     _repo["all"][_stag] = []
                     _repo["all"]["url"] = _n_url(_u)
@@ -572,7 +587,7 @@
         _other_repos = 0
         for _c, _d in _info.items():
             for _ur, _l in _d.items():
-                if _ur in ubuntu_releases or _ur.startswith("ubuntu-2020"):
+                if _ur in ubuntu_releases or _ur in kaas_ubuntu_active:
                     _ubuntu_package_repos += len(_l)
                 elif _ur != 'url':
                     _other_repos += len(_l)