Implement featured_installs array in manifests.

This commit is contained in:
Per Olofsson
2017-03-09 13:25:48 +01:00
parent 0829c2406c
commit c773ebe7ac
4 changed files with 14 additions and 2 deletions
-2
View File
@@ -1103,7 +1103,6 @@ def main():
'update_for',
'category',
'developer',
'featured',
'icon_name',
'unused_software_removal_info']:
if key in matchingpkginfo:
@@ -1117,7 +1116,6 @@ def main():
('Version', 'version', 'str'),
('Category', 'category', 'str'),
('Developer', 'developer', 'str'),
('Featured', 'featured', 'bool'),
('Unattended install', 'unattended_install', 'bool'),
('Unattended uninstall', 'unattended_uninstall', 'bool'),
)
@@ -606,6 +606,8 @@ def process_manifest_for_key(manifest, manifest_key, installinfo,
process_optional_install(item, cataloglist, installinfo)
elif manifest_key == 'managed_uninstalls':
dummy_result = process_removal(item, cataloglist, installinfo)
elif manifest_key == 'featured_installs':
installinfo['featured_installs'].append(item)
def process_removal(manifestitem, cataloglist, installinfo):
+7
View File
@@ -87,6 +87,7 @@ def check(client_id='', localmanifestpath=None):
installinfo['processed_uninstalls'] = []
installinfo['managed_updates'] = []
installinfo['optional_installs'] = []
installinfo['featured_installs'] = []
installinfo['managed_installs'] = []
installinfo['removals'] = []
@@ -137,6 +138,12 @@ def check(client_id='', localmanifestpath=None):
if processes.stop_requested():
return 0
# build list of featured installs
analyze.process_manifest_for_key(
mainmanifestpath, 'featured_installs', installinfo)
if processes.stop_requested():
return 0
# verify available license seats for optional installs
if installinfo.get('optional_installs'):
licensing.update_available_license_seats(installinfo)