Package report/repo parser integration
- parser able to filter package versions using keywords
- warning message on missing tag
- on the fly versions lookup (excluding '*.hotfix')
- updated versions compare routine
- lexical compare uses numbers, not ordinal values
- updated release version detection
- final report lists pkg section/app if no description given
- final report shows repo info for detected release version
Fixes:
- shorter alternate entrpoints: mcp-pkg, mcp-net, cmp-reclass
- flake8 syntax
- proper mirantis/non-mirantis versions getting
- exit on unexpected arguments
- salt-master class now gets linux codename by default and architecture
Change-Id: I0a2daadca8a1acaecafc8680226dc00d20cc24ce
Related-PROD: PROD-28199
diff --git a/cfg_checker/modules/packages/__init__.py b/cfg_checker/modules/packages/__init__.py
index 77c1654..45b1f77 100644
--- a/cfg_checker/modules/packages/__init__.py
+++ b/cfg_checker/modules/packages/__init__.py
@@ -60,6 +60,11 @@
action="store_true", default=False,
help="Save pkg descriptions while parsing"
)
+ pkg_repos.add_argument(
+ '--gen-apps',
+ action="store_true", default=False,
+ help="Save pkg descriptions while parsing"
+ )
pkg_show = pkg_subparsers.add_parser(
'show',
help="Show package history from the map"
@@ -69,6 +74,15 @@
nargs='+',
help="Package names separated by space"
)
+ pkg_app = pkg_subparsers.add_parser(
+ 'show-app',
+ help="Show packages for single app"
+ )
+ pkg_app.add_argument(
+ 'args',
+ nargs='+',
+ help="List of app's packages (or 'source' in package description)"
+ )
return _parser
@@ -115,7 +129,8 @@
args.url,
args.tag,
action="fetch",
- descriptions=args.gen_desc
+ descriptions=args.gen_desc,
+ apps=args.gen_apps
)
else:
# All of them
@@ -130,3 +145,13 @@
# show packages
for p in args.args:
r.show_package(p)
+
+
+def do_show_app(args):
+ """Shows packages for app
+ """
+ # Init manager
+ r = RepoManager()
+ # show packages
+ for a in args.args:
+ r.show_app(a)