diff --git a/cinder/volume/drivers/hitachi/hnas_backend.py b/cinder/volume/drivers/hitachi/hnas_backend.py index fa34b9b0f..4497d8247 100644 --- a/cinder/volume/drivers/hitachi/hnas_backend.py +++ b/cinder/volume/drivers/hitachi/hnas_backend.py @@ -96,12 +96,17 @@ class HNASSSHBackend(object): """Gets version information from the storage unit. :returns: dictionary with HNAS information - storage_version={ - 'mac': HNAS MAC ID, - 'model': HNAS model, - 'version': the software version, - 'hardware': the hardware version, - 'serial': HNAS serial number} + + .. code:: python + + storage_version={ + 'mac': HNAS MAC ID, + 'model': HNAS model, + 'version': the software version, + 'hardware': the hardware version, + 'serial': HNAS serial number + } + """ if not self.storage_version: version_info = {} @@ -131,11 +136,15 @@ class HNASSSHBackend(object): """Gets the IP addresses of all EVSs in HNAS. :returns: dictionary with EVS information - evs_info={ - : {evs_number: number identifying the EVS1 on HNAS}, - : {evs_number: number identifying the EVS2 on HNAS}, - ... - } + + .. code:: python + + evs_info={ + : {evs_number: number identifying the EVS1 on HNAS}, + : {evs_number: number identifying the EVS2 on HNAS}, + ... + } + """ evs_info = {} out, err = self._run_cmd("evsipaddr", "-l") @@ -154,15 +163,19 @@ class HNASSSHBackend(object): :param fs_label: Label of the filesystem :returns: dictionary with FS information - fs_info={ - 'id': a Logical Unit ID, - 'label': a Logical Unit name, - 'evs_id': the ID of the EVS in which the filesystem is created - (not present if there is a single EVS), - 'total_size': the total size of the FS (in GB), - 'used_size': the size that is already used (in GB), - 'available_size': the free space (in GB) + + .. code:: python + + fs_info={ + 'id': a Logical Unit ID, + 'label': a Logical Unit name, + 'evs_id': the ID of the EVS in which the filesystem is created + (not present if there is a single EVS), + 'total_size': the total size of the FS (in GB), + 'used_size': the size that is already used (in GB), + 'available_size': the free space (in GB) } + """ def _convert_size(param): size = float(param) * units.Mi @@ -401,7 +414,8 @@ class HNASSSHBackend(object): :param file_path: path of the cloned file :param fs_label: filesystem of the cloned file :param raise_except: If True exception will be raised for files that - aren't clones. If False, only an error message is logged. + aren't clones. If False, only an error message + is logged. :returns: list with names of the related files """ relatives = [] diff --git a/cinder/volume/drivers/hitachi/hnas_nfs.py b/cinder/volume/drivers/hitachi/hnas_nfs.py index 212fc2d23..45029d925 100644 --- a/cinder/volume/drivers/hitachi/hnas_nfs.py +++ b/cinder/volume/drivers/hitachi/hnas_nfs.py @@ -319,14 +319,18 @@ class HNASNFSDriver(nfs.NfsDriver): :param refresh: if it is True, update the stats first. :returns: dictionary with the stats from HNAS - _stats['pools'] = { - 'total_capacity_gb': total size of the pool, - 'free_capacity_gb': the available size, - 'QoS_support': bool to indicate if QoS is supported, - 'reserved_percentage': percentage of size reserved, - 'max_over_subscription_ratio': oversubscription rate, - 'thin_provisioning_support': thin support (True), - } + + .. code:: python + + _stats['pools'] = { + 'total_capacity_gb': total size of the pool, + 'free_capacity_gb': the available size, + 'QoS_support': bool to indicate if QoS is supported, + 'reserved_percentage': percentage of size reserved, + 'max_over_subscription_ratio': oversubscription rate, + 'thin_provisioning_support': thin support (True), + } + """ LOG.info("Getting volume stats") @@ -561,7 +565,7 @@ class HNASNFSDriver(nfs.NfsDriver): :param volume: cinder volume to manage :param existing_vol_ref: driver-specific information used to identify a - volume + volume :returns: the provider location :raises VolumeBackendAPIException: """ diff --git a/cinder/volume/drivers/hitachi/hnas_utils.py b/cinder/volume/drivers/hitachi/hnas_utils.py index 5a2aae950..edd8c4193 100644 --- a/cinder/volume/drivers/hitachi/hnas_utils.py +++ b/cinder/volume/drivers/hitachi/hnas_utils.py @@ -175,9 +175,17 @@ def read_xml_config(xml_config_file, svc_params, optional_params): :param xml_config_file: string filename containing XML configuration :param svc_params: parameters to configure the services - ['volume_type', 'hdp'] + + .. code:: python + + ['volume_type', 'hdp'] + :param optional_params: parameters to configure that are not mandatory - ['ssc_cmd', 'cluster_admin_ip0', 'chap_enabled'] + + .. code:: python + + ['ssc_cmd', 'cluster_admin_ip0', 'chap_enabled'] + """ if not os.access(xml_config_file, os.R_OK): @@ -278,7 +286,7 @@ def read_cinder_conf(config_opts): file. :param config_opts: Configuration object that contains the information - needed by HNAS driver + needed by HNAS driver :param dv_type: The type of the driver (NFS or iSCSI) :returns: Dictionary with the driver configuration """