Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions docs/appendix.rst
Original file line number Diff line number Diff line change
Expand Up @@ -400,11 +400,11 @@ Resources scoped to the HMC
MFA Server Definition
The information in an HMC about an MFA server that may be used for
HMC user authorization purposes.

SSO Server Definition
The information in an HMC about an SSO server that may be used for
HMC user authorization purposes.

Password Rule
A rule which HMC users need to follow when creating a HMC logon password.

Expand Down Expand Up @@ -539,13 +539,13 @@ Resources scoped to CPCs in DPM mode

Storage Volume Template
A template for :term:`Storage Volumes <Storage Volume>`.
Tape library

Tape library
A Tape Library represents one physical tape storage unit connected to
a CPC.Tape libraries are automatically discovered,but discovery requires
preprocessing,A single Worldwide Port Name (WWPN) must be zoned so the CPC
can see the tape library.
For details, see section :ref:`Tape Library`.
For details, see section :ref:`Tape Libraries`.

vHBA
Synonym for :term:`HBA`. In this resource model, HBAs are always
Expand Down
4 changes: 2 additions & 2 deletions docs/resources.rst
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ Storage Volumes
.. _`Tape Libraries`:

Tape Libraries
-----------------
--------------

.. automodule:: zhmcclient._tape_library

Expand Down Expand Up @@ -596,7 +596,7 @@ LDAP Server Definition
:autosummary:
:autosummary-inherited-members:
:special-members: __str__


.. _`SSO Server Definition`:

Expand Down
3 changes: 1 addition & 2 deletions zhmcclient/_console.py
Original file line number Diff line number Diff line change
Expand Up @@ -255,8 +255,7 @@ def storage_group_templates(self):
def tape_library(self):
"""
:class:`~zhmcclient.TapeLibraryManager`: Access to the
:term:`TapeLibrary <TapeLibrary>` in this
Console.
:term:`tape libraries <tape library>` of this Console.
"""
# We do here some lazy loading.
if not self._tape_library:
Expand Down
116 changes: 56 additions & 60 deletions zhmcclient/_tape_library.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@

class TapeLibraryManager(BaseManager):
"""
Manager providing access to the
:term:`tape libraries <tape libraries>` of the HMC.
Manager providing access to the
:term:`tape libraries <tape library>` of the HMC.

Derived from :class:`~zhmcclient.BaseManager`; see there for common methods
and attributes.
Expand Down Expand Up @@ -133,19 +133,19 @@ def list(self, full_properties=False, filter_args=None):
The listing of resources is handled in an optimized way:

* If this manager is enabled for :ref:`auto-updating`, a locally
maintained resource list is used (which is automatically updated via
inventory notifications from the HMC) and the provided filter
arguments are applied.
maintained resource list is used (which is automatically updated via
inventory notifications from the HMC) and the provided filter
arguments are applied.

* Otherwise, if the filter arguments specify the resource name as a
single filter argument with a straight match string (i.e. without
regular expressions), an optimized lookup is performed based on a
locally maintained name-URI cache.
single filter argument with a straight match string (i.e. without
regular expressions), an optimized lookup is performed based on a
locally maintained name-URI cache.

* Otherwise, the HMC List operation is performed with the subset of the
provided filter arguments that can be handled on the HMC side and the
remaining filter arguments are applied on the client side on the list
result.
provided filter arguments that can be handled on the HMC side and the
remaining filter arguments are applied on the client side on the list
result.

HMC/SE version requirements:

Expand All @@ -154,16 +154,16 @@ def list(self, full_properties=False, filter_args=None):
Authorization requirements:

* Object-access permission to any tape libraries to be included in the
result.
result.

Parameters:

full_properties (bool):
full_properties (bool):
Controls that the full set of resource properties for each returned
tape library is being retrieved, vs. only the following short
set: "object-uri", "cpc-uri", "name", and "state".

filter_args (dict):
filter_args (dict):
Filter arguments that narrow the list of returned resources to
those that match the specified filter arguments. For details, see
:ref:`Filtering`.
Expand All @@ -172,15 +172,15 @@ def list(self, full_properties=False, filter_args=None):

Returns:

: A list of :class:`~zhmcclient.TapeLibrary` objects.
: A list of :class:`~zhmcclient.TapeLibrary` objects.

Raises:

:exc:`~zhmcclient.HTTPError`
:exc:`~zhmcclient.ParseError`
:exc:`~zhmcclient.AuthError`
:exc:`~zhmcclient.ConnectionError`
:exc:`~zhmcclient.FilterConversionError`
:exc:`~zhmcclient.HTTPError`
:exc:`~zhmcclient.ParseError`
:exc:`~zhmcclient.AuthError`
:exc:`~zhmcclient.ConnectionError`
:exc:`~zhmcclient.FilterConversionError`
"""

result_prop = "tape-libraries"
Expand All @@ -190,9 +190,7 @@ def list(self, full_properties=False, filter_args=None):
)

@logged_api_call
def request_zoning(
self, email_to_addresses=None, email_cc_addresses=None
):
def request_zoning(self, email_to_addresses=None, email_cc_addresses=None):
"""
Request tape library zoning configuration by sending email notifications
to storage administrators.
Expand All @@ -212,26 +210,26 @@ def request_zoning(

Parameters:

email_to_addresses (:term:`iterable` of :term:`string`): Email
email_to_addresses (:term:`iterable` of :term:`string`): Email
addresses of one or more storage administrators to be notified.
If `None` or empty, no email will be sent.

email_cc_addresses (:term:`iterable` of :term:`string`): Email
email_cc_addresses (:term:`iterable` of :term:`string`): Email
addresses of one or more storage administrators to be copied
on the notification email.
If `None` or empty, nobody will be copied on the email.

Returns:

dict: A dictionary with the operation results.
dict: A dictionary with the operation results.

Raises:

:exc:`~zhmcclient.HTTPError`: HTTP status 409, reason 487 if no FCP
adapters are available on the CPC.
:exc:`~zhmcclient.ParseError`
:exc:`~zhmcclient.AuthError`
:exc:`~zhmcclient.ConnectionError`
:exc:`~zhmcclient.HTTPError`: HTTP status 409, reason 487 if no FCP
adapters are available on the CPC.
:exc:`~zhmcclient.ParseError`
:exc:`~zhmcclient.AuthError`
:exc:`~zhmcclient.ConnectionError`
"""

body = {}
Expand Down Expand Up @@ -273,21 +271,21 @@ def discover(

* Object-access permission to the CPC.
* Task permission to the "Configure Storage - System Programmer" task
or to the "Configure Storage - Storage Administrator" task.
or to the "Configure Storage - Storage Administrator" task.

Parameters:

force_restart (bool):
force_restart (bool):
Indicates if there is an in-progress discovery operation for the
CPC, it should be terminated and started again.
If `False` or there is no in-progress discovery operation,
a new one is started.

wait_for_completion (bool):
wait_for_completion (bool):
Boolean controlling whether this method should wait for completion
of the asynchronous job performing the discovery.

operation_timeout (:term:`number`):
operation_timeout (:term:`number`):
Timeout in seconds, for waiting for completion of the asynchronous
job performing the discovery. The special value 0 means that no
timeout is set. `None` means that the default async operation
Expand All @@ -297,24 +295,22 @@ def discover(

Returns:

`None` or :class:`~zhmcclient.Job`:

If `wait_for_completion` is `True`, returns nothing.

If `wait_for_completion` is `False`, returns a
:class:`~zhmcclient.Job` object representing the asynchronously
executing job on the HMC.
This job does not support cancellation.
`None` or :class:`~zhmcclient.Job`:
If `wait_for_completion` is `True`, returns nothing.
If `wait_for_completion` is `False`, returns a
:class:`~zhmcclient.Job` object representing the asynchronously
executing job on the HMC.
This job does not support cancellation.

Raises:

:exc:`~zhmcclient.HTTPError`: HTTP status 409, reason 501 if the CPC
does not have a management-world-wide-port-name configured.
:exc:`~zhmcclient.ParseError`
:exc:`~zhmcclient.AuthError`
:exc:`~zhmcclient.ConnectionError`
:exc:`~zhmcclient.OperationTimeout`: The timeout expired while
waiting for completion of the operation.
:exc:`~zhmcclient.HTTPError`: HTTP status 409, reason 501 if the CPC
does not have a management-world-wide-port-name configured.
:exc:`~zhmcclient.ParseError`
:exc:`~zhmcclient.AuthError`
:exc:`~zhmcclient.ConnectionError`
:exc:`~zhmcclient.OperationTimeout`: The timeout expired while
waiting for completion of the operation.
"""

body = {}
Expand Down Expand Up @@ -383,14 +379,14 @@ def undefine(self):

* Object-access permission to this tape library.
* Task permissions are: "Configure Storage – System Programmer" or
"Configure Storage – Storage Administrator"
"Configure Storage – Storage Administrator"

Raises:

:exc:`~zhmcclient.HTTPError`
:exc:`~zhmcclient.ParseError`
:exc:`~zhmcclient.AuthError`
:exc:`~zhmcclient.ConnectionError`
:exc:`~zhmcclient.HTTPError`
:exc:`~zhmcclient.ParseError`
:exc:`~zhmcclient.AuthError`
:exc:`~zhmcclient.ConnectionError`
"""
self.manager.session.post(uri=self.uri + "/operations/undefine",
resource=self)
Expand Down Expand Up @@ -419,17 +415,17 @@ def update_properties(self, properties):

Parameters:

properties (dict): New values for the properties to be updated.
properties (dict): New values for the properties to be updated.
Properties not to be updated are omitted.
Allowable properties are the writeable properties defined for
the tape library resource in the :term:`HMC API` book.

Raises:

:exc:`~zhmcclient.HTTPError`
:exc:`~zhmcclient.ParseError`
:exc:`~zhmcclient.AuthError`
:exc:`~zhmcclient.ConnectionError`
:exc:`~zhmcclient.HTTPError`
:exc:`~zhmcclient.ParseError`
:exc:`~zhmcclient.AuthError`
:exc:`~zhmcclient.ConnectionError`
"""
result = self.manager.session.post(self.uri,
resource=self, body=properties)
Expand Down
4 changes: 4 additions & 0 deletions zhmcclient/mock/_hmc.py
Original file line number Diff line number Diff line change
Expand Up @@ -1830,7 +1830,9 @@ def add(self, properties):
# pylint: disable=useless-super-delegation
"""
Add a faked SSO Server Definition resource.

Parameters:

properties (dict):
Resource properties.
Special handling and requirements for certain properties:
Expand All @@ -1842,7 +1844,9 @@ def add(self, properties):
if not specified.
* All of the other class-soecific resource properties will be set
to a default value consistent with the HMC data model.

Returns:

:class:`~zhmcclient.mock.FakedSSOServerDefinition`: The faked
SSOServerDefinition resource.
"""
Expand Down
Loading