How to use the zhmcclient._manager.BaseManager function in zhmcclient

To help you get started, we’ve selected a few zhmcclient examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github zhmcclient / python-zhmcclient / zhmcclient / _virtual_storage_resource.py View on Github external
"""

from __future__ import absolute_import

import re
import copy
# from requests.utils import quote

from ._manager import BaseManager
from ._resource import BaseResource
from ._logging import logged_api_call

__all__ = ['VirtualStorageResourceManager', 'VirtualStorageResource']


class VirtualStorageResourceManager(BaseManager):
    """
    Manager providing access to the :term:`virtual storage resources
    ` in a particular :term:`storage group`.

    Derived from :class:`~zhmcclient.BaseManager`; see there for common methods
    and attributes.

    Objects of this class are not directly created by the user; they are
    accessible via the following instance variable of a
    :class:`~zhmcclient.StorageGroup` object:

    * :attr:`~zhmcclient.StorageGroup.virtual_storage_resources`
    """

    def __init__(self, storage_group):
        # This function should not go into the docs.
github zhmcclient / python-zhmcclient / zhmcclient / _ldap_server_definition.py View on Github external
information about an LDAP server that may be used for HMC user authentication
purposes.
"""

from __future__ import absolute_import

import copy

from ._manager import BaseManager
from ._resource import BaseResource
from ._logging import logged_api_call

__all__ = ['LdapServerDefinitionManager', 'LdapServerDefinition']


class LdapServerDefinitionManager(BaseManager):
    """
    Manager providing access to the :term:`LDAP Server Definition` resources of
    a HMC.

    Derived from :class:`~zhmcclient.BaseManager`; see there for common methods
    and attributes.

    Objects of this class are not directly created by the user; they are
    accessible via the following instance variable of a
    :class:`~zhmcclient.Console` object:

    * :attr:`zhmcclient.Console.ldap_server_definitions`
    """

    def __init__(self, console):
        # This function should not go into the docs.
github zhmcclient / python-zhmcclient / zhmcclient / _storage_group.py View on Github external
from __future__ import absolute_import

import copy
import re

from ._manager import BaseManager
from ._resource import BaseResource
from ._storage_volume import StorageVolumeManager
from ._virtual_storage_resource import VirtualStorageResourceManager
from ._logging import logged_api_call

__all__ = ['StorageGroupManager', 'StorageGroup']


class StorageGroupManager(BaseManager):
    """
    Manager providing access to the :term:`storage groups ` of
    the HMC.

    Derived from :class:`~zhmcclient.BaseManager`; see there for common methods
    and attributes.

    Objects of this class are not directly created by the user; they are
    accessible via the following instance variable:

    * :attr:`~zhmcclient.Console.storage_groups` of a
      :class:`~zhmcclient.Console` object.
    """

    def __init__(self, console):
        # This function should not go into the docs.
github zhmcclient / python-zhmcclient / zhmcclient / _user.py View on Github external
"""
A :term:`User` resource represents a user configured in the HMC.
"""

from __future__ import absolute_import

import copy

from ._manager import BaseManager
from ._resource import BaseResource
from ._logging import logged_api_call

__all__ = ['UserManager', 'User']


class UserManager(BaseManager):
    """
    Manager providing access to the :term:`User` resources of a HMC.

    Derived from :class:`~zhmcclient.BaseManager`; see there for common methods
    and attributes.

    Objects of this class are not directly created by the user; they are
    accessible via the following instance variable of a
    :class:`~zhmcclient.Console` object:

    * :attr:`zhmcclient.Console.users`
    """

    def __init__(self, console):
        # This function should not go into the docs.
        # Parameters:
github zhmcclient / python-zhmcclient / zhmcclient / _user_pattern.py View on Github external
order can be customized through the
:meth:`~zhmcclient.UserPatternManager.reorder` method.
"""

from __future__ import absolute_import

import copy

from ._manager import BaseManager
from ._resource import BaseResource
from ._logging import logged_api_call

__all__ = ['UserPatternManager', 'UserPattern']


class UserPatternManager(BaseManager):
    """
    Manager providing access to the :term:`User Pattern` resources of a HMC.

    Derived from :class:`~zhmcclient.BaseManager`; see there for common methods
    and attributes.

    Objects of this class are not directly created by the user; they are
    accessible via the following instance variable of a
    :class:`~zhmcclient.Console` object:

    * :attr:`zhmcclient.Console.user_patterns`
    """

    def __init__(self, console):
        # This function should not go into the docs.
        # Parameters:
github zhmcclient / python-zhmcclient / zhmcclient / _metrics.py View on Github external
from datetime import datetime
import pytz
import six

from ._manager import BaseManager
from ._resource import BaseResource
from ._logging import logged_api_call
from ._exceptions import NotFound
from ._utils import datetime_from_timestamp, repr_list

__all__ = ['MetricsContextManager', 'MetricsContext', 'MetricGroupDefinition',
           'MetricDefinition', 'MetricsResponse', 'MetricGroupValues',
           'MetricObjectValues']


class MetricsContextManager(BaseManager):
    """
    Manager providing access to the :term:`Metrics Context` resources that
    were created through this manager object.

    Derived from :class:`~zhmcclient.BaseManager`; see there for common methods
    and attributes.

    Objects of this class are not directly created by the user; they are
    accessible via the :attr:`~zhmcclient.Client.metrics_contexts` attribute
    of the :class:`~zhmcclient.Client` object connected to the HMC.
    """

    def __init__(self, client):
        # This function should not go into the docs.
        # Parameters:
        #   client (:class:`~zhmcclient.Client`):
github zhmcclient / python-zhmcclient / zhmcclient / _password_rule.py View on Github external
authentication (i.e. not LDAP) is assigned a password rule. There are certain
system-defined password rules available for use.
"""

from __future__ import absolute_import

import copy

from ._manager import BaseManager
from ._resource import BaseResource
from ._logging import logged_api_call

__all__ = ['PasswordRuleManager', 'PasswordRule']


class PasswordRuleManager(BaseManager):
    """
    Manager providing access to the :term:`Password Rule` resources of a HMC.

    Derived from :class:`~zhmcclient.BaseManager`; see there for common methods
    and attributes.

    Objects of this class are not directly created by the user; they are
    accessible via the following instance variable of a
    :class:`~zhmcclient.Console` object:

    * :attr:`zhmcclient.Console.password_rules`
    """

    def __init__(self, console):
        # This function should not go into the docs.
        # Parameters:
github zhmcclient / python-zhmcclient / zhmcclient / _adapter.py View on Github external
"""

from __future__ import absolute_import

import copy

from ._manager import BaseManager
from ._resource import BaseResource
from ._port import PortManager
from ._logging import logged_api_call
from ._utils import repr_dict, repr_manager, repr_timestamp

__all__ = ['AdapterManager', 'Adapter']


class AdapterManager(BaseManager):
    """
    Manager providing access to the :term:`Adapters ` in a particular
    :term:`CPC`.

    Derived from :class:`~zhmcclient.BaseManager`; see there for common methods
    and attributes.

    Objects of this class are not directly created by the user; they are
    accessible via the following instance variable of a
    :class:`~zhmcclient.Cpc` object (in DPM mode):

    * :attr:`~zhmcclient.Cpc.adapters`
    """

    def __init__(self, cpc):
        # This function should not go into the docs.
github zhmcclient / python-zhmcclient / zhmcclient / _lpar.py View on Github external
"""

from __future__ import absolute_import

import time
import copy

from ._manager import BaseManager
from ._resource import BaseResource
from ._exceptions import StatusTimeout
from ._logging import logged_api_call

__all__ = ['LparManager', 'Lpar']


class LparManager(BaseManager):
    """
    Manager providing access to the :term:`LPARs ` in a particular
    :term:`CPC`.

    Derived from :class:`~zhmcclient.BaseManager`; see there for common methods
    and attributes.

    Objects of this class are not directly created by the user; they are
    accessible via the following instance variable of a
    :class:`~zhmcclient.Cpc` object (in DPM mode):

    * :attr:`~zhmcclient.Cpc.lpars`
    """

    def __init__(self, cpc):
        # This function should not go into the docs.
github zhmcclient / python-zhmcclient / zhmcclient / _nic.py View on Github external
NICs only exist in :term:`CPCs ` that are in DPM mode.
"""

from __future__ import absolute_import

import copy

from ._manager import BaseManager
from ._resource import BaseResource
from ._logging import logged_api_call

__all__ = ['NicManager', 'Nic']


class NicManager(BaseManager):
    """
    Manager providing access to the :term:`NICs ` in a particular
    :term:`Partition`.

    Derived from :class:`~zhmcclient.BaseManager`; see there for common methods
    and attributes.

    Objects of this class are not directly created by the user; they are
    accessible via the following instance variable of a
    :class:`~zhmcclient.Partition` object (in DPM mode):

    * :attr:`~zhmcclient.Partition.nics`
    """

    def __init__(self, partition):
        # This function should not go into the docs.