pulp.app.apps¶
pulpcore.app.apps
¶
PulpPluginAppConfig(app_name, app_module)
¶
Bases: AppConfig
AppConfig class. Use this in plugins to identify your app as a Pulp plugin.
import_urls()
¶
If a plugin defines a urls.py, include it.
import_modelresources()
¶
If a plugin has a modelresource.py, import it
(This exists when a plugin knows how to import-export itself)
import_replicators()
¶
If a plugin has a replicator.py, import it.
This exists when a plugin supports replication from an upstream Pulp.
pulp_plugin_configs()
¶
A generator of Pulp plugin AppConfigs
This makes it easy to iterate over just the installed Pulp plugins when working with discovered plugin components.
get_plugin_config(plugin_app_label)
¶
A getter of specific pulp plugin config
This makes it easy to retrieve a config for a specific Pulp plugin when looking for a registered model.
Parameters:
-
plugin_app_label
(str
) –Django app label of the pulp plugin
Returns:
-
–
pulpcore.app.apps.PulpPluginAppConfig: The app config of the Pulp plugin.
Raises:
-
MissingPlugin
–When plugin with the requested app label is not installed.
adjust_roles(apps, role_prefix, desired_roles, verbosity=1)
¶
Adjust all roles with a given prefix.
Parameters:
-
apps
(Apps
) –Django app registry
-
role_prefix
(str
) –Common prefix of roles to adjust
-
desired_roles
(dict
) –Dictionary of desired state of roles, where each entry is either a list of permissions, or a dict with "description" and "permissions" as keys.