mirror of
https://github.com/munki/munki.git
synced 2026-04-26 06:48:57 -05:00
Implement featured_installs array in manifests.
This commit is contained in:
@@ -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):
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user