[Pulp-list] Agent: Package.install() API
Jeff Ortel
jortel at redhat.com
Wed Nov 9 17:12:24 UTC 2011
As part of implementing and documenting the pulp agent API for package installs, I noticed
a few things that I think need be corrected/enhanced. They have to do with both the
Packages.install() signature and some properties in the consumer.conf. After a discussion
with Pradeep last night, I've decided to make the following changes to improve the quality
of the (agent) API and the readability of consumer.conf:
1) change:
Packages.install(names, reboot, assumeyes)
to:
Packages.install(names, reboot, importkeys)
The affect of "assumeyes" here is /really/ to permit YumBase to import GPG keys as needed.
Although, it's implemented in YumBase as "assumeyes", from an API perspective,
"importkeys" seems clearer.
2) change the return value of Packages.install()
from:
[[installed], [reboot_requested, rebooted]]
to:
{ installed : [], rebooted : <bool> }
A dict is clearer than coded list/tuples. Also, the 'reboot_requested' flag is really not
needed. The caller know that a reboot after package install was requested. The
'rebooted' flag indicates whether the 'reboot' request actually performed. The
consumer.conf can disallow reboots.
3) clarify the consumer.conf:
replace:
[client]
reboot_schedule = 3
import_gpg_keys = False
#assumeyes = False
with:
[reboot]
permit = False
delay = 3
[gpg]
permit_import = False
Comments?
More information about the Pulp-list
mailing list