ipaserver.plugins.serverroles.serverroles

class ipaserver.plugins.serverroles.serverroles(api_instance)[source]

Bases: ipalib.backend.Backend

This Backend can be used to query various information about server roles and attributes configured in the topology.

Public Data Attributes:

Inherited from Plugin

version

name

full_name

bases

doc

summary

api

Return API instance passed to __init__().

env

Backend

Command

Public Methods:

__init__(api_instance)

server_role_search([server_server, ...])

server_role_retrieve(server_server, ...)

config_retrieve(servrole[, include_hidden])

config_update(**attrs_values)

Inherited from Plugin

__init__(api_instance)

finalize()

Finalize plugin initialization.

ensure_finalized()

Finalize plugin initialization if it has not yet been finalized.

__repr__()

Return 'module_name.class_name()' representation.

Inherited from ReadOnly

__lock__()

Put this instance into a read-only state.

__islocked__()

Return True if instance is locked, otherwise False.

__setattr__(name, value)

If unlocked, set attribute named name to value.

__delattr__(name)

If unlocked, delete attribute named name.

Private Data Attributes:

Inherited from ReadOnly

_ReadOnly__locked

Private Methods:

_get_role(role_name)

_get_masters(role_name, include_hidden)

_get_assoc_attributes(role_name)

Inherited from Plugin

_Plugin__name_getter()

_Plugin__full_name_getter()

_Plugin__bases_getter()

_Plugin__doc_getter()

_Plugin__summary_getter()

_on_finalize()

Do custom finalization.


property Backend
property Command
__annotations__ = {}
__delattr__(name)

If unlocked, delete attribute named name.

If this instance is locked, an AttributeError will be raised.

Parameters

name – Name of attribute to delete.

__dict__ = mappingproxy({'__module__': 'ipaserver.plugins.serverroles', '__doc__': '\n    This Backend can be used to query various information about server roles\n    and attributes configured in the topology.\n    ', '__init__': <function serverroles.__init__>, '_get_role': <function serverroles._get_role>, '_get_masters': <function serverroles._get_masters>, '_get_assoc_attributes': <function serverroles._get_assoc_attributes>, 'server_role_search': <function serverroles.server_role_search>, 'server_role_retrieve': <function serverroles.server_role_retrieve>, 'config_retrieve': <function serverroles.config_retrieve>, 'config_update': <function serverroles.config_update>, '__annotations__': {}})
__init__(api_instance)[source]
__islocked__()

Return True if instance is locked, otherwise False.

__lock__()

Put this instance into a read-only state.

After the instance has been locked, attempting to set or delete an attribute will raise an AttributeError.

__module__ = 'ipaserver.plugins.serverroles'
__repr__()

Return ‘module_name.class_name()’ representation.

This representation could be used to instantiate this Plugin instance given the appropriate environment.

__setattr__(name, value)

If unlocked, set attribute named name to value.

If this instance is locked, an AttributeError will be raised.

Parameters
  • name – Name of attribute to set.

  • value – Value to assign to attribute.

__weakref__

list of weak references to the object (if defined)

_get_assoc_attributes(role_name)[source]
_get_masters(role_name, include_hidden)[source]
_get_role(role_name)[source]
_on_finalize()

Do custom finalization.

This method is called from finalize(). Subclasses can override this method in order to add custom finalization.

property api

Return API instance passed to __init__().

bases = (<class 'ipalib.backend.Backend'>,)
config_retrieve(servrole, include_hidden=True)[source]
config_update(**attrs_values)[source]
doc = '\n    This Backend can be used to query various information about server roles\n    and attributes configured in the topology.\n    '
ensure_finalized()

Finalize plugin initialization if it has not yet been finalized.

property env
finalize()

Finalize plugin initialization.

This method calls _on_finalize() and locks the plugin object.

Subclasses should not override this method. Custom finalization is done in _on_finalize().

class finalize_attr(name, value=None)

Bases: object

Create a stub object for plugin attribute that isn’t set until the finalization of the plugin initialization.

When the stub object is accessed, it calls ensure_finalized() to make sure the plugin initialization is finalized. The stub object is expected to be replaced with the actual attribute value during the finalization (preferably in _on_finalize()), otherwise an AttributeError is raised.

This is used to implement on-demand finalization of plugin initialization.

__get__(obj, cls)
__init__(name, value=None)
__module__ = 'ipalib.plugable'
__slots__ = ('name', 'value')
name
value
full_name = 'serverroles/1'
name = 'serverroles'
server_role_retrieve(server_server, role_servrole)[source]
summary = 'This Backend can be used to query various information about server roles\n    and attributes configured in the topology.'
version = '1'