Manila PowerMax - rebrand from VMAX to PowerMax

Rebrand from VMAX to PowerMax includes change tags, directory structure,
file names and documentation.

Implements: blueprint powermax-rebrand-manila

Change-Id: Ie9ba5939b223d7061a3b2707ee9ef899f1fe7f66
This commit is contained in:
Helen Walsh 2019-06-04 17:21:57 +01:00
parent 6afe12050d
commit 6995b9f975
16 changed files with 292 additions and 260 deletions

View File

@ -10,7 +10,7 @@ Share drivers
drivers/generic-driver.rst
drivers/cephfs-native-driver.rst
drivers/dell-emc-vmax-driver.rst
drivers/dell-emc-powermax-driver.rst
drivers/dell-emc-unity-driver.rst
drivers/dell-emc-vnx-driver.rst
drivers/glusterfs-driver.rst

View File

@ -1,29 +1,29 @@
====================
Dell EMC VMAX driver
====================
========================
Dell EMC PowerMax Plugin
========================
The Dell EMC Shared File Systems service driver framework (EMCShareDriver)
utilizes the Dell EMC storage products to provide the shared file systems
to OpenStack. The Dell EMC driver is a plug-in based driver which is designed
to use different plug-ins to manage different Dell EMC storage products.
The VMAX plug-in manages the VMAX to provide shared file systems. The EMC
driver framework with the VMAX plug-in is referred to as the VMAX driver
in this document.
The PowerMax plug-in manages the PowerMax to provide shared file systems.
The Dell EMC driver framework with the PowerMax plug-in is referred to as the
PowerMax driver in this document.
This driver performs the operations on VMAX eNAS by XMLAPI and the file
command line. Each back end manages one Data Mover of VMAX. Multiple
This driver performs the operations on PowerMax eNAS by XMLAPI and the file
command line. Each back end manages one Data Mover of PowerMax. Multiple
Shared File Systems service back ends need to be configured to manage
multiple Data Movers.
Requirements
~~~~~~~~~~~~
- VMAX eNAS OE for File version 8.1 or higher
- PowerMax eNAS OE for File version 8.1 or higher
- VMAX Unified or File only
- PowerMax Unified or File only
- The following licenses should be activated on VMAX for File:
- The following licenses should be activated on PowerMax for File:
- CIFS
@ -60,17 +60,17 @@ The following operations are supported:
- Create a share from a snapshot.
While the generic driver creates shared file systems based on cinder
volumes attached to nova VMs, the VMAX driver performs similar operations
volumes attached to nova VMs, the PowerMax driver performs similar operations
using the Data Movers on the array.
Pre-configurations on VMAX
~~~~~~~~~~~~~~~~~~~~~~~~~~
Pre-configurations on PowerMax
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#. Configure a storage pool
There is a one to one relationship between a storage pool in embedded NAS
to a storage group on the VMAX. The best way to provision
storage for file is from the Unisphere for VMAX UI rather than eNAS UI.
to a storage group on the PowerMax. The best way to provision
storage for file is from the Unisphere for PowerMax UI rather than eNAS UI.
Go to :menuselection:`{array} > SYSTEM > FIle` and under
:menuselection:`Actions` click :menuselection:`PROVISION STORAGE FOR FILE`
@ -109,7 +109,7 @@ Pre-configurations on VMAX
#. Enable CIFS service on Data Mover.
Ensure the CIFS service is enabled on the Data Mover which is going
to be managed by VMAX driver.
to be managed by PowerMax driver.
To start the CIFS service, use the following command:
@ -136,7 +136,7 @@ Pre-configurations on VMAX
#. NTP settings on Data Mover.
VMAX driver only supports CIFS share creation with share network
PowerMax driver only supports CIFS share creation with share network
which has an Active Directory security-service associated.
Creating CIFS share requires that the time on the Data Mover is in
@ -185,10 +185,10 @@ Pre-configurations on VMAX
#. Configure User Mapping on the Data Mover.
Before creating CIFS share using VMAX driver, you must select a
Before creating CIFS share using PowerMax driver, you must select a
method of mapping Windows SIDs to UIDs and GIDs. DELL EMC recommends
using usermapper in single protocol (CIFS) environment which is
enabled on VMAX eNAS by default.
enabled on PowerMax eNAS by default.
To check usermapper status, use the following command syntax:
@ -205,7 +205,7 @@ Pre-configurations on VMAX
$ server_usermapper <movername> -enable
# movername = name of the Data Mover
For a multiple protocol environment, refer to Configuring VMAX eNAS User
For a multiple protocol environment, refer to Configuring PowerMax eNAS User
Mapping on `EMC support site <http://support.emc.com>`_ for
additional information.
@ -257,42 +257,42 @@ Back-end configurations
The following parameters need to be configured in the
``/etc/manila/manila.conf`` file for the VMAX driver:
``/etc/manila/manila.conf`` file for the PowerMax driver:
.. code-block:: ini
emc_share_backend = vmax
emc_share_backend = powermax
emc_nas_server = <IP address>
emc_nas_password = <password>
emc_nas_login = <user>
driver_handles_share_servers = True
vmax_server_container = <Data Mover name>
vmax_share_data_pools = <Comma separated pool names>
powermax_server_container = <Data Mover name>
powermax_share_data_pools = <Comma separated pool names>
share_driver = manila.share.drivers.dell_emc.driver.EMCShareDriver
vmax_ethernet_ports = <Comma separated ports list>
powermax_ethernet_ports = <Comma separated ports list>
emc_ssl_cert_verify = True
emc_ssl_cert_path = <path to cert>
emc_share_backend = vmax
share_backend_name = <Backend>
- `emc_share_backend`
The plug-in name. Set it to ``vmax`` for the VMAX driver.
The plug-in name. Set it to ``powermax`` for the PowerMax driver.
Other values are ``isilon``, ``vnx`` and ``unity``.
- `emc_nas_server`
The control station IP address of the VMAX system to be managed.
The control station IP address of the PowerMax system to be managed.
- `emc_nas_password` and `emc_nas_login`
The fields that are used to provide credentials to the
VMAX system. Only local users of VMAX File is supported.
PowerMax system. Only local users of PowerMax File is supported.
- `driver_handles_share_servers`
VMAX only supports True, where the share driver handles the provisioning
PowerMax only supports True, where the share driver handles the provisioning
and management of the share servers.
- `vmax_server_container`
- `powermax_server_container`
Name of the Data Mover to serve the share service.
- `vmax_share_data_pools`
- `powermax_share_data_pools`
Comma separated list specifying the name of the pools to be used
by this back end. Do not set this option if all storage pools
on the system can be used.
@ -300,7 +300,7 @@ The following parameters need to be configured in the
Examples: pool_1, pool_*, *
- `vmax_ethernet_ports (optional)`
- `powermax_ethernet_ports (optional)`
Comma-separated list specifying the ports (devices) of Data Mover
that can be used for share server interface. Do not set this
option if all ports on the Data Mover can be used.
@ -316,10 +316,6 @@ The following parameters need to be configured in the
the recommended configuration. See ``SSL Support`` section for more
details.
- `emc_share_backend`
Set to ``vmax`` to enable vmax manila plugin . Other values are
``isilon``, ``vnx`` and ``unity``.
- `share_backend_name`
The backend name for a given driver implementation.
@ -451,18 +447,18 @@ To create a target share from a shapshot where create_share_from_snapshot_suppor
IPv6 support
~~~~~~~~~~~~
IPv6 support for VMAX Manila driver is introduced in Rocky release. The feature is
divided into two parts:
IPv6 support for PowerMax Manila driver was introduced in Rocky release.
The feature is divided into two parts:
#. The driver is able to manage share or snapshot in the Neutron IPv6 network.
#. The driver is able to connect VMAX management interface using its IPv6
#. The driver is able to connect PowerMax management interface using its IPv6
address.
Pre-Configurations for IPv6 support
-----------------------------------
The following parameters need to be configured in ``/etc/manila/manila.conf``
for the VMAX driver:
for the PowerMax driver:
.. code-block:: ini
@ -479,7 +475,7 @@ address in ``/etc/manila/manila.conf``:
Restrictions
~~~~~~~~~~~~
The VMAX driver has the following restrictions:
The PowerMax driver has the following restrictions:
- Only ``driver_handles_share_servers`` equals True is supported.
@ -491,7 +487,7 @@ The VMAX driver has the following restrictions:
- VLAN network is supported with limitations. The neutron subnets in
different VLANs that are used to create share networks cannot have
overlapped address spaces. Otherwise, VMAX may have a problem to
overlapped address spaces. Otherwise, PowerMax may have a problem to
communicate with the hosts in the VLANs. To create shares for
different VLANs with same subnet address, use different Data Movers.
@ -540,7 +536,7 @@ Other Remarks
listing of quotas and disk usage at the file system level (by the user,
group, or tree), or at the quota-tree level (by the user or group).
``nas_quotas`` also turns quotas on and off, and clears quotas records
for a file system, quota tree, or a Data Mover. Refer to VMAX eNAS CLI
for a file system, quota tree, or a Data Mover. Refer to PowerMax eNAS CLI
Reference guide on `EMC support site <http://support.emc.com>`_ for
additional information.
``OpenStack manila quotas`` delimit the number of shares, snapshots etc.
@ -567,4 +563,4 @@ Driver options
Configuration options specific to this driver:
.. include:: ../../tables/manila-vmax.inc
.. include:: ../../tables/manila-powermax.inc

View File

@ -8,9 +8,9 @@
autogenerate-config-doc tool from the openstack-doc-tools repository, or
ask for help on the documentation mailing list, IRC channel or meeting.
.. _manila-vmax:
.. _manila-powermax:
.. list-table:: Description of Dell EMC VMAX share driver configuration options
.. list-table:: Description of Dell EMC PowerMax share driver configuration options
:header-rows: 1
:class: config-ref-table
@ -18,9 +18,9 @@
- Description
* - **[DEFAULT]**
-
* - ``vmax_ethernet_ports`` = ``None``
* - ``powermax_ethernet_ports`` = ``None``
- (List) Comma separated list of ports that can be used for share server interfaces. Members of the list can be Unix-style glob expressions.
* - ``vmax_server_container`` = ``None``
* - ``powermax_server_container`` = ``None``
- (String) Data mover to host the NAS server.
* - ``vmax_share_data_pools`` = ``None``
* - ``powermax_share_data_pools`` = ``None``
- (List) Comma separated list of pools that can be used to persist share data.

View File

@ -751,15 +751,15 @@ class VserverNotSpecified(NetAppException):
message = _("Vserver not specified.")
class EMCVmaxXMLAPIError(Invalid):
class EMCPowerMaxXMLAPIError(Invalid):
message = _("%(err)s")
class EMCVmaxLockRequiredException(ManilaException):
class EMCPowerMaxLockRequiredException(ManilaException):
message = _("Unable to acquire lock(s).")
class EMCVmaxInvalidMoverID(ManilaException):
class EMCPowerMaxInvalidMoverID(ManilaException):
message = _("Invalid mover or vdm %(id)s.")

View File

@ -58,7 +58,7 @@ import manila.share.drivers.container.driver
import manila.share.drivers.container.storage_helper
import manila.share.drivers.dell_emc.driver
import manila.share.drivers.dell_emc.plugins.isilon.isilon
import manila.share.drivers.dell_emc.plugins.vmax.connection
import manila.share.drivers.dell_emc.plugins.powermax.connection
import manila.share.drivers.generic
import manila.share.drivers.glusterfs
import manila.share.drivers.glusterfs.common
@ -141,7 +141,7 @@ _global_opt_lists = [
manila.share.drivers.container.driver.container_opts,
manila.share.drivers.container.storage_helper.lv_opts,
manila.share.drivers.dell_emc.driver.EMC_NAS_OPTS,
manila.share.drivers.dell_emc.plugins.vmax.connection.VMAX_OPTS,
manila.share.drivers.dell_emc.plugins.powermax.connection.POWERMAX_OPTS,
manila.share.drivers.generic.share_opts,
manila.share.drivers.glusterfs.common.glusterfs_common_opts,
manila.share.drivers.glusterfs.GlusterfsManilaShare_opts,

View File

@ -1,4 +1,4 @@
# Copyright (c) 2014 EMC Corporation.
# Copyright (c) 2019 EMC Corporation.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
@ -21,6 +21,7 @@ to specify, which backend plugins to use.
"""
from oslo_config import cfg
from oslo_log import log
from manila.share import driver
from manila.share.drivers.dell_emc import plugin_manager as manager
@ -40,7 +41,7 @@ EMC_NAS_OPTS = [
help='Use secure connection to server.'),
cfg.StrOpt('emc_share_backend',
ignore_case=True,
choices=['isilon', 'vnx', 'unity', 'vmax'],
choices=['isilon', 'vnx', 'unity', 'vmax', 'powermax'],
help='Share backend.'),
cfg.StrOpt('emc_nas_root_dir',
help='The root directory where shares will be located.'),
@ -54,6 +55,8 @@ EMC_NAS_OPTS = [
'CAs, which will be used to validate the backend.')
]
LOG = log.getLogger(__name__)
CONF = cfg.CONF
CONF.register_opts(EMC_NAS_OPTS)
@ -72,6 +75,12 @@ class EMCShareDriver(driver.ShareDriver):
self.backend_name = self.backend_name or 'EMC_NAS_Storage'
self.plugin_manager = manager.EMCPluginManager(
namespace='manila.share.drivers.dell_emc.plugins')
if self.backend_name == 'vmax':
LOG.warning("Configuration option 'emc_share_backend=vmax' will "
"remain a valid option until the V release of "
"OpenStack. After that, only "
"'emc_share_backend=powermax' will be excepted.")
self.backend_name = 'powermax'
self.plugin = self.plugin_manager.load_plugin(
self.backend_name,
configuration=self.configuration)

View File

@ -1,4 +1,4 @@
# Copyright (c) 2016 Dell Inc. or its subsidiaries.
# Copyright (c) 2019 Dell Inc. or its subsidiaries.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
@ -12,7 +12,7 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
"""VMAX backend for the EMC Manila driver."""
"""PowerMax backend for the Dell EMC Manila driver."""
import copy
import random
@ -29,7 +29,7 @@ from manila.i18n import _
from manila.share.drivers.dell_emc.common.enas import constants
from manila.share.drivers.dell_emc.common.enas import utils as enas_utils
from manila.share.drivers.dell_emc.plugins import base as driver
from manila.share.drivers.dell_emc.plugins.vmax import (
from manila.share.drivers.dell_emc.plugins.powermax import (
object_manager as manager)
from manila.share import utils as share_utils
from manila import utils
@ -37,40 +37,42 @@ from manila import utils
"""Version history:
1.0.0 - Initial version
2.0.0 - Implement IPv6 support
3.0.0 - Rebranding to PowerMax
"""
VERSION = "2.0.0"
VERSION = "3.0.0"
LOG = log.getLogger(__name__)
VMAX_OPTS = [
cfg.StrOpt('vmax_server_container',
deprecated_name='emc_nas_server_container',
POWERMAX_OPTS = [
cfg.StrOpt('powermax_server_container',
deprecated_name='vmax_server_container',
help='Data mover to host the NAS server.'),
cfg.ListOpt('vmax_share_data_pools',
deprecated_name='emc_nas_pool_names',
cfg.ListOpt('powermax_share_data_pools',
deprecated_name='vmax_share_data_pools',
help='Comma separated list of pools that can be used to '
'persist share data.'),
cfg.ListOpt('vmax_ethernet_ports',
deprecated_name='emc_interface_ports',
cfg.ListOpt('powermax_ethernet_ports',
deprecated_name='vmax_ethernet_ports',
help='Comma separated list of ports that can be used for '
'share server interfaces. Members of the list '
'can be Unix-style glob expressions.')
]
CONF = cfg.CONF
CONF.register_opts(VMAX_OPTS)
CONF.register_opts(POWERMAX_OPTS)
@enas_utils.decorate_all_methods(enas_utils.log_enter_exit,
debug_only=True)
class VMAXStorageConnection(driver.StorageConnection):
"""Implements vmax specific functionality for EMC Manila driver."""
class PowerMaxStorageConnection(driver.StorageConnection):
"""Implements powermax specific functionality for Dell EMC Manila driver.
"""
@enas_utils.log_enter_exit
def __init__(self, *args, **kwargs):
super(VMAXStorageConnection, self).__init__(*args, **kwargs)
super(PowerMaxStorageConnection, self).__init__(*args, **kwargs)
if 'configuration' in kwargs:
kwargs['configuration'].append_config_values(VMAX_OPTS)
kwargs['configuration'].append_config_values(POWERMAX_OPTS)
self.mover_name = None
self.pools = None
@ -114,7 +116,7 @@ class VMAXStorageConnection(driver.StorageConnection):
if status != constants.STATUS_OK:
message = (_("CIFS server %s not found.") % server_name)
LOG.error(message)
raise exception.EMCVmaxXMLAPIError(err=message)
raise exception.EMCPowerMaxXMLAPIError(err=message)
self._allocate_container(share_name, size, share_server, pool_name)
@ -138,7 +140,7 @@ class VMAXStorageConnection(driver.StorageConnection):
if vdm is None:
message = _("No share server found.")
LOG.error(message)
raise exception.EMCVmaxXMLAPIError(err=message)
raise exception.EMCPowerMaxXMLAPIError(err=message)
def _allocate_container(self, share_name, size, share_server, pool_name):
"""Allocate file system for share."""
@ -178,7 +180,7 @@ class VMAXStorageConnection(driver.StorageConnection):
"so the share is inaccessible.")
% server['compName'])
LOG.error(message)
raise exception.EMCVmaxXMLAPIError(err=message)
raise exception.EMCPowerMaxXMLAPIError(err=message)
interface = enas_utils.export_unc_path(server['interfaces'][0])
@ -254,7 +256,7 @@ class VMAXStorageConnection(driver.StorageConnection):
if status != constants.STATUS_OK:
message = (_("File System %s not found.") % share_name)
LOG.error(message)
raise exception.EMCVmaxXMLAPIError(err=message)
raise exception.EMCPowerMaxXMLAPIError(err=message)
pool_id = filesystem['pools_id'][0]
@ -309,7 +311,7 @@ class VMAXStorageConnection(driver.StorageConnection):
try:
# Delete mount point
self._get_context('MountPoint').delete(path, vdm_name)
except exception.EMCVmaxXMLAPIError as e:
except exception.EMCPowerMaxXMLAPIError as e:
LOG.exception("CIFS server %(name)s on mover %(mover_name)s "
"not found due to error %(err)s. Skip the "
"deletion.",
@ -319,7 +321,7 @@ class VMAXStorageConnection(driver.StorageConnection):
try:
# Delete file system
self._get_context('FileSystem').delete(share_name)
except exception.EMCVmaxXMLAPIError as e:
except exception.EMCPowerMaxXMLAPIError as e:
LOG.exception("File system %(share_name)s not found due to "
"error %(err)s. Skip the deletion.",
{'share_name': share_name,
@ -387,7 +389,7 @@ class VMAXStorageConnection(driver.StorageConnection):
if status != constants.STATUS_OK:
message = (_("CIFS server %s not found.") % server_name)
LOG.error(message)
raise exception.EMCVmaxXMLAPIError(err=message)
raise exception.EMCPowerMaxXMLAPIError(err=message)
self._get_context('CIFSShare').allow_share_access(
vdm_name,
@ -453,7 +455,7 @@ class VMAXStorageConnection(driver.StorageConnection):
message = (_("CIFS server %(server_name)s has issue. "
"Detail: %(status)s") %
{'server_name': server_name, 'status': status})
raise exception.EMCVmaxXMLAPIError(err=message)
raise exception.EMCPowerMaxXMLAPIError(err=message)
self._get_context('CIFSShare').clear_share_access(
share_name=share_name,
@ -506,7 +508,7 @@ class VMAXStorageConnection(driver.StorageConnection):
if status != constants.STATUS_OK:
message = (_("CIFS server %s not found.") % server_name)
LOG.error(message)
raise exception.EMCVmaxXMLAPIError(err=message)
raise exception.EMCPowerMaxXMLAPIError(err=message)
self._get_context('CIFSShare').deny_share_access(
vdm_name,
@ -552,7 +554,7 @@ class VMAXStorageConnection(driver.StorageConnection):
message = (_("Failed to get storage pool information. "
"Reason: %s") % backend_pools)
LOG.error(message)
raise exception.EMCVmaxXMLAPIError(err=message)
raise exception.EMCPowerMaxXMLAPIError(err=message)
real_pools = set([item for item in backend_pools])
conf_pools = set([item.strip() for item in pools])
@ -575,19 +577,19 @@ class VMAXStorageConnection(driver.StorageConnection):
return matched_pools
def connect(self, emc_share_driver, context):
"""Connect to VMAX NAS server."""
"""Connect to PowerMax NAS server."""
config = emc_share_driver.configuration
config.append_config_values(VMAX_OPTS)
self.mover_name = config.vmax_server_container
config.append_config_values(POWERMAX_OPTS)
self.mover_name = config.safe_get('powermax_server_container')
self.pool_conf = config.safe_get('vmax_share_data_pools')
self.pool_conf = config.safe_get('powermax_share_data_pools')
self.reserved_percentage = config.safe_get('reserved_share_percentage')
if self.reserved_percentage is None:
self.reserved_percentage = 0
self.manager = manager.StorageObjectManager(config)
self.port_conf = config.safe_get('vmax_ethernet_ports')
self.port_conf = config.safe_get('powermax_ethernet_ports')
def get_managed_ports(self):
# Get the real ports(devices) list from the backend storage
@ -603,7 +605,7 @@ class VMAXStorageConnection(driver.StorageConnection):
if not matched_ports:
msg = (_("None of the specified network ports exist. "
"Please check your configuration vmax_ethernet_ports "
"Please check your configuration powermax_ethernet_ports "
"in manila.conf. The available ports on the Data Mover "
"are %s.") %
",".join(real_ports))
@ -643,7 +645,7 @@ class VMAXStorageConnection(driver.StorageConnection):
if not stats_dict['pools']:
message = _("Failed to update storage pool.")
LOG.error(message)
raise exception.EMCVmaxXMLAPIError(err=message)
raise exception.EMCPowerMaxXMLAPIError(err=message)
def get_pool(self, share):
"""Get the pool name of the share."""
@ -654,7 +656,7 @@ class VMAXStorageConnection(driver.StorageConnection):
"Reason: %(err)s") %
{'name': share_name, 'err': filesystem})
LOG.error(message)
raise exception.EMCVmaxXMLAPIError(err=message)
raise exception.EMCPowerMaxXMLAPIError(err=message)
pool_id = filesystem['pools_id'][0]
@ -664,7 +666,7 @@ class VMAXStorageConnection(driver.StorageConnection):
message = (_("Failed to get storage pool information. "
"Reason: %s") % backend_pools)
LOG.error(message)
raise exception.EMCVmaxXMLAPIError(err=message)
raise exception.EMCPowerMaxXMLAPIError(err=message)
for name, pool_info in backend_pools.items():
if pool_info['id'] == pool_id:
@ -674,7 +676,7 @@ class VMAXStorageConnection(driver.StorageConnection):
message = (_("No matched pool name for share: %(share)s. "
"Available pools: %(pools)s") %
{'share': share_name, 'pools': available_pools})
raise exception.EMCVmaxXMLAPIError(err=message)
raise exception.EMCPowerMaxXMLAPIError(err=message)
def get_network_allocations_number(self):
"""Returns number of network allocations for creating VIFs."""
@ -696,7 +698,7 @@ class VMAXStorageConnection(driver.StorageConnection):
network_info['security_services'])
if not is_valid:
raise exception.EMCVmaxXMLAPIError(err=active_directory)
raise exception.EMCPowerMaxXMLAPIError(err=active_directory)
try:
if not self._vdm_exist(vdm_name):
@ -778,7 +780,7 @@ class VMAXStorageConnection(driver.StorageConnection):
message = (_("Could not get physical device port on mover %s.") %
self.mover_name)
LOG.error(message)
raise exception.EMCVmaxXMLAPIError(err=message)
raise exception.EMCPowerMaxXMLAPIError(err=message)
return devices
@ -852,7 +854,7 @@ class VMAXStorageConnection(driver.StorageConnection):
try:
self._get_context('CIFSServer').modify(
cifs_server_args)
except exception.EMCVmaxXMLAPIError as expt:
except exception.EMCPowerMaxXMLAPIError as expt:
LOG.debug("Failed to modify CIFS server "
"%(server)s. Reason: %(err)s.",
{'server': server, 'err': expt})

View File

@ -27,15 +27,15 @@ from manila import exception
from manila.i18n import _
from manila.share.drivers.dell_emc.common.enas import connector
from manila.share.drivers.dell_emc.common.enas import constants
from manila.share.drivers.dell_emc.common.enas import utils as vmax_utils
from manila.share.drivers.dell_emc.common.enas import utils as powermax_utils
from manila.share.drivers.dell_emc.common.enas import xml_api_parser as parser
from manila import utils
LOG = log.getLogger(__name__)
@vmax_utils.decorate_all_methods(vmax_utils.log_enter_exit,
debug_only=True)
@powermax_utils.decorate_all_methods(powermax_utils.log_enter_exit,
debug_only=True)
class StorageObjectManager(object):
def __init__(self, configuration):
self.context = {}
@ -61,7 +61,7 @@ class StorageObjectManager(object):
else:
message = (_("Invalid storage object type %s.") % type)
LOG.error(message)
raise exception.EMCVmaxXMLAPIError(err=message)
raise exception.EMCPowerMaxXMLAPIError(err=message)
class StorageObject(object):
@ -74,7 +74,7 @@ class StorageObject(object):
self.ssh_retry_patterns = [
(
constants.SSH_DEFAULT_RETRY_PATTERN,
exception.EMCVmaxLockRequiredException()
exception.EMCPowerMaxLockRequiredException()
),
]
@ -144,7 +144,7 @@ class StorageObject(object):
)
)
@utils.retry(exception.EMCVmaxLockRequiredException)
@utils.retry(exception.EMCPowerMaxLockRequiredException)
def _send_request(self, req):
req_xml = constants.XML_HEADER + ET.tostring(req).decode('utf-8')
@ -157,11 +157,11 @@ class StorageObject(object):
if (response['maxSeverity'] != constants.STATUS_OK and
self._response_validation(response,
constants.MSG_CODE_RETRY)):
raise exception.EMCVmaxLockRequiredException
raise exception.EMCPowerMaxLockRequiredException
return response
@utils.retry(exception.EMCVmaxLockRequiredException)
@utils.retry(exception.EMCPowerMaxLockRequiredException)
def _execute_cmd(self, cmd, retry_patterns=None, check_exit_code=False):
"""Execute NAS command via SSH.
@ -211,14 +211,14 @@ class StorageObject(object):
return self.manager.getStorageContext(type)
@vmax_utils.decorate_all_methods(vmax_utils.log_enter_exit,
debug_only=True)
@powermax_utils.decorate_all_methods(powermax_utils.log_enter_exit,
debug_only=True)
class FileSystem(StorageObject):
def __init__(self, conn, elt_maker, xml_parser, manager):
super(FileSystem, self).__init__(conn, elt_maker, xml_parser, manager)
self.filesystem_map = {}
@utils.retry(exception.EMCVmaxInvalidMoverID)
@utils.retry(exception.EMCPowerMaxInvalidMoverID)
def create(self, name, size, pool_name, mover_name, is_vdm=True):
pool_id = self.get_context('StoragePool').get_id(pool_name)
@ -249,7 +249,7 @@ class FileSystem(StorageObject):
constants.MSG_INVALID_MOVER_ID) and
not self.xml_retry):
self.xml_retry = True
raise exception.EMCVmaxInvalidMoverID(id=mover_id)
raise exception.EMCPowerMaxInvalidMoverID(id=mover_id)
elif self._response_validation(
response, constants.MSG_FILESYSTEM_EXIST):
LOG.warning("File system %s already exists. "
@ -260,7 +260,7 @@ class FileSystem(StorageObject):
"Reason: %(err)s.") %
{'name': name, 'err': response['problems']})
LOG.error(message)
raise exception.EMCVmaxXMLAPIError(err=message)
raise exception.EMCPowerMaxXMLAPIError(err=message)
def get(self, name):
if name not in self.filesystem_map:
@ -314,7 +314,7 @@ class FileSystem(StorageObject):
"Reason: %(err)s.") %
{'name': name, 'err': out})
LOG.error(message)
raise exception.EMCVmaxXMLAPIError(err=message)
raise exception.EMCPowerMaxXMLAPIError(err=message)
enas_id = self.filesystem_map[name]['id']
@ -329,7 +329,7 @@ class FileSystem(StorageObject):
"Reason: %(err)s.") %
{'name': name, 'err': response['problems']})
LOG.error(message)
raise exception.EMCVmaxXMLAPIError(err=message)
raise exception.EMCPowerMaxXMLAPIError(err=message)
self.filesystem_map.pop(name)
@ -340,7 +340,7 @@ class FileSystem(StorageObject):
"Reason: %(err)s.") %
{'name': name, 'err': out})
LOG.error(message)
raise exception.EMCVmaxXMLAPIError(err=message)
raise exception.EMCPowerMaxXMLAPIError(err=message)
enas_id = out['id']
size = int(out['size'])
@ -350,7 +350,7 @@ class FileSystem(StorageObject):
"%(size)d.") %
{'name': name, 'new_size': new_size, 'size': size})
LOG.error(message)
raise exception.EMCVmaxXMLAPIError(err=message)
raise exception.EMCPowerMaxXMLAPIError(err=message)
elif new_size == size:
return
@ -375,7 +375,7 @@ class FileSystem(StorageObject):
'new_size': new_size,
'err': response['problems']})
LOG.error(message)
raise exception.EMCVmaxXMLAPIError(err=message)
raise exception.EMCPowerMaxXMLAPIError(err=message)
def get_id(self, name):
status, out = self.get(name)
@ -384,7 +384,7 @@ class FileSystem(StorageObject):
"Reason: %(err)s.") %
{'name': name, 'err': out})
LOG.error(message)
raise exception.EMCVmaxXMLAPIError(err=message)
raise exception.EMCPowerMaxXMLAPIError(err=message)
return self.filesystem_map[name]['id']
@ -480,8 +480,8 @@ class FileSystem(StorageObject):
self._execute_cmd(rw_mount_cmd)
@vmax_utils.decorate_all_methods(vmax_utils.log_enter_exit,
debug_only=True)
@powermax_utils.decorate_all_methods(powermax_utils.log_enter_exit,
debug_only=True)
class StoragePool(StorageObject):
def __init__(self, conn, elt_maker, xml_parser, manager):
super(StoragePool, self).__init__(conn, elt_maker, xml_parser, manager)
@ -537,18 +537,18 @@ class StoragePool(StorageObject):
"Reason: %(err)s.") %
{'name': name, 'err': out})
LOG.error(message)
raise exception.EMCVmaxXMLAPIError(err=message)
raise exception.EMCPowerMaxXMLAPIError(err=message)
return out['id']
@vmax_utils.decorate_all_methods(vmax_utils.log_enter_exit,
debug_only=True)
@powermax_utils.decorate_all_methods(powermax_utils.log_enter_exit,
debug_only=True)
class MountPoint(StorageObject):
def __init__(self, conn, elt_maker, xml_parser, manager):
super(MountPoint, self).__init__(conn, elt_maker, xml_parser, manager)
@utils.retry(exception.EMCVmaxInvalidMoverID)
@utils.retry(exception.EMCPowerMaxInvalidMoverID)
def create(self, mount_path, fs_name, mover_name, is_vdm=True):
fs_id = self.get_context('FileSystem').get_id(fs_name)
@ -574,7 +574,7 @@ class MountPoint(StorageObject):
constants.MSG_INVALID_MOVER_ID) and
not self.xml_retry):
self.xml_retry = True
raise exception.EMCVmaxInvalidMoverID(id=mover_id)
raise exception.EMCPowerMaxInvalidMoverID(id=mover_id)
elif self._is_mount_point_already_existent(response):
LOG.warning("Mount Point %(mount)s already exists. "
"Skip the creation.", {'mount': mount_path})
@ -586,9 +586,9 @@ class MountPoint(StorageObject):
'fs_name': fs_name,
'err': response['problems']})
LOG.error(message)
raise exception.EMCVmaxXMLAPIError(err=message)
raise exception.EMCPowerMaxXMLAPIError(err=message)
@utils.retry(exception.EMCVmaxInvalidMoverID)
@utils.retry(exception.EMCPowerMaxInvalidMoverID)
def get(self, mover_name, is_vdm=True):
mover_id = self._get_mover_id(mover_name, is_vdm)
@ -610,7 +610,7 @@ class MountPoint(StorageObject):
constants.MSG_INVALID_MOVER_ID) and
not self.xml_retry):
self.xml_retry = True
raise exception.EMCVmaxInvalidMoverID(id=mover_id)
raise exception.EMCPowerMaxInvalidMoverID(id=mover_id)
elif constants.STATUS_OK != response['maxSeverity']:
return response['maxSeverity'], response['objects']
@ -619,7 +619,7 @@ class MountPoint(StorageObject):
else:
return constants.STATUS_OK, response['objects']
@utils.retry(exception.EMCVmaxInvalidMoverID)
@utils.retry(exception.EMCPowerMaxInvalidMoverID)
def delete(self, mount_path, mover_name, is_vdm=True):
mover_id = self._get_mover_id(mover_name, is_vdm)
@ -640,7 +640,7 @@ class MountPoint(StorageObject):
constants.MSG_INVALID_MOVER_ID) and
not self.xml_retry):
self.xml_retry = True
raise exception.EMCVmaxInvalidMoverID(id=mover_id)
raise exception.EMCPowerMaxInvalidMoverID(id=mover_id)
elif self._is_mount_point_nonexistent(response):
LOG.warning('Mount point %(mount)s on mover %(mover_name)s '
'not found.',
@ -654,7 +654,7 @@ class MountPoint(StorageObject):
'mover_name': mover_name,
'err': response})
LOG.error(message)
raise exception.EMCVmaxXMLAPIError(err=message)
raise exception.EMCPowerMaxXMLAPIError(err=message)
def _is_mount_point_nonexistent(self, response):
"""Translate different status to ok/error status."""
@ -683,8 +683,8 @@ class MountPoint(StorageObject):
return False
@vmax_utils.decorate_all_methods(vmax_utils.log_enter_exit,
debug_only=True)
@powermax_utils.decorate_all_methods(powermax_utils.log_enter_exit,
debug_only=True)
class Mover(StorageObject):
def __init__(self, conn, elt_maker, xml_parser, manager):
super(Mover, self).__init__(conn, elt_maker, xml_parser, manager)
@ -787,7 +787,7 @@ class Mover(StorageObject):
message = (_("Failed to get mover by name %(name)s.") %
{'name': name})
LOG.error(message)
raise exception.EMCVmaxXMLAPIError(err=message)
raise exception.EMCPowerMaxXMLAPIError(err=message)
return mover_ref['id']
@ -848,14 +848,14 @@ class Mover(StorageObject):
return physical_network_devices
@vmax_utils.decorate_all_methods(vmax_utils.log_enter_exit,
debug_only=True)
@powermax_utils.decorate_all_methods(powermax_utils.log_enter_exit,
debug_only=True)
class VDM(StorageObject):
def __init__(self, conn, elt_maker, xml_parser, manager):
super(VDM, self).__init__(conn, elt_maker, xml_parser, manager)
self.vdm_map = {}
@utils.retry(exception.EMCVmaxInvalidMoverID)
@utils.retry(exception.EMCPowerMaxInvalidMoverID)
def create(self, name, mover_name):
mover_id = self._get_mover_id(mover_name, False)
@ -872,7 +872,7 @@ class VDM(StorageObject):
constants.MSG_INVALID_MOVER_ID) and
not self.xml_retry):
self.xml_retry = True
raise exception.EMCVmaxInvalidMoverID(id=mover_id)
raise exception.EMCPowerMaxInvalidMoverID(id=mover_id)
elif self._response_validation(response, constants.MSG_VDM_EXIST):
LOG.warning("VDM %(name)s already exists. Skip the creation.",
{'name': name})
@ -883,7 +883,7 @@ class VDM(StorageObject):
'mover_name': mover_name,
'err': response['problems']})
LOG.error(message)
raise exception.EMCVmaxXMLAPIError(err=message)
raise exception.EMCPowerMaxXMLAPIError(err=message)
def get(self, name):
if name not in self.vdm_map:
@ -926,7 +926,7 @@ class VDM(StorageObject):
"Reason: %(err)s.") %
{'name': name, 'err': out})
LOG.error(message)
raise exception.EMCVmaxXMLAPIError(err=message)
raise exception.EMCPowerMaxXMLAPIError(err=message)
vdm_id = self.vdm_map[name]['id']
@ -941,7 +941,7 @@ class VDM(StorageObject):
"Reason: %(err)s.") %
{'name': name, 'err': response['problems']})
LOG.error(message)
raise exception.EMCVmaxXMLAPIError(err=message)
raise exception.EMCPowerMaxXMLAPIError(err=message)
self.vdm_map.pop(name)
@ -951,7 +951,7 @@ class VDM(StorageObject):
message = (_("Failed to get VDM by name %(name)s.") %
{'name': name})
LOG.error(message)
raise exception.EMCVmaxXMLAPIError(err=message)
raise exception.EMCPowerMaxXMLAPIError(err=message)
return vdm['id']
@ -987,7 +987,7 @@ class VDM(StorageObject):
"from mover %(mover_name)s.") %
{'interface': if_name, 'mover_name': vdm_name})
LOG.exception(message)
raise exception.EMCVmaxXMLAPIError(err=message)
raise exception.EMCPowerMaxXMLAPIError(err=message)
def get_interfaces(self, vdm_name):
interfaces = {
@ -1023,8 +1023,8 @@ class VDM(StorageObject):
return interfaces
@vmax_utils.decorate_all_methods(vmax_utils.log_enter_exit,
debug_only=True)
@powermax_utils.decorate_all_methods(powermax_utils.log_enter_exit,
debug_only=True)
class Snapshot(StorageObject):
def __init__(self, conn, elt_maker, xml_parser, manager):
super(Snapshot, self).__init__(conn, elt_maker, xml_parser, manager)
@ -1064,7 +1064,7 @@ class Snapshot(StorageObject):
'fs_name': fs_name,
'err': response['problems']})
LOG.error(message)
raise exception.EMCVmaxXMLAPIError(err=message)
raise exception.EMCPowerMaxXMLAPIError(err=message)
def get(self, name):
if name not in self.snap_map:
@ -1107,7 +1107,7 @@ class Snapshot(StorageObject):
"Reason: %(err)s.") %
{'name': name, 'err': out})
LOG.error(message)
raise exception.EMCVmaxXMLAPIError(err=message)
raise exception.EMCPowerMaxXMLAPIError(err=message)
chpt_id = self.snap_map[name]['id']
@ -1121,7 +1121,7 @@ class Snapshot(StorageObject):
"Reason: %(err)s.") %
{'name': name, 'err': response['problems']})
LOG.error(message)
raise exception.EMCVmaxXMLAPIError(err=message)
raise exception.EMCPowerMaxXMLAPIError(err=message)
self.snap_map.pop(name)
@ -1133,19 +1133,19 @@ class Snapshot(StorageObject):
"Reason: %(err)s.") %
{'name': name, 'err': out})
LOG.error(message)
raise exception.EMCVmaxXMLAPIError(err=message)
raise exception.EMCPowerMaxXMLAPIError(err=message)
return self.snap_map[name]['id']
@vmax_utils.decorate_all_methods(vmax_utils.log_enter_exit,
debug_only=True)
@powermax_utils.decorate_all_methods(powermax_utils.log_enter_exit,
debug_only=True)
class MoverInterface(StorageObject):
def __init__(self, conn, elt_maker, xml_parser, manager):
super(MoverInterface, self).__init__(conn, elt_maker, xml_parser,
manager)
@utils.retry(exception.EMCVmaxInvalidMoverID)
@utils.retry(exception.EMCPowerMaxInvalidMoverID)
def create(self, interface):
# Maximum of 32 characters for mover interface name
name = interface['name']
@ -1182,7 +1182,7 @@ class MoverInterface(StorageObject):
constants.MSG_INVALID_MOVER_ID) and
not self.xml_retry):
self.xml_retry = True
raise exception.EMCVmaxInvalidMoverID(id=mover_id)
raise exception.EMCPowerMaxInvalidMoverID(id=mover_id)
elif self._response_validation(
response, constants.MSG_INTERFACE_NAME_EXIST):
LOG.warning("Mover interface name %s already exists. "
@ -1194,23 +1194,23 @@ class MoverInterface(StorageObject):
elif self._response_validation(
response, constants.MSG_INTERFACE_INVALID_VLAN_ID):
# When fail to create a mover interface with the specified
# vlan id, VMAX will leave an interface with vlan id 0 in the
# vlan id, PowerMax will leave an interface with vlan id 0 in the
# backend. So we should explicitly remove the interface.
try:
self.delete(six.text_type(ip_addr), mover_name)
except exception.EMCVmaxXMLAPIError:
except exception.EMCPowerMaxXMLAPIError:
pass
message = (_("Invalid vlan id %s. Other interfaces on this "
"subnet are in a different vlan.") % vlan_id)
LOG.error(message)
raise exception.EMCVmaxXMLAPIError(err=message)
raise exception.EMCPowerMaxXMLAPIError(err=message)
elif constants.STATUS_OK != response['maxSeverity']:
message = (_("Failed to create mover interface %(interface)s. "
"Reason: %(err)s.") %
{'interface': interface,
'err': response['problems']})
LOG.error(message)
raise exception.EMCVmaxXMLAPIError(err=message)
raise exception.EMCPowerMaxXMLAPIError(err=message)
def get(self, name, mover_name):
# Maximum of 32 characters for mover interface name
@ -1226,7 +1226,7 @@ class MoverInterface(StorageObject):
return constants.STATUS_NOT_FOUND, None
@utils.retry(exception.EMCVmaxInvalidMoverID)
@utils.retry(exception.EMCPowerMaxInvalidMoverID)
def delete(self, ip_addr, mover_name):
mover_id = self._get_mover_id(mover_name, False)
@ -1246,7 +1246,7 @@ class MoverInterface(StorageObject):
constants.MSG_INVALID_MOVER_ID) and
not self.xml_retry):
self.xml_retry = True
raise exception.EMCVmaxInvalidMoverID(id=mover_id)
raise exception.EMCPowerMaxInvalidMoverID(id=mover_id)
elif self._response_validation(
response, constants.MSG_INTERFACE_NON_EXISTENT):
LOG.warning("Mover interface %s not found. "
@ -1259,16 +1259,16 @@ class MoverInterface(StorageObject):
'mover': mover_name,
'err': response['problems']})
LOG.error(message)
raise exception.EMCVmaxXMLAPIError(err=message)
raise exception.EMCPowerMaxXMLAPIError(err=message)
@vmax_utils.decorate_all_methods(vmax_utils.log_enter_exit,
debug_only=True)
@powermax_utils.decorate_all_methods(powermax_utils.log_enter_exit,
debug_only=True)
class DNSDomain(StorageObject):
def __init__(self, conn, elt_maker, xml_parser, manager):
super(DNSDomain, self).__init__(conn, elt_maker, xml_parser, manager)
@utils.retry(exception.EMCVmaxInvalidMoverID)
@utils.retry(exception.EMCPowerMaxInvalidMoverID)
def create(self, mover_name, name, servers, protocol='udp'):
mover_id = self._get_mover_id(mover_name, False)
@ -1290,15 +1290,15 @@ class DNSDomain(StorageObject):
constants.MSG_INVALID_MOVER_ID) and
not self.xml_retry):
self.xml_retry = True
raise exception.EMCVmaxInvalidMoverID(id=mover_id)
raise exception.EMCPowerMaxInvalidMoverID(id=mover_id)
elif constants.STATUS_OK != response['maxSeverity']:
message = (_("Failed to create DNS domain %(name)s. "
"Reason: %(err)s.") %
{'name': name, 'err': response['problems']})
LOG.error(message)
raise exception.EMCVmaxXMLAPIError(err=message)
raise exception.EMCPowerMaxXMLAPIError(err=message)
@utils.retry(exception.EMCVmaxInvalidMoverID)
@utils.retry(exception.EMCPowerMaxInvalidMoverID)
def delete(self, mover_name, name):
mover_id = self._get_mover_id(mover_name, False)
@ -1317,21 +1317,21 @@ class DNSDomain(StorageObject):
constants.MSG_INVALID_MOVER_ID) and
not self.xml_retry):
self.xml_retry = True
raise exception.EMCVmaxInvalidMoverID(id=mover_id)
raise exception.EMCPowerMaxInvalidMoverID(id=mover_id)
elif constants.STATUS_OK != response['maxSeverity']:
LOG.warning("Failed to delete DNS domain %(name)s. "
"Reason: %(err)s.",
{'name': name, 'err': response['problems']})
@vmax_utils.decorate_all_methods(vmax_utils.log_enter_exit,
debug_only=True)
@powermax_utils.decorate_all_methods(powermax_utils.log_enter_exit,
debug_only=True)
class CIFSServer(StorageObject):
def __init__(self, conn, elt_maker, xml_parser, manager):
super(CIFSServer, self).__init__(conn, elt_maker, xml_parser, manager)
self.cifs_server_map = {}
@utils.retry(exception.EMCVmaxInvalidMoverID)
@utils.retry(exception.EMCPowerMaxInvalidMoverID)
def create(self, server_args):
compName = server_args['name']
# Maximum of 14 characters for netBIOS name
@ -1374,7 +1374,7 @@ class CIFSServer(StorageObject):
constants.MSG_INVALID_MOVER_ID) and
not self.xml_retry):
self.xml_retry = True
raise exception.EMCVmaxInvalidMoverID(id=mover_id)
raise exception.EMCPowerMaxInvalidMoverID(id=mover_id)
if constants.STATUS_OK != response['maxSeverity']:
status, out = self.get(compName, mover_name, is_vdm)
if constants.STATUS_OK == status and out['domainJoined'] == 'true':
@ -1385,9 +1385,9 @@ class CIFSServer(StorageObject):
{'name': name,
'err': response['problems']})
LOG.error(message)
raise exception.EMCVmaxXMLAPIError(err=message)
raise exception.EMCPowerMaxXMLAPIError(err=message)
@utils.retry(exception.EMCVmaxInvalidMoverID)
@utils.retry(exception.EMCPowerMaxInvalidMoverID)
def get_all(self, mover_name, is_vdm=True):
mover_id = self._get_mover_id(mover_name, is_vdm)
@ -1408,7 +1408,7 @@ class CIFSServer(StorageObject):
constants.MSG_INVALID_MOVER_ID) and
not self.xml_retry):
self.xml_retry = True
raise exception.EMCVmaxInvalidMoverID(id=mover_id)
raise exception.EMCPowerMaxInvalidMoverID(id=mover_id)
elif constants.STATUS_OK != response['maxSeverity']:
return response['maxSeverity'], response['objects']
@ -1439,7 +1439,7 @@ class CIFSServer(StorageObject):
return constants.STATUS_NOT_FOUND, None
@utils.retry(exception.EMCVmaxInvalidMoverID)
@utils.retry(exception.EMCPowerMaxInvalidMoverID)
def modify(self, server_args):
"""Make CIFS server join or un-join the domain.
@ -1450,7 +1450,7 @@ class CIFSServer(StorageObject):
password: Password associated with the user name
mover_name: mover or VDM name
is_vdm: Boolean to indicate mover or VDM
:raises exception.EMCVmaxXMLAPIError: if modification fails.
:raises exception.EMCPowerMaxXMLAPIError: if modification fails.
"""
name = server_args['name']
join_domain = server_args['join_domain']
@ -1487,7 +1487,7 @@ class CIFSServer(StorageObject):
constants.MSG_INVALID_MOVER_ID) and
not self.xml_retry):
self.xml_retry = True
raise exception.EMCVmaxInvalidMoverID(id=mover_id)
raise exception.EMCPowerMaxInvalidMoverID(id=mover_id)
elif self._ignore_modification_error(response, join_domain):
return
elif constants.STATUS_OK != response['maxSeverity']:
@ -1496,7 +1496,7 @@ class CIFSServer(StorageObject):
{'name': name,
'err': response['problems']})
LOG.error(message)
raise exception.EMCVmaxXMLAPIError(err=message)
raise exception.EMCPowerMaxXMLAPIError(err=message)
def _ignore_modification_error(self, response, join_domain):
if self._response_validation(response, constants.MSG_JOIN_DOMAIN):
@ -1515,7 +1515,7 @@ class CIFSServer(StorageObject):
"not found. Skip the deletion.",
{'name': computer_name, 'mover_name': mover_name})
return
except exception.EMCVmaxXMLAPIError:
except exception.EMCPowerMaxXMLAPIError:
LOG.warning("CIFS server %(name)s on mover %(mover_name)s "
"not found. Skip the deletion.",
{'name': computer_name, 'mover_name': mover_name})
@ -1540,19 +1540,19 @@ class CIFSServer(StorageObject):
"Reason: %(err)s.") %
{'name': computer_name, 'err': response['problems']})
LOG.error(message)
raise exception.EMCVmaxXMLAPIError(err=message)
raise exception.EMCPowerMaxXMLAPIError(err=message)
self.cifs_server_map[mover_name].pop(computer_name)
@vmax_utils.decorate_all_methods(vmax_utils.log_enter_exit,
debug_only=True)
@powermax_utils.decorate_all_methods(powermax_utils.log_enter_exit,
debug_only=True)
class CIFSShare(StorageObject):
def __init__(self, conn, elt_maker, xml_parser, manager):
super(CIFSShare, self).__init__(conn, elt_maker, xml_parser, manager)
self.cifs_share_map = {}
@utils.retry(exception.EMCVmaxInvalidMoverID)
@utils.retry(exception.EMCPowerMaxInvalidMoverID)
def create(self, name, server_name, mover_name, is_vdm=True):
mover_id = self._get_mover_id(mover_name, is_vdm)
@ -1579,13 +1579,13 @@ class CIFSShare(StorageObject):
constants.MSG_INVALID_MOVER_ID) and
not self.xml_retry):
self.xml_retry = True
raise exception.EMCVmaxInvalidMoverID(id=mover_id)
raise exception.EMCPowerMaxInvalidMoverID(id=mover_id)
elif constants.STATUS_OK != response['maxSeverity']:
message = (_("Failed to create file share %(name)s. "
"Reason: %(err)s.") %
{'name': name, 'err': response['problems']})
LOG.error(message)
raise exception.EMCVmaxXMLAPIError(err=message)
raise exception.EMCPowerMaxXMLAPIError(err=message)
def get(self, name):
if name not in self.cifs_share_map:
@ -1605,7 +1605,7 @@ class CIFSShare(StorageObject):
return constants.STATUS_OK, self.cifs_share_map[name]
@utils.retry(exception.EMCVmaxInvalidMoverID)
@utils.retry(exception.EMCPowerMaxInvalidMoverID)
def delete(self, name, mover_name, is_vdm=True):
status, out = self.get(name)
if constants.STATUS_NOT_FOUND == status:
@ -1617,7 +1617,7 @@ class CIFSShare(StorageObject):
"Reason: %(err)s.") %
{'name': name, 'err': out})
LOG.error(message)
raise exception.EMCVmaxXMLAPIError(err=message)
raise exception.EMCPowerMaxXMLAPIError(err=message)
mover_id = self._get_mover_id(mover_name, is_vdm)
@ -1642,13 +1642,13 @@ class CIFSShare(StorageObject):
constants.MSG_INVALID_MOVER_ID) and
not self.xml_retry):
self.xml_retry = True
raise exception.EMCVmaxInvalidMoverID(id=mover_id)
raise exception.EMCPowerMaxInvalidMoverID(id=mover_id)
elif constants.STATUS_OK != response['maxSeverity']:
message = (_("Failed to delete file system %(name)s. "
"Reason: %(err)s.") %
{'name': name, 'err': response['problems']})
LOG.error(message)
raise exception.EMCVmaxXMLAPIError(err=message)
raise exception.EMCPowerMaxXMLAPIError(err=message)
self.cifs_share_map.pop(name)
@ -1666,7 +1666,7 @@ class CIFSShare(StorageObject):
'%(name)s.') %
{'name': share_name})
LOG.exception(message)
raise exception.EMCVmaxXMLAPIError(err=message)
raise exception.EMCPowerMaxXMLAPIError(err=message)
def allow_share_access(self, mover_name, share_name, user_name, domain,
access=constants.CIFS_ACL_FULLCONTROL):
@ -1694,7 +1694,7 @@ class CIFSShare(StorageObject):
'CIFS share %(name)s. Reason: %(err)s.') %
{'access': access, 'name': share_name, 'err': expt})
LOG.error(message)
raise exception.EMCVmaxXMLAPIError(err=message)
raise exception.EMCPowerMaxXMLAPIError(err=message)
def deny_share_access(self, mover_name, share_name, user_name, domain,
access=constants.CIFS_ACL_FULLCONTROL):
@ -1728,7 +1728,7 @@ class CIFSShare(StorageObject):
'CIFS share %(name)s. Reason: %(err)s.') %
{'access': access, 'name': share_name, 'err': expt})
LOG.exception(message)
raise exception.EMCVmaxXMLAPIError(err=message)
raise exception.EMCPowerMaxXMLAPIError(err=message)
def get_share_access(self, mover_name, share_name):
get_str = 'sharesd %s dump' % share_name
@ -1742,7 +1742,7 @@ class CIFSShare(StorageObject):
except processutils.ProcessExecutionError:
msg = _('Failed to get access list of CIFS share %s.') % share_name
LOG.exception(msg)
raise exception.EMCVmaxXMLAPIError(err=msg)
raise exception.EMCPowerMaxXMLAPIError(err=msg)
ret = {}
name_pattern = re.compile(r"Unix user '(.+?)'")
@ -1772,8 +1772,8 @@ class CIFSShare(StorageObject):
return users_to_remove
@vmax_utils.decorate_all_methods(vmax_utils.log_enter_exit,
debug_only=True)
@powermax_utils.decorate_all_methods(powermax_utils.log_enter_exit,
debug_only=True)
class NFSShare(StorageObject):
def __init__(self, conn, elt_maker, xml_parser, manager):
super(NFSShare, self).__init__(conn, elt_maker, xml_parser, manager)
@ -1794,7 +1794,7 @@ class NFSShare(StorageObject):
'%(mover_name)s. Reason: %(err)s.') %
{'name': name, 'mover_name': mover_name, 'err': expt})
LOG.exception(message)
raise exception.EMCVmaxXMLAPIError(err=message)
raise exception.EMCPowerMaxXMLAPIError(err=message)
def delete(self, name, mover_name):
path = '/' + name
@ -1819,7 +1819,7 @@ class NFSShare(StorageObject):
'%(mover_name)s. Reason: %(err)s.') %
{'name': name, 'mover_name': mover_name, 'err': expt})
LOG.exception(message)
raise exception.EMCVmaxXMLAPIError(err=message)
raise exception.EMCPowerMaxXMLAPIError(err=message)
self.nfs_share_map.pop(name)
@ -1861,7 +1861,7 @@ class NFSShare(StorageObject):
'mover_name': mover_name,
'err': expt})
LOG.exception(message)
raise exception.EMCVmaxXMLAPIError(err=message)
raise exception.EMCPowerMaxXMLAPIError(err=message)
re_exports = '%s\s*:\s*\nexport\s*(.*)\n' % mover_name
m = re.search(re_exports, out)
@ -1873,14 +1873,17 @@ class NFSShare(StorageObject):
for field in fields:
field = field.strip()
if field.startswith('rw='):
nfs_share['RwHosts'] = vmax_utils.parse_ipaddr(field[3:])
nfs_share['RwHosts'] = powermax_utils.parse_ipaddr(
field[3:])
elif field.startswith('access='):
nfs_share['AccessHosts'] = vmax_utils.parse_ipaddr(
nfs_share['AccessHosts'] = powermax_utils.parse_ipaddr(
field[7:])
elif field.startswith('root='):
nfs_share['RootHosts'] = vmax_utils.parse_ipaddr(field[5:])
nfs_share['RootHosts'] = powermax_utils.parse_ipaddr(
field[5:])
elif field.startswith('ro='):
nfs_share['RoHosts'] = vmax_utils.parse_ipaddr(field[3:])
nfs_share['RoHosts'] = powermax_utils.parse_ipaddr(
field[3:])
self.nfs_share_map[name] = nfs_share
else:
@ -1896,13 +1899,13 @@ class NFSShare(StorageObject):
if constants.STATUS_NOT_FOUND == status:
message = (_('NFS share %s not found.') % share_name)
LOG.error(message)
raise exception.EMCVmaxXMLAPIError(err=message)
raise exception.EMCPowerMaxXMLAPIError(err=message)
changed = False
rwhosts = share['RwHosts']
rohosts = share['RoHosts']
host_ip = vmax_utils.convert_ipv6_format_if_needed(host_ip)
host_ip = powermax_utils.convert_ipv6_format_if_needed(host_ip)
if access_level == const.ACCESS_LEVEL_RW:
if host_ip not in rwhosts:
@ -1956,7 +1959,7 @@ class NFSShare(StorageObject):
'Reason %(err)s.') %
{'path': share_name, 'err': share})
LOG.error(message)
raise exception.EMCVmaxXMLAPIError(err=message)
raise exception.EMCPowerMaxXMLAPIError(err=message)
changed = False
rwhosts = set(share['RwHosts'])
@ -2008,7 +2011,7 @@ class NFSShare(StorageObject):
message = (_('Query nfs share %(path)s failed. '
'Reason %(err)s.') %
{'path': share_name, 'err': status})
raise exception.EMCVmaxXMLAPIError(err=message)
raise exception.EMCPowerMaxXMLAPIError(err=message)
self._set_share_access('/' + share_name,
mover_name,
@ -2056,4 +2059,4 @@ class NFSShare(StorageObject):
'mover_name': mover_name,
'err': expt})
LOG.exception(message)
raise exception.EMCVmaxXMLAPIError(err=message)
raise exception.EMCPowerMaxXMLAPIError(err=message)

View File

@ -147,7 +147,7 @@ class FakeData(object):
fake_error_msg = 'fake error message'
emc_share_backend = 'vnx'
vmax_share_backend = 'vmax'
powermax_share_backend = 'powermax'
emc_nas_server = '192.168.1.20'
emc_nas_login = 'fakename'
emc_nas_password = 'fakepassword'
@ -1564,8 +1564,9 @@ class FakeEMCShareDriver(object):
self.configuration.append_config_values = mock.Mock(return_value=0)
self.configuration.emc_share_backend = FakeData.emc_share_backend
self.configuration.vnx_server_container = FakeData.mover_name
if enas_type == 'vmax':
self.configuration.emc_share_backend = FakeData.vmax_share_backend
if enas_type == 'powermax':
self.configuration.emc_share_backend = (
FakeData.powermax_share_backend)
self.configuration.vmax_server_container = FakeData.mover_name
self.configuration.emc_nas_server = FakeData.emc_nas_server
self.configuration.emc_nas_login = FakeData.emc_nas_login

View File

@ -167,7 +167,8 @@ def patch_get_managed_ports_vnx(*arg, **kwargs):
mock.Mock(*arg, **kwargs))
def patch_get_managed_ports_vmax(*arg, **kwargs):
return mock.patch('manila.share.drivers.dell_emc.plugins.vmax.connection.'
'VMAXStorageConnection.get_managed_ports',
mock.Mock(*arg, **kwargs))
def patch_get_managed_ports_powermax(*arg, **kwargs):
return mock.patch(
'manila.share.drivers.dell_emc.plugins.powermax.connection.'
'PowerMaxStorageConnection.get_managed_ports',
mock.Mock(*arg, **kwargs))

View File

@ -1,4 +1,4 @@
# Copyright (c) 2016 Dell Inc. or its subsidiaries.
# Copyright (c) 2019 Dell Inc. or its subsidiaries.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may

View File

@ -26,7 +26,7 @@ from manila.common import constants as const
from manila.share.drivers.dell_emc.common.enas import connector
from manila.share.drivers.dell_emc.common.enas import constants
from manila.share.drivers.dell_emc.common.enas import xml_api_parser as parser
from manila.share.drivers.dell_emc.plugins.vmax import (
from manila.share.drivers.dell_emc.plugins.powermax import (
object_manager as manager)
from manila import test
from manila.tests.share.drivers.dell_emc.common.enas import fakes
@ -39,7 +39,7 @@ class StorageObjectManagerTestCase(test.TestCase):
def setUp(self):
super(StorageObjectManagerTestCase, self).setUp()
emd_share_driver = fakes.FakeEMCShareDriver('vmax')
emd_share_driver = fakes.FakeEMCShareDriver('powermax')
self.manager = manager.StorageObjectManager(
emd_share_driver.configuration)
@ -70,7 +70,7 @@ class StorageObjectManagerTestCase(test.TestCase):
fake_type = 'fake_type'
self.assertRaises(exception.EMCVmaxXMLAPIError,
self.assertRaises(exception.EMCPowerMaxXMLAPIError,
self.manager.getStorageContext,
fake_type)
@ -81,7 +81,7 @@ class StorageObjectTestCaseBase(test.TestCase):
def setUp(self):
super(StorageObjectTestCaseBase, self).setUp()
emd_share_driver = fakes.FakeEMCShareDriver('vmax')
emd_share_driver = fakes.FakeEMCShareDriver('powermax')
self.manager = manager.StorageObjectManager(
emd_share_driver.configuration)
@ -227,7 +227,7 @@ class FileSystemTestCase(StorageObjectTestCaseBase):
context = self.manager.getStorageContext('FileSystem')
context.conn['XML'].request = utils.EMCMock(side_effect=self.hook)
self.assertRaises(exception.EMCVmaxXMLAPIError,
self.assertRaises(exception.EMCPowerMaxXMLAPIError,
context.create,
name=self.fs.filesystem_name,
size=self.fs.filesystem_size,
@ -287,7 +287,7 @@ class FileSystemTestCase(StorageObjectTestCaseBase):
status, out = context.get(self.fs.filesystem_name)
self.assertEqual(constants.STATUS_ERROR, status)
self.assertRaises(exception.EMCVmaxXMLAPIError,
self.assertRaises(exception.EMCPowerMaxXMLAPIError,
context.get_id,
self.fs.filesystem_name)
@ -363,7 +363,7 @@ class FileSystemTestCase(StorageObjectTestCaseBase):
context = self.manager.getStorageContext('FileSystem')
context.conn['XML'].request = utils.EMCMock(side_effect=self.hook)
self.assertRaises(exception.EMCVmaxXMLAPIError,
self.assertRaises(exception.EMCPowerMaxXMLAPIError,
context.delete,
self.fs.filesystem_name)
@ -377,7 +377,7 @@ class FileSystemTestCase(StorageObjectTestCaseBase):
context = self.manager.getStorageContext('FileSystem')
context.conn['XML'].request = utils.EMCMock(side_effect=self.hook)
self.assertRaises(exception.EMCVmaxXMLAPIError,
self.assertRaises(exception.EMCPowerMaxXMLAPIError,
context.delete,
self.fs.filesystem_name)
@ -414,7 +414,7 @@ class FileSystemTestCase(StorageObjectTestCaseBase):
context = self.manager.getStorageContext('FileSystem')
context.conn['XML'].request = utils.EMCMock(side_effect=self.hook)
self.assertRaises(exception.EMCVmaxXMLAPIError,
self.assertRaises(exception.EMCPowerMaxXMLAPIError,
context.extend,
name=self.fs.filesystem_name,
pool_name=self.fs.pool_name,
@ -429,7 +429,7 @@ class FileSystemTestCase(StorageObjectTestCaseBase):
context = self.manager.getStorageContext('FileSystem')
context.conn['XML'].request = utils.EMCMock(side_effect=self.hook)
self.assertRaises(exception.EMCVmaxXMLAPIError,
self.assertRaises(exception.EMCPowerMaxXMLAPIError,
context.extend,
name=self.fs.filesystem_name,
pool_name=self.pool.pool_name,
@ -459,7 +459,7 @@ class FileSystemTestCase(StorageObjectTestCaseBase):
context = self.manager.getStorageContext('FileSystem')
context.conn['XML'].request = utils.EMCMock(side_effect=self.hook)
self.assertRaises(exception.EMCVmaxXMLAPIError,
self.assertRaises(exception.EMCPowerMaxXMLAPIError,
context.extend,
name=self.fs.filesystem_name,
pool_name=self.pool.pool_name,
@ -635,7 +635,7 @@ class MountPointTestCase(StorageObjectTestCaseBase):
context = self.manager.getStorageContext('MountPoint')
context.conn['XML'].request = utils.EMCMock(side_effect=self.hook)
self.assertRaises(exception.EMCVmaxXMLAPIError,
self.assertRaises(exception.EMCPowerMaxXMLAPIError,
context.create,
mount_path=self.mount.path,
fs_name=self.fs.filesystem_name,
@ -731,7 +731,7 @@ class MountPointTestCase(StorageObjectTestCaseBase):
context = self.manager.getStorageContext('MountPoint')
context.conn['XML'].request = utils.EMCMock(side_effect=self.hook)
self.assertRaises(exception.EMCVmaxXMLAPIError,
self.assertRaises(exception.EMCPowerMaxXMLAPIError,
context.delete,
mount_path=self.mount.path,
mover_name=self.vdm.vdm_name,
@ -920,7 +920,7 @@ class VDMTestCase(StorageObjectTestCaseBase):
context.conn['XML'].request = utils.EMCMock(side_effect=self.hook)
# Create VDM with invalid mover ID
self.assertRaises(exception.EMCVmaxXMLAPIError,
self.assertRaises(exception.EMCPowerMaxXMLAPIError,
context.create,
name=self.vdm.vdm_name,
mover_name=self.mover.mover_name)
@ -992,7 +992,7 @@ class VDMTestCase(StorageObjectTestCaseBase):
context = self.manager.getStorageContext('VDM')
context.conn['XML'].request = utils.EMCMock(side_effect=self.hook)
self.assertRaises(exception.EMCVmaxXMLAPIError,
self.assertRaises(exception.EMCPowerMaxXMLAPIError,
context.get_id,
self.vdm.vdm_name)
@ -1031,7 +1031,7 @@ class VDMTestCase(StorageObjectTestCaseBase):
context = self.manager.getStorageContext('VDM')
context.conn['XML'].request = utils.EMCMock(side_effect=self.hook)
self.assertRaises(exception.EMCVmaxXMLAPIError,
self.assertRaises(exception.EMCPowerMaxXMLAPIError,
context.delete,
self.vdm.vdm_name)
@ -1045,7 +1045,7 @@ class VDMTestCase(StorageObjectTestCaseBase):
context = self.manager.getStorageContext('VDM')
context.conn['XML'].request = utils.EMCMock(side_effect=self.hook)
self.assertRaises(exception.EMCVmaxXMLAPIError,
self.assertRaises(exception.EMCPowerMaxXMLAPIError,
context.delete,
self.vdm.vdm_name)
@ -1086,7 +1086,7 @@ class VDMTestCase(StorageObjectTestCaseBase):
context = self.manager.getStorageContext('VDM')
context.conn['SSH'].run_ssh = mock.Mock(side_effect=self.ssh_hook)
self.assertRaises(exception.EMCVmaxXMLAPIError,
self.assertRaises(exception.EMCPowerMaxXMLAPIError,
context.detach_nfs_interface,
self.vdm.vdm_name,
self.mover.interface_name2)
@ -1175,7 +1175,7 @@ class StoragePoolTestCase(StorageObjectTestCaseBase):
context = self.manager.getStorageContext('StoragePool')
context.conn['XML'].request = utils.EMCMock(side_effect=self.hook)
self.assertRaises(exception.EMCVmaxXMLAPIError,
self.assertRaises(exception.EMCPowerMaxXMLAPIError,
context.get_id,
self.pool.pool_name)
@ -1295,7 +1295,7 @@ class MoverTestCase(StorageObjectTestCaseBase):
context = self.manager.getStorageContext('Mover')
context.conn['XML'].request = utils.EMCMock(side_effect=self.hook)
self.assertRaises(exception.EMCVmaxXMLAPIError,
self.assertRaises(exception.EMCPowerMaxXMLAPIError,
context.get,
self.mover.mover_name)
@ -1407,7 +1407,7 @@ class SnapshotTestCase(StorageObjectTestCaseBase):
context = self.manager.getStorageContext('Snapshot')
context.conn['XML'].request = utils.EMCMock(side_effect=self.hook)
self.assertRaises(exception.EMCVmaxXMLAPIError,
self.assertRaises(exception.EMCPowerMaxXMLAPIError,
context.create,
name=self.snap.snapshot_name,
fs_name=self.fs.filesystem_name,
@ -1487,7 +1487,7 @@ class SnapshotTestCase(StorageObjectTestCaseBase):
context = self.manager.getStorageContext('Snapshot')
context.conn['XML'].request = utils.EMCMock(side_effect=self.hook)
self.assertRaises(exception.EMCVmaxXMLAPIError,
self.assertRaises(exception.EMCPowerMaxXMLAPIError,
context.delete,
self.snap.snapshot_name)
@ -1513,7 +1513,7 @@ class SnapshotTestCase(StorageObjectTestCaseBase):
context = self.manager.getStorageContext('Snapshot')
context.conn['XML'].request = utils.EMCMock(side_effect=self.hook)
self.assertRaises(exception.EMCVmaxXMLAPIError,
self.assertRaises(exception.EMCPowerMaxXMLAPIError,
context.delete,
self.snap.snapshot_name)
@ -1541,7 +1541,7 @@ class SnapshotTestCase(StorageObjectTestCaseBase):
context = self.manager.getStorageContext('Snapshot')
context.conn['XML'].request = utils.EMCMock(side_effect=self.hook)
self.assertRaises(exception.EMCVmaxXMLAPIError,
self.assertRaises(exception.EMCPowerMaxXMLAPIError,
context.get_id,
self.snap.snapshot_name)
@ -1651,7 +1651,7 @@ class MoverInterfaceTestCase(StorageObjectTestCaseBase):
'net_mask': self.mover.net_mask,
'vlan_id': self.mover.vlan_id,
}
self.assertRaises(exception.EMCVmaxXMLAPIError,
self.assertRaises(exception.EMCPowerMaxXMLAPIError,
context.create,
interface)
@ -1707,7 +1707,7 @@ class MoverInterfaceTestCase(StorageObjectTestCaseBase):
'net_mask': self.mover.net_mask,
'vlan_id': self.mover.vlan_id,
}
self.assertRaises(exception.EMCVmaxXMLAPIError,
self.assertRaises(exception.EMCPowerMaxXMLAPIError,
context.create,
interface)
@ -1831,7 +1831,7 @@ class MoverInterfaceTestCase(StorageObjectTestCaseBase):
context = self.manager.getStorageContext('MoverInterface')
context.conn['XML'].request = utils.EMCMock(side_effect=self.hook)
self.assertRaises(exception.EMCVmaxXMLAPIError,
self.assertRaises(exception.EMCPowerMaxXMLAPIError,
context.delete,
ip_addr=self.mover.ip_address1,
mover_name=self.mover.mover_name)
@ -1896,7 +1896,7 @@ class DNSDomainTestCase(StorageObjectTestCaseBase):
context = self.manager.getStorageContext('DNSDomain')
context.conn['XML'].request = utils.EMCMock(side_effect=self.hook)
self.assertRaises(exception.EMCVmaxXMLAPIError,
self.assertRaises(exception.EMCPowerMaxXMLAPIError,
context.create,
mover_name=self.mover.mover_name,
name=self.mover.domain_name,
@ -2075,7 +2075,7 @@ class CIFSServerTestCase(StorageObjectTestCaseBase):
'mover_name': self.vdm.vdm_name,
'is_vdm': True,
}
self.assertRaises(exception.EMCVmaxXMLAPIError,
self.assertRaises(exception.EMCPowerMaxXMLAPIError,
context.create,
cifs_server_args)
@ -2304,7 +2304,7 @@ class CIFSServerTestCase(StorageObjectTestCaseBase):
'password': self.cifs_server.domain_password,
'mover_name': self.vdm.vdm_name,
}
self.assertRaises(exception.EMCVmaxXMLAPIError,
self.assertRaises(exception.EMCPowerMaxXMLAPIError,
context.modify,
cifs_server_args)
@ -2377,7 +2377,7 @@ class CIFSServerTestCase(StorageObjectTestCaseBase):
context = self.manager.getStorageContext('CIFSServer')
context.conn['XML'].request = utils.EMCMock(side_effect=self.hook)
self.assertRaises(exception.EMCVmaxXMLAPIError,
self.assertRaises(exception.EMCPowerMaxXMLAPIError,
context.delete,
computer_name=self.cifs_server.cifs_server_name,
mover_name=self.mover.mover_name,
@ -2456,7 +2456,7 @@ class CIFSShareTestCase(StorageObjectTestCaseBase):
context = self.manager.getStorageContext('CIFSShare')
context.conn['XML'].request = utils.EMCMock(side_effect=self.hook)
self.assertRaises(exception.EMCVmaxXMLAPIError,
self.assertRaises(exception.EMCPowerMaxXMLAPIError,
context.create,
name=self.cifs_share.share_name,
server_name=self.cifs_share.cifs_server_name[-14:],
@ -2506,7 +2506,7 @@ class CIFSShareTestCase(StorageObjectTestCaseBase):
context = self.manager.getStorageContext('CIFSShare')
context.conn['XML'].request = utils.EMCMock(side_effect=self.hook)
self.assertRaises(exception.EMCVmaxXMLAPIError,
self.assertRaises(exception.EMCPowerMaxXMLAPIError,
context.delete,
name=self.cifs_share.share_name,
mover_name=self.vdm.vdm_name,
@ -2557,7 +2557,7 @@ class CIFSShareTestCase(StorageObjectTestCaseBase):
context = self.manager.getStorageContext('CIFSShare')
context.conn['XML'].request = utils.EMCMock(side_effect=self.hook)
self.assertRaises(exception.EMCVmaxXMLAPIError,
self.assertRaises(exception.EMCPowerMaxXMLAPIError,
context.delete,
name=self.cifs_share.share_name,
mover_name=self.vdm.vdm_name,
@ -2600,7 +2600,7 @@ class CIFSShareTestCase(StorageObjectTestCaseBase):
context = self.manager.getStorageContext('CIFSShare')
context.conn['SSH'].run_ssh = mock.Mock(side_effect=self.ssh_hook)
self.assertRaises(exception.EMCVmaxXMLAPIError,
self.assertRaises(exception.EMCPowerMaxXMLAPIError,
context.disable_share_access,
share_name=self.cifs_share.share_name,
mover_name=self.vdm.vdm_name)
@ -2648,7 +2648,7 @@ class CIFSShareTestCase(StorageObjectTestCaseBase):
context = self.manager.getStorageContext('CIFSShare')
context.conn['SSH'].run_ssh = mock.Mock(side_effect=self.ssh_hook)
self.assertRaises(exception.EMCVmaxXMLAPIError,
self.assertRaises(exception.EMCPowerMaxXMLAPIError,
context.allow_share_access,
mover_name=self.vdm.vdm_name,
share_name=self.cifs_share.share_name,
@ -2725,7 +2725,7 @@ class CIFSShareTestCase(StorageObjectTestCaseBase):
context = self.manager.getStorageContext('CIFSShare')
context.conn['SSH'].run_ssh = mock.Mock(side_effect=self.ssh_hook)
self.assertRaises(exception.EMCVmaxXMLAPIError,
self.assertRaises(exception.EMCPowerMaxXMLAPIError,
context.deny_share_access,
mover_name=self.vdm.vdm_name,
share_name=self.cifs_share.share_name,
@ -2765,7 +2765,7 @@ class CIFSShareTestCase(StorageObjectTestCaseBase):
context = self.manager.getStorageContext('CIFSShare')
context.conn['SSH'].run_ssh = mock.Mock(side_effect=self.ssh_hook)
self.assertRaises(exception.EMCVmaxXMLAPIError,
self.assertRaises(exception.EMCPowerMaxXMLAPIError,
context.get_share_access,
mover_name=self.vdm.vdm_name,
share_name=self.cifs_share.share_name)
@ -2822,7 +2822,7 @@ class NFSShareTestCase(StorageObjectTestCaseBase):
context = self.manager.getStorageContext('NFSShare')
context.conn['SSH'].run_ssh = mock.Mock(side_effect=self.ssh_hook)
self.assertRaises(exception.EMCVmaxXMLAPIError,
self.assertRaises(exception.EMCPowerMaxXMLAPIError,
context.create,
name=self.nfs_share.share_name,
mover_name=self.vdm.vdm_name)
@ -2898,7 +2898,7 @@ class NFSShareTestCase(StorageObjectTestCaseBase):
context = self.manager.getStorageContext('NFSShare')
context.conn['SSH'].run_ssh = mock.Mock(side_effect=self.ssh_hook)
self.assertRaises(exception.EMCVmaxXMLAPIError,
self.assertRaises(exception.EMCPowerMaxXMLAPIError,
context.delete,
name=self.nfs_share.share_name,
mover_name=self.vdm.vdm_name)
@ -2956,7 +2956,7 @@ class NFSShareTestCase(StorageObjectTestCaseBase):
context = self.manager.getStorageContext('NFSShare')
context.conn['SSH'].run_ssh = mock.Mock(side_effect=self.ssh_hook)
self.assertRaises(exception.EMCVmaxXMLAPIError,
self.assertRaises(exception.EMCPowerMaxXMLAPIError,
context.get,
name=self.nfs_share.share_name,
mover_name=self.vdm.vdm_name)
@ -3031,7 +3031,7 @@ class NFSShareTestCase(StorageObjectTestCaseBase):
context.conn['SSH'].run_ssh = utils.EMCNFSShareMock(
side_effect=self.ssh_hook)
self.assertRaises(exception.EMCVmaxXMLAPIError,
self.assertRaises(exception.EMCPowerMaxXMLAPIError,
context.allow_share_access,
share_name=self.nfs_share.share_name,
host_ip=self.nfs_share.nfs_host_ip,
@ -3134,7 +3134,7 @@ class NFSShareTestCase(StorageObjectTestCaseBase):
context.conn['SSH'].run_ssh = utils.EMCNFSShareMock(
side_effect=self.ssh_hook)
self.assertRaises(exception.EMCVmaxXMLAPIError,
self.assertRaises(exception.EMCPowerMaxXMLAPIError,
context.deny_share_access,
share_name=self.nfs_share.share_name,
host_ip=self.nfs_share.nfs_host_ip,
@ -3157,7 +3157,7 @@ class NFSShareTestCase(StorageObjectTestCaseBase):
context.conn['SSH'].run_ssh = utils.EMCNFSShareMock(
side_effect=self.ssh_hook)
self.assertRaises(exception.EMCVmaxXMLAPIError,
self.assertRaises(exception.EMCPowerMaxXMLAPIError,
context.deny_share_access,
share_name=self.nfs_share.share_name,
host_ip=self.nfs_share.nfs_host_ip,
@ -3176,7 +3176,7 @@ class NFSShareTestCase(StorageObjectTestCaseBase):
context = self.manager.getStorageContext('NFSShare')
context.conn['SSH'].run_ssh = mock.Mock(side_effect=self.ssh_hook)
self.assertRaises(exception.EMCVmaxXMLAPIError,
self.assertRaises(exception.EMCPowerMaxXMLAPIError,
context.clear_share_access,
share_name=self.nfs_share.share_name,
mover_name=self.vdm.vdm_name,

View File

@ -0,0 +1,20 @@
---
features:
- |
Rebrand from VMAX to PowerMax includes changing of tag names, directory
structure, file names and documentation.
deprecations:
- |
The following have been deprecated but will remain until the V release
``vmax_server_container`` is now ``powermax_server_container``
``vmax_share_data_pools`` is now ``powermax_share_data_pools``
``vmax_ethernet_ports`` is now ``powermax_ethernet_ports``
upgrade:
- |
- ``emc_share_backend`` configuration option must be switched from ``vmax``
to ``powermax`` if using a newly rebranded PowerMax storage backend.
- If using a PowerMax storage backend, deprecated options
``emc_nas_server_container``, ``emc_nas_pool_names`` and
``emc_interface_ports`` can no longer be used. They must be replaced by
``powermax_server_container``, ``powermax_share_data_pools`` and
``powermax_ethernet_ports`` respectively.

View File

@ -82,7 +82,7 @@ manila.share.drivers.dell_emc.plugins =
vnx = manila.share.drivers.dell_emc.plugins.vnx.connection:VNXStorageConnection
unity = manila.share.drivers.dell_emc.plugins.unity.connection:UnityStorageConnection
isilon = manila.share.drivers.dell_emc.plugins.isilon.isilon:IsilonStorageConnection
vmax = manila.share.drivers.dell_emc.plugins.vmax.connection:VMAXStorageConnection
powermax = manila.share.drivers.dell_emc.plugins.powermax.connection:PowerMaxStorageConnection
manila.tests.scheduler.fakes =
FakeWeigher1 = manila.tests.scheduler.fakes:FakeWeigher1
FakeWeigher2 = manila.tests.scheduler.fakes:FakeWeigher2