summaryrefslogtreecommitdiffstats
path: root/src/lib/Bcfg2/Server/Plugin
diff options
context:
space:
mode:
authorChris St. Pierre <chris.a.st.pierre@gmail.com>2013-09-05 13:07:42 -0400
committerChris St. Pierre <chris.a.st.pierre@gmail.com>2013-09-05 13:07:43 -0400
commitf8416134cc80d704e6f139aa1ab1ce47e00e4f7f (patch)
tree517443490d17699c0c40ee165adb0ae80ab6146d /src/lib/Bcfg2/Server/Plugin
parent5c9cd24767bcbc8cdb39eebf2fd81e9c814c01af (diff)
downloadbcfg2-f8416134cc80d704e6f139aa1ab1ce47e00e4f7f.tar.gz
bcfg2-f8416134cc80d704e6f139aa1ab1ce47e00e4f7f.tar.bz2
bcfg2-f8416134cc80d704e6f139aa1ab1ce47e00e4f7f.zip
Allow Connector to create new groups
Connector plugins can now create new groups, including the full range of options on those groups (profile, public, category, etc.).
Diffstat (limited to 'src/lib/Bcfg2/Server/Plugin')
-rw-r--r--src/lib/Bcfg2/Server/Plugin/interfaces.py24
1 files changed, 23 insertions, 1 deletions
diff --git a/src/lib/Bcfg2/Server/Plugin/interfaces.py b/src/lib/Bcfg2/Server/Plugin/interfaces.py
index 376030792..33f6d338c 100644
--- a/src/lib/Bcfg2/Server/Plugin/interfaces.py
+++ b/src/lib/Bcfg2/Server/Plugin/interfaces.py
@@ -220,10 +220,32 @@ class Connector(object):
def get_additional_groups(self, metadata): # pylint: disable=W0613
""" Return a list of additional groups for the given client.
+ Each group can be either the name of a group (a string), or a
+ :class:`Bcfg2.Server.Plugins.Metadata.MetadataGroup` object
+ that defines other data besides just the name. Note that you
+ cannot return a
+ :class:`Bcfg2.Server.Plugins.Metadata.MetadataGroup` object
+ that clobbers a group defined by another plugin; the original
+ group will be used instead. For instance, assume the
+ following in ``Metadata/groups.xml``:
+
+ .. code-block:: xml
+
+ <Groups>
+ ...
+ <Group name="foo" public="false"/>
+ </Groups>
+
+ You could not subsequently return a
+ :class:`Bcfg2.Server.Plugins.Metadata.MetadataGroup` object
+ with ``public=True``; a warning would be issued, and the
+ original (non-public) ``foo`` group would be used.
:param metadata: The client metadata
:type metadata: Bcfg2.Server.Plugins.Metadata.ClientMetadata
- :return: list of strings
+ :return: list of strings or
+ :class:`Bcfg2.Server.Plugins.Metadata.MetadataGroup`
+ objects.
"""
return list()