diff --git a/docs/appendix.rst b/docs/appendix.rst index 590477bf..030ffb41 100644 --- a/docs/appendix.rst +++ b/docs/appendix.rst @@ -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. @@ -539,13 +539,13 @@ Resources scoped to CPCs in DPM mode Storage Volume Template A template for :term:`Storage Volumes `. - - 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 diff --git a/docs/resources.rst b/docs/resources.rst index 221d5bba..12cdfe69 100644 --- a/docs/resources.rst +++ b/docs/resources.rst @@ -341,7 +341,7 @@ Storage Volumes .. _`Tape Libraries`: Tape Libraries ------------------ +-------------- .. automodule:: zhmcclient._tape_library @@ -596,7 +596,7 @@ LDAP Server Definition :autosummary: :autosummary-inherited-members: :special-members: __str__ - + .. _`SSO Server Definition`: diff --git a/zhmcclient/_console.py b/zhmcclient/_console.py index 3a87d5a5..363c3ffa 100644 --- a/zhmcclient/_console.py +++ b/zhmcclient/_console.py @@ -255,8 +255,7 @@ def storage_group_templates(self): def tape_library(self): """ :class:`~zhmcclient.TapeLibraryManager`: Access to the - :term:`TapeLibrary ` in this - Console. + :term:`tape libraries ` of this Console. """ # We do here some lazy loading. if not self._tape_library: diff --git a/zhmcclient/_tape_library.py b/zhmcclient/_tape_library.py index b52a9dad..2787acb2 100644 --- a/zhmcclient/_tape_library.py +++ b/zhmcclient/_tape_library.py @@ -46,8 +46,8 @@ class TapeLibraryManager(BaseManager): """ - Manager providing access to the - :term:`tape libraries ` of the HMC. + Manager providing access to the + :term:`tape libraries ` of the HMC. Derived from :class:`~zhmcclient.BaseManager`; see there for common methods and attributes. @@ -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: @@ -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`. @@ -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" @@ -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. @@ -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 = {} @@ -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 @@ -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 = {} @@ -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) @@ -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) diff --git a/zhmcclient/mock/_hmc.py b/zhmcclient/mock/_hmc.py index 225d522c..83ae0530 100644 --- a/zhmcclient/mock/_hmc.py +++ b/zhmcclient/mock/_hmc.py @@ -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: @@ -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. """