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:
parent
6afe12050d
commit
6995b9f975
@ -10,7 +10,7 @@ Share drivers
|
|||||||
|
|
||||||
drivers/generic-driver.rst
|
drivers/generic-driver.rst
|
||||||
drivers/cephfs-native-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-unity-driver.rst
|
||||||
drivers/dell-emc-vnx-driver.rst
|
drivers/dell-emc-vnx-driver.rst
|
||||||
drivers/glusterfs-driver.rst
|
drivers/glusterfs-driver.rst
|
||||||
|
@ -1,29 +1,29 @@
|
|||||||
====================
|
========================
|
||||||
Dell EMC VMAX driver
|
Dell EMC PowerMax Plugin
|
||||||
====================
|
========================
|
||||||
|
|
||||||
The Dell EMC Shared File Systems service driver framework (EMCShareDriver)
|
The Dell EMC Shared File Systems service driver framework (EMCShareDriver)
|
||||||
utilizes the Dell EMC storage products to provide the shared file systems
|
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 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.
|
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
|
The PowerMax plug-in manages the PowerMax to provide shared file systems.
|
||||||
driver framework with the VMAX plug-in is referred to as the VMAX driver
|
The Dell EMC driver framework with the PowerMax plug-in is referred to as the
|
||||||
in this document.
|
PowerMax driver in this document.
|
||||||
|
|
||||||
This driver performs the operations on VMAX eNAS by XMLAPI and the file
|
This driver performs the operations on PowerMax eNAS by XMLAPI and the file
|
||||||
command line. Each back end manages one Data Mover of VMAX. Multiple
|
command line. Each back end manages one Data Mover of PowerMax. Multiple
|
||||||
Shared File Systems service back ends need to be configured to manage
|
Shared File Systems service back ends need to be configured to manage
|
||||||
multiple Data Movers.
|
multiple Data Movers.
|
||||||
|
|
||||||
Requirements
|
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
|
- CIFS
|
||||||
|
|
||||||
@ -60,17 +60,17 @@ The following operations are supported:
|
|||||||
- Create a share from a snapshot.
|
- Create a share from a snapshot.
|
||||||
|
|
||||||
While the generic driver creates shared file systems based on cinder
|
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.
|
using the Data Movers on the array.
|
||||||
|
|
||||||
Pre-configurations on VMAX
|
Pre-configurations on PowerMax
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
#. Configure a storage pool
|
#. Configure a storage pool
|
||||||
|
|
||||||
There is a one to one relationship between a storage pool in embedded NAS
|
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
|
to a storage group on the PowerMax. The best way to provision
|
||||||
storage for file is from the Unisphere for VMAX UI rather than eNAS UI.
|
storage for file is from the Unisphere for PowerMax UI rather than eNAS UI.
|
||||||
Go to :menuselection:`{array} > SYSTEM > FIle` and under
|
Go to :menuselection:`{array} > SYSTEM > FIle` and under
|
||||||
:menuselection:`Actions` click :menuselection:`PROVISION STORAGE FOR FILE`
|
:menuselection:`Actions` click :menuselection:`PROVISION STORAGE FOR FILE`
|
||||||
|
|
||||||
@ -109,7 +109,7 @@ Pre-configurations on VMAX
|
|||||||
#. Enable CIFS service on Data Mover.
|
#. Enable CIFS service on Data Mover.
|
||||||
|
|
||||||
Ensure the CIFS service is enabled on the Data Mover which is going
|
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:
|
To start the CIFS service, use the following command:
|
||||||
|
|
||||||
@ -136,7 +136,7 @@ Pre-configurations on VMAX
|
|||||||
|
|
||||||
#. NTP settings on Data Mover.
|
#. 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.
|
which has an Active Directory security-service associated.
|
||||||
|
|
||||||
Creating CIFS share requires that the time on the Data Mover is in
|
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.
|
#. 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
|
method of mapping Windows SIDs to UIDs and GIDs. DELL EMC recommends
|
||||||
using usermapper in single protocol (CIFS) environment which is
|
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:
|
To check usermapper status, use the following command syntax:
|
||||||
|
|
||||||
@ -205,7 +205,7 @@ Pre-configurations on VMAX
|
|||||||
$ server_usermapper <movername> -enable
|
$ server_usermapper <movername> -enable
|
||||||
# movername = name of the Data Mover
|
# 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
|
Mapping on `EMC support site <http://support.emc.com>`_ for
|
||||||
additional information.
|
additional information.
|
||||||
|
|
||||||
@ -257,42 +257,42 @@ Back-end configurations
|
|||||||
|
|
||||||
|
|
||||||
The following parameters need to be configured in the
|
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
|
.. code-block:: ini
|
||||||
|
|
||||||
emc_share_backend = vmax
|
emc_share_backend = powermax
|
||||||
emc_nas_server = <IP address>
|
emc_nas_server = <IP address>
|
||||||
emc_nas_password = <password>
|
emc_nas_password = <password>
|
||||||
emc_nas_login = <user>
|
emc_nas_login = <user>
|
||||||
driver_handles_share_servers = True
|
driver_handles_share_servers = True
|
||||||
vmax_server_container = <Data Mover name>
|
powermax_server_container = <Data Mover name>
|
||||||
vmax_share_data_pools = <Comma separated pool names>
|
powermax_share_data_pools = <Comma separated pool names>
|
||||||
share_driver = manila.share.drivers.dell_emc.driver.EMCShareDriver
|
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_verify = True
|
||||||
emc_ssl_cert_path = <path to cert>
|
emc_ssl_cert_path = <path to cert>
|
||||||
emc_share_backend = vmax
|
|
||||||
share_backend_name = <Backend>
|
share_backend_name = <Backend>
|
||||||
|
|
||||||
- `emc_share_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`
|
- `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`
|
- `emc_nas_password` and `emc_nas_login`
|
||||||
The fields that are used to provide credentials to the
|
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`
|
- `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.
|
and management of the share servers.
|
||||||
|
|
||||||
- `vmax_server_container`
|
- `powermax_server_container`
|
||||||
Name of the Data Mover to serve the share service.
|
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
|
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
|
by this back end. Do not set this option if all storage pools
|
||||||
on the system can be used.
|
on the system can be used.
|
||||||
@ -300,7 +300,7 @@ The following parameters need to be configured in the
|
|||||||
|
|
||||||
Examples: pool_1, pool_*, *
|
Examples: pool_1, pool_*, *
|
||||||
|
|
||||||
- `vmax_ethernet_ports (optional)`
|
- `powermax_ethernet_ports (optional)`
|
||||||
Comma-separated list specifying the ports (devices) of Data Mover
|
Comma-separated list specifying the ports (devices) of Data Mover
|
||||||
that can be used for share server interface. Do not set this
|
that can be used for share server interface. Do not set this
|
||||||
option if all ports on the Data Mover can be used.
|
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
|
the recommended configuration. See ``SSL Support`` section for more
|
||||||
details.
|
details.
|
||||||
|
|
||||||
- `emc_share_backend`
|
|
||||||
Set to ``vmax`` to enable vmax manila plugin . Other values are
|
|
||||||
``isilon``, ``vnx`` and ``unity``.
|
|
||||||
|
|
||||||
- `share_backend_name`
|
- `share_backend_name`
|
||||||
The backend name for a given driver implementation.
|
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
|
||||||
~~~~~~~~~~~~
|
~~~~~~~~~~~~
|
||||||
IPv6 support for VMAX Manila driver is introduced in Rocky release. The feature is
|
IPv6 support for PowerMax Manila driver was introduced in Rocky release.
|
||||||
divided into two parts:
|
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 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.
|
address.
|
||||||
|
|
||||||
Pre-Configurations for IPv6 support
|
Pre-Configurations for IPv6 support
|
||||||
-----------------------------------
|
-----------------------------------
|
||||||
|
|
||||||
The following parameters need to be configured in ``/etc/manila/manila.conf``
|
The following parameters need to be configured in ``/etc/manila/manila.conf``
|
||||||
for the VMAX driver:
|
for the PowerMax driver:
|
||||||
|
|
||||||
.. code-block:: ini
|
.. code-block:: ini
|
||||||
|
|
||||||
@ -479,7 +475,7 @@ address in ``/etc/manila/manila.conf``:
|
|||||||
Restrictions
|
Restrictions
|
||||||
~~~~~~~~~~~~
|
~~~~~~~~~~~~
|
||||||
|
|
||||||
The VMAX driver has the following restrictions:
|
The PowerMax driver has the following restrictions:
|
||||||
|
|
||||||
- Only ``driver_handles_share_servers`` equals True is supported.
|
- 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
|
- VLAN network is supported with limitations. The neutron subnets in
|
||||||
different VLANs that are used to create share networks cannot have
|
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
|
communicate with the hosts in the VLANs. To create shares for
|
||||||
different VLANs with same subnet address, use different Data Movers.
|
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,
|
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).
|
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
|
``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
|
Reference guide on `EMC support site <http://support.emc.com>`_ for
|
||||||
additional information.
|
additional information.
|
||||||
``OpenStack manila quotas`` delimit the number of shares, snapshots etc.
|
``OpenStack manila quotas`` delimit the number of shares, snapshots etc.
|
||||||
@ -567,4 +563,4 @@ Driver options
|
|||||||
|
|
||||||
Configuration options specific to this driver:
|
Configuration options specific to this driver:
|
||||||
|
|
||||||
.. include:: ../../tables/manila-vmax.inc
|
.. include:: ../../tables/manila-powermax.inc
|
@ -8,9 +8,9 @@
|
|||||||
autogenerate-config-doc tool from the openstack-doc-tools repository, or
|
autogenerate-config-doc tool from the openstack-doc-tools repository, or
|
||||||
ask for help on the documentation mailing list, IRC channel or meeting.
|
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
|
:header-rows: 1
|
||||||
:class: config-ref-table
|
:class: config-ref-table
|
||||||
|
|
||||||
@ -18,9 +18,9 @@
|
|||||||
- Description
|
- Description
|
||||||
* - **[DEFAULT]**
|
* - **[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.
|
- (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.
|
- (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.
|
- (List) Comma separated list of pools that can be used to persist share data.
|
@ -751,15 +751,15 @@ class VserverNotSpecified(NetAppException):
|
|||||||
message = _("Vserver not specified.")
|
message = _("Vserver not specified.")
|
||||||
|
|
||||||
|
|
||||||
class EMCVmaxXMLAPIError(Invalid):
|
class EMCPowerMaxXMLAPIError(Invalid):
|
||||||
message = _("%(err)s")
|
message = _("%(err)s")
|
||||||
|
|
||||||
|
|
||||||
class EMCVmaxLockRequiredException(ManilaException):
|
class EMCPowerMaxLockRequiredException(ManilaException):
|
||||||
message = _("Unable to acquire lock(s).")
|
message = _("Unable to acquire lock(s).")
|
||||||
|
|
||||||
|
|
||||||
class EMCVmaxInvalidMoverID(ManilaException):
|
class EMCPowerMaxInvalidMoverID(ManilaException):
|
||||||
message = _("Invalid mover or vdm %(id)s.")
|
message = _("Invalid mover or vdm %(id)s.")
|
||||||
|
|
||||||
|
|
||||||
|
@ -58,7 +58,7 @@ import manila.share.drivers.container.driver
|
|||||||
import manila.share.drivers.container.storage_helper
|
import manila.share.drivers.container.storage_helper
|
||||||
import manila.share.drivers.dell_emc.driver
|
import manila.share.drivers.dell_emc.driver
|
||||||
import manila.share.drivers.dell_emc.plugins.isilon.isilon
|
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.generic
|
||||||
import manila.share.drivers.glusterfs
|
import manila.share.drivers.glusterfs
|
||||||
import manila.share.drivers.glusterfs.common
|
import manila.share.drivers.glusterfs.common
|
||||||
@ -141,7 +141,7 @@ _global_opt_lists = [
|
|||||||
manila.share.drivers.container.driver.container_opts,
|
manila.share.drivers.container.driver.container_opts,
|
||||||
manila.share.drivers.container.storage_helper.lv_opts,
|
manila.share.drivers.container.storage_helper.lv_opts,
|
||||||
manila.share.drivers.dell_emc.driver.EMC_NAS_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.generic.share_opts,
|
||||||
manila.share.drivers.glusterfs.common.glusterfs_common_opts,
|
manila.share.drivers.glusterfs.common.glusterfs_common_opts,
|
||||||
manila.share.drivers.glusterfs.GlusterfsManilaShare_opts,
|
manila.share.drivers.glusterfs.GlusterfsManilaShare_opts,
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# Copyright (c) 2014 EMC Corporation.
|
# Copyright (c) 2019 EMC Corporation.
|
||||||
# All Rights Reserved.
|
# All Rights Reserved.
|
||||||
#
|
#
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
# 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_config import cfg
|
||||||
|
from oslo_log import log
|
||||||
|
|
||||||
from manila.share import driver
|
from manila.share import driver
|
||||||
from manila.share.drivers.dell_emc import plugin_manager as manager
|
from manila.share.drivers.dell_emc import plugin_manager as manager
|
||||||
@ -40,7 +41,7 @@ EMC_NAS_OPTS = [
|
|||||||
help='Use secure connection to server.'),
|
help='Use secure connection to server.'),
|
||||||
cfg.StrOpt('emc_share_backend',
|
cfg.StrOpt('emc_share_backend',
|
||||||
ignore_case=True,
|
ignore_case=True,
|
||||||
choices=['isilon', 'vnx', 'unity', 'vmax'],
|
choices=['isilon', 'vnx', 'unity', 'vmax', 'powermax'],
|
||||||
help='Share backend.'),
|
help='Share backend.'),
|
||||||
cfg.StrOpt('emc_nas_root_dir',
|
cfg.StrOpt('emc_nas_root_dir',
|
||||||
help='The root directory where shares will be located.'),
|
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.')
|
'CAs, which will be used to validate the backend.')
|
||||||
]
|
]
|
||||||
|
|
||||||
|
LOG = log.getLogger(__name__)
|
||||||
|
|
||||||
CONF = cfg.CONF
|
CONF = cfg.CONF
|
||||||
CONF.register_opts(EMC_NAS_OPTS)
|
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.backend_name = self.backend_name or 'EMC_NAS_Storage'
|
||||||
self.plugin_manager = manager.EMCPluginManager(
|
self.plugin_manager = manager.EMCPluginManager(
|
||||||
namespace='manila.share.drivers.dell_emc.plugins')
|
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.plugin = self.plugin_manager.load_plugin(
|
||||||
self.backend_name,
|
self.backend_name,
|
||||||
configuration=self.configuration)
|
configuration=self.configuration)
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# Copyright (c) 2016 Dell Inc. or its subsidiaries.
|
# Copyright (c) 2019 Dell Inc. or its subsidiaries.
|
||||||
# All Rights Reserved.
|
# All Rights Reserved.
|
||||||
#
|
#
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
# 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
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
"""VMAX backend for the EMC Manila driver."""
|
"""PowerMax backend for the Dell EMC Manila driver."""
|
||||||
|
|
||||||
import copy
|
import copy
|
||||||
import random
|
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 constants
|
||||||
from manila.share.drivers.dell_emc.common.enas import utils as enas_utils
|
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 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)
|
object_manager as manager)
|
||||||
from manila.share import utils as share_utils
|
from manila.share import utils as share_utils
|
||||||
from manila import utils
|
from manila import utils
|
||||||
@ -37,40 +37,42 @@ from manila import utils
|
|||||||
"""Version history:
|
"""Version history:
|
||||||
1.0.0 - Initial version
|
1.0.0 - Initial version
|
||||||
2.0.0 - Implement IPv6 support
|
2.0.0 - Implement IPv6 support
|
||||||
|
3.0.0 - Rebranding to PowerMax
|
||||||
"""
|
"""
|
||||||
VERSION = "2.0.0"
|
VERSION = "3.0.0"
|
||||||
|
|
||||||
LOG = log.getLogger(__name__)
|
LOG = log.getLogger(__name__)
|
||||||
|
|
||||||
VMAX_OPTS = [
|
POWERMAX_OPTS = [
|
||||||
cfg.StrOpt('vmax_server_container',
|
cfg.StrOpt('powermax_server_container',
|
||||||
deprecated_name='emc_nas_server_container',
|
deprecated_name='vmax_server_container',
|
||||||
help='Data mover to host the NAS server.'),
|
help='Data mover to host the NAS server.'),
|
||||||
cfg.ListOpt('vmax_share_data_pools',
|
cfg.ListOpt('powermax_share_data_pools',
|
||||||
deprecated_name='emc_nas_pool_names',
|
deprecated_name='vmax_share_data_pools',
|
||||||
help='Comma separated list of pools that can be used to '
|
help='Comma separated list of pools that can be used to '
|
||||||
'persist share data.'),
|
'persist share data.'),
|
||||||
cfg.ListOpt('vmax_ethernet_ports',
|
cfg.ListOpt('powermax_ethernet_ports',
|
||||||
deprecated_name='emc_interface_ports',
|
deprecated_name='vmax_ethernet_ports',
|
||||||
help='Comma separated list of ports that can be used for '
|
help='Comma separated list of ports that can be used for '
|
||||||
'share server interfaces. Members of the list '
|
'share server interfaces. Members of the list '
|
||||||
'can be Unix-style glob expressions.')
|
'can be Unix-style glob expressions.')
|
||||||
]
|
]
|
||||||
|
|
||||||
CONF = cfg.CONF
|
CONF = cfg.CONF
|
||||||
CONF.register_opts(VMAX_OPTS)
|
CONF.register_opts(POWERMAX_OPTS)
|
||||||
|
|
||||||
|
|
||||||
@enas_utils.decorate_all_methods(enas_utils.log_enter_exit,
|
@enas_utils.decorate_all_methods(enas_utils.log_enter_exit,
|
||||||
debug_only=True)
|
debug_only=True)
|
||||||
class VMAXStorageConnection(driver.StorageConnection):
|
class PowerMaxStorageConnection(driver.StorageConnection):
|
||||||
"""Implements vmax specific functionality for EMC Manila driver."""
|
"""Implements powermax specific functionality for Dell EMC Manila driver.
|
||||||
|
|
||||||
|
"""
|
||||||
@enas_utils.log_enter_exit
|
@enas_utils.log_enter_exit
|
||||||
def __init__(self, *args, **kwargs):
|
def __init__(self, *args, **kwargs):
|
||||||
super(VMAXStorageConnection, self).__init__(*args, **kwargs)
|
super(PowerMaxStorageConnection, self).__init__(*args, **kwargs)
|
||||||
if 'configuration' in kwargs:
|
if 'configuration' in kwargs:
|
||||||
kwargs['configuration'].append_config_values(VMAX_OPTS)
|
kwargs['configuration'].append_config_values(POWERMAX_OPTS)
|
||||||
|
|
||||||
self.mover_name = None
|
self.mover_name = None
|
||||||
self.pools = None
|
self.pools = None
|
||||||
@ -114,7 +116,7 @@ class VMAXStorageConnection(driver.StorageConnection):
|
|||||||
if status != constants.STATUS_OK:
|
if status != constants.STATUS_OK:
|
||||||
message = (_("CIFS server %s not found.") % server_name)
|
message = (_("CIFS server %s not found.") % server_name)
|
||||||
LOG.error(message)
|
LOG.error(message)
|
||||||
raise exception.EMCVmaxXMLAPIError(err=message)
|
raise exception.EMCPowerMaxXMLAPIError(err=message)
|
||||||
|
|
||||||
self._allocate_container(share_name, size, share_server, pool_name)
|
self._allocate_container(share_name, size, share_server, pool_name)
|
||||||
|
|
||||||
@ -138,7 +140,7 @@ class VMAXStorageConnection(driver.StorageConnection):
|
|||||||
if vdm is None:
|
if vdm is None:
|
||||||
message = _("No share server found.")
|
message = _("No share server found.")
|
||||||
LOG.error(message)
|
LOG.error(message)
|
||||||
raise exception.EMCVmaxXMLAPIError(err=message)
|
raise exception.EMCPowerMaxXMLAPIError(err=message)
|
||||||
|
|
||||||
def _allocate_container(self, share_name, size, share_server, pool_name):
|
def _allocate_container(self, share_name, size, share_server, pool_name):
|
||||||
"""Allocate file system for share."""
|
"""Allocate file system for share."""
|
||||||
@ -178,7 +180,7 @@ class VMAXStorageConnection(driver.StorageConnection):
|
|||||||
"so the share is inaccessible.")
|
"so the share is inaccessible.")
|
||||||
% server['compName'])
|
% server['compName'])
|
||||||
LOG.error(message)
|
LOG.error(message)
|
||||||
raise exception.EMCVmaxXMLAPIError(err=message)
|
raise exception.EMCPowerMaxXMLAPIError(err=message)
|
||||||
|
|
||||||
interface = enas_utils.export_unc_path(server['interfaces'][0])
|
interface = enas_utils.export_unc_path(server['interfaces'][0])
|
||||||
|
|
||||||
@ -254,7 +256,7 @@ class VMAXStorageConnection(driver.StorageConnection):
|
|||||||
if status != constants.STATUS_OK:
|
if status != constants.STATUS_OK:
|
||||||
message = (_("File System %s not found.") % share_name)
|
message = (_("File System %s not found.") % share_name)
|
||||||
LOG.error(message)
|
LOG.error(message)
|
||||||
raise exception.EMCVmaxXMLAPIError(err=message)
|
raise exception.EMCPowerMaxXMLAPIError(err=message)
|
||||||
|
|
||||||
pool_id = filesystem['pools_id'][0]
|
pool_id = filesystem['pools_id'][0]
|
||||||
|
|
||||||
@ -309,7 +311,7 @@ class VMAXStorageConnection(driver.StorageConnection):
|
|||||||
try:
|
try:
|
||||||
# Delete mount point
|
# Delete mount point
|
||||||
self._get_context('MountPoint').delete(path, vdm_name)
|
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 "
|
LOG.exception("CIFS server %(name)s on mover %(mover_name)s "
|
||||||
"not found due to error %(err)s. Skip the "
|
"not found due to error %(err)s. Skip the "
|
||||||
"deletion.",
|
"deletion.",
|
||||||
@ -319,7 +321,7 @@ class VMAXStorageConnection(driver.StorageConnection):
|
|||||||
try:
|
try:
|
||||||
# Delete file system
|
# Delete file system
|
||||||
self._get_context('FileSystem').delete(share_name)
|
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 "
|
LOG.exception("File system %(share_name)s not found due to "
|
||||||
"error %(err)s. Skip the deletion.",
|
"error %(err)s. Skip the deletion.",
|
||||||
{'share_name': share_name,
|
{'share_name': share_name,
|
||||||
@ -387,7 +389,7 @@ class VMAXStorageConnection(driver.StorageConnection):
|
|||||||
if status != constants.STATUS_OK:
|
if status != constants.STATUS_OK:
|
||||||
message = (_("CIFS server %s not found.") % server_name)
|
message = (_("CIFS server %s not found.") % server_name)
|
||||||
LOG.error(message)
|
LOG.error(message)
|
||||||
raise exception.EMCVmaxXMLAPIError(err=message)
|
raise exception.EMCPowerMaxXMLAPIError(err=message)
|
||||||
|
|
||||||
self._get_context('CIFSShare').allow_share_access(
|
self._get_context('CIFSShare').allow_share_access(
|
||||||
vdm_name,
|
vdm_name,
|
||||||
@ -453,7 +455,7 @@ class VMAXStorageConnection(driver.StorageConnection):
|
|||||||
message = (_("CIFS server %(server_name)s has issue. "
|
message = (_("CIFS server %(server_name)s has issue. "
|
||||||
"Detail: %(status)s") %
|
"Detail: %(status)s") %
|
||||||
{'server_name': server_name, 'status': status})
|
{'server_name': server_name, 'status': status})
|
||||||
raise exception.EMCVmaxXMLAPIError(err=message)
|
raise exception.EMCPowerMaxXMLAPIError(err=message)
|
||||||
|
|
||||||
self._get_context('CIFSShare').clear_share_access(
|
self._get_context('CIFSShare').clear_share_access(
|
||||||
share_name=share_name,
|
share_name=share_name,
|
||||||
@ -506,7 +508,7 @@ class VMAXStorageConnection(driver.StorageConnection):
|
|||||||
if status != constants.STATUS_OK:
|
if status != constants.STATUS_OK:
|
||||||
message = (_("CIFS server %s not found.") % server_name)
|
message = (_("CIFS server %s not found.") % server_name)
|
||||||
LOG.error(message)
|
LOG.error(message)
|
||||||
raise exception.EMCVmaxXMLAPIError(err=message)
|
raise exception.EMCPowerMaxXMLAPIError(err=message)
|
||||||
|
|
||||||
self._get_context('CIFSShare').deny_share_access(
|
self._get_context('CIFSShare').deny_share_access(
|
||||||
vdm_name,
|
vdm_name,
|
||||||
@ -552,7 +554,7 @@ class VMAXStorageConnection(driver.StorageConnection):
|
|||||||
message = (_("Failed to get storage pool information. "
|
message = (_("Failed to get storage pool information. "
|
||||||
"Reason: %s") % backend_pools)
|
"Reason: %s") % backend_pools)
|
||||||
LOG.error(message)
|
LOG.error(message)
|
||||||
raise exception.EMCVmaxXMLAPIError(err=message)
|
raise exception.EMCPowerMaxXMLAPIError(err=message)
|
||||||
|
|
||||||
real_pools = set([item for item in backend_pools])
|
real_pools = set([item for item in backend_pools])
|
||||||
conf_pools = set([item.strip() for item in pools])
|
conf_pools = set([item.strip() for item in pools])
|
||||||
@ -575,19 +577,19 @@ class VMAXStorageConnection(driver.StorageConnection):
|
|||||||
return matched_pools
|
return matched_pools
|
||||||
|
|
||||||
def connect(self, emc_share_driver, context):
|
def connect(self, emc_share_driver, context):
|
||||||
"""Connect to VMAX NAS server."""
|
"""Connect to PowerMax NAS server."""
|
||||||
config = emc_share_driver.configuration
|
config = emc_share_driver.configuration
|
||||||
config.append_config_values(VMAX_OPTS)
|
config.append_config_values(POWERMAX_OPTS)
|
||||||
self.mover_name = config.vmax_server_container
|
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')
|
self.reserved_percentage = config.safe_get('reserved_share_percentage')
|
||||||
if self.reserved_percentage is None:
|
if self.reserved_percentage is None:
|
||||||
self.reserved_percentage = 0
|
self.reserved_percentage = 0
|
||||||
|
|
||||||
self.manager = manager.StorageObjectManager(config)
|
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):
|
def get_managed_ports(self):
|
||||||
# Get the real ports(devices) list from the backend storage
|
# Get the real ports(devices) list from the backend storage
|
||||||
@ -603,7 +605,7 @@ class VMAXStorageConnection(driver.StorageConnection):
|
|||||||
|
|
||||||
if not matched_ports:
|
if not matched_ports:
|
||||||
msg = (_("None of the specified network ports exist. "
|
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 "
|
"in manila.conf. The available ports on the Data Mover "
|
||||||
"are %s.") %
|
"are %s.") %
|
||||||
",".join(real_ports))
|
",".join(real_ports))
|
||||||
@ -643,7 +645,7 @@ class VMAXStorageConnection(driver.StorageConnection):
|
|||||||
if not stats_dict['pools']:
|
if not stats_dict['pools']:
|
||||||
message = _("Failed to update storage pool.")
|
message = _("Failed to update storage pool.")
|
||||||
LOG.error(message)
|
LOG.error(message)
|
||||||
raise exception.EMCVmaxXMLAPIError(err=message)
|
raise exception.EMCPowerMaxXMLAPIError(err=message)
|
||||||
|
|
||||||
def get_pool(self, share):
|
def get_pool(self, share):
|
||||||
"""Get the pool name of the share."""
|
"""Get the pool name of the share."""
|
||||||
@ -654,7 +656,7 @@ class VMAXStorageConnection(driver.StorageConnection):
|
|||||||
"Reason: %(err)s") %
|
"Reason: %(err)s") %
|
||||||
{'name': share_name, 'err': filesystem})
|
{'name': share_name, 'err': filesystem})
|
||||||
LOG.error(message)
|
LOG.error(message)
|
||||||
raise exception.EMCVmaxXMLAPIError(err=message)
|
raise exception.EMCPowerMaxXMLAPIError(err=message)
|
||||||
|
|
||||||
pool_id = filesystem['pools_id'][0]
|
pool_id = filesystem['pools_id'][0]
|
||||||
|
|
||||||
@ -664,7 +666,7 @@ class VMAXStorageConnection(driver.StorageConnection):
|
|||||||
message = (_("Failed to get storage pool information. "
|
message = (_("Failed to get storage pool information. "
|
||||||
"Reason: %s") % backend_pools)
|
"Reason: %s") % backend_pools)
|
||||||
LOG.error(message)
|
LOG.error(message)
|
||||||
raise exception.EMCVmaxXMLAPIError(err=message)
|
raise exception.EMCPowerMaxXMLAPIError(err=message)
|
||||||
|
|
||||||
for name, pool_info in backend_pools.items():
|
for name, pool_info in backend_pools.items():
|
||||||
if pool_info['id'] == pool_id:
|
if pool_info['id'] == pool_id:
|
||||||
@ -674,7 +676,7 @@ class VMAXStorageConnection(driver.StorageConnection):
|
|||||||
message = (_("No matched pool name for share: %(share)s. "
|
message = (_("No matched pool name for share: %(share)s. "
|
||||||
"Available pools: %(pools)s") %
|
"Available pools: %(pools)s") %
|
||||||
{'share': share_name, 'pools': available_pools})
|
{'share': share_name, 'pools': available_pools})
|
||||||
raise exception.EMCVmaxXMLAPIError(err=message)
|
raise exception.EMCPowerMaxXMLAPIError(err=message)
|
||||||
|
|
||||||
def get_network_allocations_number(self):
|
def get_network_allocations_number(self):
|
||||||
"""Returns number of network allocations for creating VIFs."""
|
"""Returns number of network allocations for creating VIFs."""
|
||||||
@ -696,7 +698,7 @@ class VMAXStorageConnection(driver.StorageConnection):
|
|||||||
network_info['security_services'])
|
network_info['security_services'])
|
||||||
|
|
||||||
if not is_valid:
|
if not is_valid:
|
||||||
raise exception.EMCVmaxXMLAPIError(err=active_directory)
|
raise exception.EMCPowerMaxXMLAPIError(err=active_directory)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
if not self._vdm_exist(vdm_name):
|
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.") %
|
message = (_("Could not get physical device port on mover %s.") %
|
||||||
self.mover_name)
|
self.mover_name)
|
||||||
LOG.error(message)
|
LOG.error(message)
|
||||||
raise exception.EMCVmaxXMLAPIError(err=message)
|
raise exception.EMCPowerMaxXMLAPIError(err=message)
|
||||||
|
|
||||||
return devices
|
return devices
|
||||||
|
|
||||||
@ -852,7 +854,7 @@ class VMAXStorageConnection(driver.StorageConnection):
|
|||||||
try:
|
try:
|
||||||
self._get_context('CIFSServer').modify(
|
self._get_context('CIFSServer').modify(
|
||||||
cifs_server_args)
|
cifs_server_args)
|
||||||
except exception.EMCVmaxXMLAPIError as expt:
|
except exception.EMCPowerMaxXMLAPIError as expt:
|
||||||
LOG.debug("Failed to modify CIFS server "
|
LOG.debug("Failed to modify CIFS server "
|
||||||
"%(server)s. Reason: %(err)s.",
|
"%(server)s. Reason: %(err)s.",
|
||||||
{'server': server, 'err': expt})
|
{'server': server, 'err': expt})
|
@ -27,15 +27,15 @@ from manila import exception
|
|||||||
from manila.i18n import _
|
from manila.i18n import _
|
||||||
from manila.share.drivers.dell_emc.common.enas import connector
|
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 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.share.drivers.dell_emc.common.enas import xml_api_parser as parser
|
||||||
from manila import utils
|
from manila import utils
|
||||||
|
|
||||||
LOG = log.getLogger(__name__)
|
LOG = log.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
@vmax_utils.decorate_all_methods(vmax_utils.log_enter_exit,
|
@powermax_utils.decorate_all_methods(powermax_utils.log_enter_exit,
|
||||||
debug_only=True)
|
debug_only=True)
|
||||||
class StorageObjectManager(object):
|
class StorageObjectManager(object):
|
||||||
def __init__(self, configuration):
|
def __init__(self, configuration):
|
||||||
self.context = {}
|
self.context = {}
|
||||||
@ -61,7 +61,7 @@ class StorageObjectManager(object):
|
|||||||
else:
|
else:
|
||||||
message = (_("Invalid storage object type %s.") % type)
|
message = (_("Invalid storage object type %s.") % type)
|
||||||
LOG.error(message)
|
LOG.error(message)
|
||||||
raise exception.EMCVmaxXMLAPIError(err=message)
|
raise exception.EMCPowerMaxXMLAPIError(err=message)
|
||||||
|
|
||||||
|
|
||||||
class StorageObject(object):
|
class StorageObject(object):
|
||||||
@ -74,7 +74,7 @@ class StorageObject(object):
|
|||||||
self.ssh_retry_patterns = [
|
self.ssh_retry_patterns = [
|
||||||
(
|
(
|
||||||
constants.SSH_DEFAULT_RETRY_PATTERN,
|
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):
|
def _send_request(self, req):
|
||||||
req_xml = constants.XML_HEADER + ET.tostring(req).decode('utf-8')
|
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
|
if (response['maxSeverity'] != constants.STATUS_OK and
|
||||||
self._response_validation(response,
|
self._response_validation(response,
|
||||||
constants.MSG_CODE_RETRY)):
|
constants.MSG_CODE_RETRY)):
|
||||||
raise exception.EMCVmaxLockRequiredException
|
raise exception.EMCPowerMaxLockRequiredException
|
||||||
|
|
||||||
return response
|
return response
|
||||||
|
|
||||||
@utils.retry(exception.EMCVmaxLockRequiredException)
|
@utils.retry(exception.EMCPowerMaxLockRequiredException)
|
||||||
def _execute_cmd(self, cmd, retry_patterns=None, check_exit_code=False):
|
def _execute_cmd(self, cmd, retry_patterns=None, check_exit_code=False):
|
||||||
"""Execute NAS command via SSH.
|
"""Execute NAS command via SSH.
|
||||||
|
|
||||||
@ -211,14 +211,14 @@ class StorageObject(object):
|
|||||||
return self.manager.getStorageContext(type)
|
return self.manager.getStorageContext(type)
|
||||||
|
|
||||||
|
|
||||||
@vmax_utils.decorate_all_methods(vmax_utils.log_enter_exit,
|
@powermax_utils.decorate_all_methods(powermax_utils.log_enter_exit,
|
||||||
debug_only=True)
|
debug_only=True)
|
||||||
class FileSystem(StorageObject):
|
class FileSystem(StorageObject):
|
||||||
def __init__(self, conn, elt_maker, xml_parser, manager):
|
def __init__(self, conn, elt_maker, xml_parser, manager):
|
||||||
super(FileSystem, self).__init__(conn, elt_maker, xml_parser, manager)
|
super(FileSystem, self).__init__(conn, elt_maker, xml_parser, manager)
|
||||||
self.filesystem_map = {}
|
self.filesystem_map = {}
|
||||||
|
|
||||||
@utils.retry(exception.EMCVmaxInvalidMoverID)
|
@utils.retry(exception.EMCPowerMaxInvalidMoverID)
|
||||||
def create(self, name, size, pool_name, mover_name, is_vdm=True):
|
def create(self, name, size, pool_name, mover_name, is_vdm=True):
|
||||||
pool_id = self.get_context('StoragePool').get_id(pool_name)
|
pool_id = self.get_context('StoragePool').get_id(pool_name)
|
||||||
|
|
||||||
@ -249,7 +249,7 @@ class FileSystem(StorageObject):
|
|||||||
constants.MSG_INVALID_MOVER_ID) and
|
constants.MSG_INVALID_MOVER_ID) and
|
||||||
not self.xml_retry):
|
not self.xml_retry):
|
||||||
self.xml_retry = True
|
self.xml_retry = True
|
||||||
raise exception.EMCVmaxInvalidMoverID(id=mover_id)
|
raise exception.EMCPowerMaxInvalidMoverID(id=mover_id)
|
||||||
elif self._response_validation(
|
elif self._response_validation(
|
||||||
response, constants.MSG_FILESYSTEM_EXIST):
|
response, constants.MSG_FILESYSTEM_EXIST):
|
||||||
LOG.warning("File system %s already exists. "
|
LOG.warning("File system %s already exists. "
|
||||||
@ -260,7 +260,7 @@ class FileSystem(StorageObject):
|
|||||||
"Reason: %(err)s.") %
|
"Reason: %(err)s.") %
|
||||||
{'name': name, 'err': response['problems']})
|
{'name': name, 'err': response['problems']})
|
||||||
LOG.error(message)
|
LOG.error(message)
|
||||||
raise exception.EMCVmaxXMLAPIError(err=message)
|
raise exception.EMCPowerMaxXMLAPIError(err=message)
|
||||||
|
|
||||||
def get(self, name):
|
def get(self, name):
|
||||||
if name not in self.filesystem_map:
|
if name not in self.filesystem_map:
|
||||||
@ -314,7 +314,7 @@ class FileSystem(StorageObject):
|
|||||||
"Reason: %(err)s.") %
|
"Reason: %(err)s.") %
|
||||||
{'name': name, 'err': out})
|
{'name': name, 'err': out})
|
||||||
LOG.error(message)
|
LOG.error(message)
|
||||||
raise exception.EMCVmaxXMLAPIError(err=message)
|
raise exception.EMCPowerMaxXMLAPIError(err=message)
|
||||||
|
|
||||||
enas_id = self.filesystem_map[name]['id']
|
enas_id = self.filesystem_map[name]['id']
|
||||||
|
|
||||||
@ -329,7 +329,7 @@ class FileSystem(StorageObject):
|
|||||||
"Reason: %(err)s.") %
|
"Reason: %(err)s.") %
|
||||||
{'name': name, 'err': response['problems']})
|
{'name': name, 'err': response['problems']})
|
||||||
LOG.error(message)
|
LOG.error(message)
|
||||||
raise exception.EMCVmaxXMLAPIError(err=message)
|
raise exception.EMCPowerMaxXMLAPIError(err=message)
|
||||||
|
|
||||||
self.filesystem_map.pop(name)
|
self.filesystem_map.pop(name)
|
||||||
|
|
||||||
@ -340,7 +340,7 @@ class FileSystem(StorageObject):
|
|||||||
"Reason: %(err)s.") %
|
"Reason: %(err)s.") %
|
||||||
{'name': name, 'err': out})
|
{'name': name, 'err': out})
|
||||||
LOG.error(message)
|
LOG.error(message)
|
||||||
raise exception.EMCVmaxXMLAPIError(err=message)
|
raise exception.EMCPowerMaxXMLAPIError(err=message)
|
||||||
|
|
||||||
enas_id = out['id']
|
enas_id = out['id']
|
||||||
size = int(out['size'])
|
size = int(out['size'])
|
||||||
@ -350,7 +350,7 @@ class FileSystem(StorageObject):
|
|||||||
"%(size)d.") %
|
"%(size)d.") %
|
||||||
{'name': name, 'new_size': new_size, 'size': size})
|
{'name': name, 'new_size': new_size, 'size': size})
|
||||||
LOG.error(message)
|
LOG.error(message)
|
||||||
raise exception.EMCVmaxXMLAPIError(err=message)
|
raise exception.EMCPowerMaxXMLAPIError(err=message)
|
||||||
elif new_size == size:
|
elif new_size == size:
|
||||||
return
|
return
|
||||||
|
|
||||||
@ -375,7 +375,7 @@ class FileSystem(StorageObject):
|
|||||||
'new_size': new_size,
|
'new_size': new_size,
|
||||||
'err': response['problems']})
|
'err': response['problems']})
|
||||||
LOG.error(message)
|
LOG.error(message)
|
||||||
raise exception.EMCVmaxXMLAPIError(err=message)
|
raise exception.EMCPowerMaxXMLAPIError(err=message)
|
||||||
|
|
||||||
def get_id(self, name):
|
def get_id(self, name):
|
||||||
status, out = self.get(name)
|
status, out = self.get(name)
|
||||||
@ -384,7 +384,7 @@ class FileSystem(StorageObject):
|
|||||||
"Reason: %(err)s.") %
|
"Reason: %(err)s.") %
|
||||||
{'name': name, 'err': out})
|
{'name': name, 'err': out})
|
||||||
LOG.error(message)
|
LOG.error(message)
|
||||||
raise exception.EMCVmaxXMLAPIError(err=message)
|
raise exception.EMCPowerMaxXMLAPIError(err=message)
|
||||||
|
|
||||||
return self.filesystem_map[name]['id']
|
return self.filesystem_map[name]['id']
|
||||||
|
|
||||||
@ -480,8 +480,8 @@ class FileSystem(StorageObject):
|
|||||||
self._execute_cmd(rw_mount_cmd)
|
self._execute_cmd(rw_mount_cmd)
|
||||||
|
|
||||||
|
|
||||||
@vmax_utils.decorate_all_methods(vmax_utils.log_enter_exit,
|
@powermax_utils.decorate_all_methods(powermax_utils.log_enter_exit,
|
||||||
debug_only=True)
|
debug_only=True)
|
||||||
class StoragePool(StorageObject):
|
class StoragePool(StorageObject):
|
||||||
def __init__(self, conn, elt_maker, xml_parser, manager):
|
def __init__(self, conn, elt_maker, xml_parser, manager):
|
||||||
super(StoragePool, self).__init__(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.") %
|
"Reason: %(err)s.") %
|
||||||
{'name': name, 'err': out})
|
{'name': name, 'err': out})
|
||||||
LOG.error(message)
|
LOG.error(message)
|
||||||
raise exception.EMCVmaxXMLAPIError(err=message)
|
raise exception.EMCPowerMaxXMLAPIError(err=message)
|
||||||
|
|
||||||
return out['id']
|
return out['id']
|
||||||
|
|
||||||
|
|
||||||
@vmax_utils.decorate_all_methods(vmax_utils.log_enter_exit,
|
@powermax_utils.decorate_all_methods(powermax_utils.log_enter_exit,
|
||||||
debug_only=True)
|
debug_only=True)
|
||||||
class MountPoint(StorageObject):
|
class MountPoint(StorageObject):
|
||||||
def __init__(self, conn, elt_maker, xml_parser, manager):
|
def __init__(self, conn, elt_maker, xml_parser, manager):
|
||||||
super(MountPoint, self).__init__(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):
|
def create(self, mount_path, fs_name, mover_name, is_vdm=True):
|
||||||
fs_id = self.get_context('FileSystem').get_id(fs_name)
|
fs_id = self.get_context('FileSystem').get_id(fs_name)
|
||||||
|
|
||||||
@ -574,7 +574,7 @@ class MountPoint(StorageObject):
|
|||||||
constants.MSG_INVALID_MOVER_ID) and
|
constants.MSG_INVALID_MOVER_ID) and
|
||||||
not self.xml_retry):
|
not self.xml_retry):
|
||||||
self.xml_retry = True
|
self.xml_retry = True
|
||||||
raise exception.EMCVmaxInvalidMoverID(id=mover_id)
|
raise exception.EMCPowerMaxInvalidMoverID(id=mover_id)
|
||||||
elif self._is_mount_point_already_existent(response):
|
elif self._is_mount_point_already_existent(response):
|
||||||
LOG.warning("Mount Point %(mount)s already exists. "
|
LOG.warning("Mount Point %(mount)s already exists. "
|
||||||
"Skip the creation.", {'mount': mount_path})
|
"Skip the creation.", {'mount': mount_path})
|
||||||
@ -586,9 +586,9 @@ class MountPoint(StorageObject):
|
|||||||
'fs_name': fs_name,
|
'fs_name': fs_name,
|
||||||
'err': response['problems']})
|
'err': response['problems']})
|
||||||
LOG.error(message)
|
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):
|
def get(self, mover_name, is_vdm=True):
|
||||||
mover_id = self._get_mover_id(mover_name, is_vdm)
|
mover_id = self._get_mover_id(mover_name, is_vdm)
|
||||||
|
|
||||||
@ -610,7 +610,7 @@ class MountPoint(StorageObject):
|
|||||||
constants.MSG_INVALID_MOVER_ID) and
|
constants.MSG_INVALID_MOVER_ID) and
|
||||||
not self.xml_retry):
|
not self.xml_retry):
|
||||||
self.xml_retry = True
|
self.xml_retry = True
|
||||||
raise exception.EMCVmaxInvalidMoverID(id=mover_id)
|
raise exception.EMCPowerMaxInvalidMoverID(id=mover_id)
|
||||||
elif constants.STATUS_OK != response['maxSeverity']:
|
elif constants.STATUS_OK != response['maxSeverity']:
|
||||||
return response['maxSeverity'], response['objects']
|
return response['maxSeverity'], response['objects']
|
||||||
|
|
||||||
@ -619,7 +619,7 @@ class MountPoint(StorageObject):
|
|||||||
else:
|
else:
|
||||||
return constants.STATUS_OK, response['objects']
|
return constants.STATUS_OK, response['objects']
|
||||||
|
|
||||||
@utils.retry(exception.EMCVmaxInvalidMoverID)
|
@utils.retry(exception.EMCPowerMaxInvalidMoverID)
|
||||||
def delete(self, mount_path, mover_name, is_vdm=True):
|
def delete(self, mount_path, mover_name, is_vdm=True):
|
||||||
mover_id = self._get_mover_id(mover_name, is_vdm)
|
mover_id = self._get_mover_id(mover_name, is_vdm)
|
||||||
|
|
||||||
@ -640,7 +640,7 @@ class MountPoint(StorageObject):
|
|||||||
constants.MSG_INVALID_MOVER_ID) and
|
constants.MSG_INVALID_MOVER_ID) and
|
||||||
not self.xml_retry):
|
not self.xml_retry):
|
||||||
self.xml_retry = True
|
self.xml_retry = True
|
||||||
raise exception.EMCVmaxInvalidMoverID(id=mover_id)
|
raise exception.EMCPowerMaxInvalidMoverID(id=mover_id)
|
||||||
elif self._is_mount_point_nonexistent(response):
|
elif self._is_mount_point_nonexistent(response):
|
||||||
LOG.warning('Mount point %(mount)s on mover %(mover_name)s '
|
LOG.warning('Mount point %(mount)s on mover %(mover_name)s '
|
||||||
'not found.',
|
'not found.',
|
||||||
@ -654,7 +654,7 @@ class MountPoint(StorageObject):
|
|||||||
'mover_name': mover_name,
|
'mover_name': mover_name,
|
||||||
'err': response})
|
'err': response})
|
||||||
LOG.error(message)
|
LOG.error(message)
|
||||||
raise exception.EMCVmaxXMLAPIError(err=message)
|
raise exception.EMCPowerMaxXMLAPIError(err=message)
|
||||||
|
|
||||||
def _is_mount_point_nonexistent(self, response):
|
def _is_mount_point_nonexistent(self, response):
|
||||||
"""Translate different status to ok/error status."""
|
"""Translate different status to ok/error status."""
|
||||||
@ -683,8 +683,8 @@ class MountPoint(StorageObject):
|
|||||||
return False
|
return False
|
||||||
|
|
||||||
|
|
||||||
@vmax_utils.decorate_all_methods(vmax_utils.log_enter_exit,
|
@powermax_utils.decorate_all_methods(powermax_utils.log_enter_exit,
|
||||||
debug_only=True)
|
debug_only=True)
|
||||||
class Mover(StorageObject):
|
class Mover(StorageObject):
|
||||||
def __init__(self, conn, elt_maker, xml_parser, manager):
|
def __init__(self, conn, elt_maker, xml_parser, manager):
|
||||||
super(Mover, self).__init__(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.") %
|
message = (_("Failed to get mover by name %(name)s.") %
|
||||||
{'name': name})
|
{'name': name})
|
||||||
LOG.error(message)
|
LOG.error(message)
|
||||||
raise exception.EMCVmaxXMLAPIError(err=message)
|
raise exception.EMCPowerMaxXMLAPIError(err=message)
|
||||||
|
|
||||||
return mover_ref['id']
|
return mover_ref['id']
|
||||||
|
|
||||||
@ -848,14 +848,14 @@ class Mover(StorageObject):
|
|||||||
return physical_network_devices
|
return physical_network_devices
|
||||||
|
|
||||||
|
|
||||||
@vmax_utils.decorate_all_methods(vmax_utils.log_enter_exit,
|
@powermax_utils.decorate_all_methods(powermax_utils.log_enter_exit,
|
||||||
debug_only=True)
|
debug_only=True)
|
||||||
class VDM(StorageObject):
|
class VDM(StorageObject):
|
||||||
def __init__(self, conn, elt_maker, xml_parser, manager):
|
def __init__(self, conn, elt_maker, xml_parser, manager):
|
||||||
super(VDM, self).__init__(conn, elt_maker, xml_parser, manager)
|
super(VDM, self).__init__(conn, elt_maker, xml_parser, manager)
|
||||||
self.vdm_map = {}
|
self.vdm_map = {}
|
||||||
|
|
||||||
@utils.retry(exception.EMCVmaxInvalidMoverID)
|
@utils.retry(exception.EMCPowerMaxInvalidMoverID)
|
||||||
def create(self, name, mover_name):
|
def create(self, name, mover_name):
|
||||||
mover_id = self._get_mover_id(mover_name, False)
|
mover_id = self._get_mover_id(mover_name, False)
|
||||||
|
|
||||||
@ -872,7 +872,7 @@ class VDM(StorageObject):
|
|||||||
constants.MSG_INVALID_MOVER_ID) and
|
constants.MSG_INVALID_MOVER_ID) and
|
||||||
not self.xml_retry):
|
not self.xml_retry):
|
||||||
self.xml_retry = True
|
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):
|
elif self._response_validation(response, constants.MSG_VDM_EXIST):
|
||||||
LOG.warning("VDM %(name)s already exists. Skip the creation.",
|
LOG.warning("VDM %(name)s already exists. Skip the creation.",
|
||||||
{'name': name})
|
{'name': name})
|
||||||
@ -883,7 +883,7 @@ class VDM(StorageObject):
|
|||||||
'mover_name': mover_name,
|
'mover_name': mover_name,
|
||||||
'err': response['problems']})
|
'err': response['problems']})
|
||||||
LOG.error(message)
|
LOG.error(message)
|
||||||
raise exception.EMCVmaxXMLAPIError(err=message)
|
raise exception.EMCPowerMaxXMLAPIError(err=message)
|
||||||
|
|
||||||
def get(self, name):
|
def get(self, name):
|
||||||
if name not in self.vdm_map:
|
if name not in self.vdm_map:
|
||||||
@ -926,7 +926,7 @@ class VDM(StorageObject):
|
|||||||
"Reason: %(err)s.") %
|
"Reason: %(err)s.") %
|
||||||
{'name': name, 'err': out})
|
{'name': name, 'err': out})
|
||||||
LOG.error(message)
|
LOG.error(message)
|
||||||
raise exception.EMCVmaxXMLAPIError(err=message)
|
raise exception.EMCPowerMaxXMLAPIError(err=message)
|
||||||
|
|
||||||
vdm_id = self.vdm_map[name]['id']
|
vdm_id = self.vdm_map[name]['id']
|
||||||
|
|
||||||
@ -941,7 +941,7 @@ class VDM(StorageObject):
|
|||||||
"Reason: %(err)s.") %
|
"Reason: %(err)s.") %
|
||||||
{'name': name, 'err': response['problems']})
|
{'name': name, 'err': response['problems']})
|
||||||
LOG.error(message)
|
LOG.error(message)
|
||||||
raise exception.EMCVmaxXMLAPIError(err=message)
|
raise exception.EMCPowerMaxXMLAPIError(err=message)
|
||||||
|
|
||||||
self.vdm_map.pop(name)
|
self.vdm_map.pop(name)
|
||||||
|
|
||||||
@ -951,7 +951,7 @@ class VDM(StorageObject):
|
|||||||
message = (_("Failed to get VDM by name %(name)s.") %
|
message = (_("Failed to get VDM by name %(name)s.") %
|
||||||
{'name': name})
|
{'name': name})
|
||||||
LOG.error(message)
|
LOG.error(message)
|
||||||
raise exception.EMCVmaxXMLAPIError(err=message)
|
raise exception.EMCPowerMaxXMLAPIError(err=message)
|
||||||
|
|
||||||
return vdm['id']
|
return vdm['id']
|
||||||
|
|
||||||
@ -987,7 +987,7 @@ class VDM(StorageObject):
|
|||||||
"from mover %(mover_name)s.") %
|
"from mover %(mover_name)s.") %
|
||||||
{'interface': if_name, 'mover_name': vdm_name})
|
{'interface': if_name, 'mover_name': vdm_name})
|
||||||
LOG.exception(message)
|
LOG.exception(message)
|
||||||
raise exception.EMCVmaxXMLAPIError(err=message)
|
raise exception.EMCPowerMaxXMLAPIError(err=message)
|
||||||
|
|
||||||
def get_interfaces(self, vdm_name):
|
def get_interfaces(self, vdm_name):
|
||||||
interfaces = {
|
interfaces = {
|
||||||
@ -1023,8 +1023,8 @@ class VDM(StorageObject):
|
|||||||
return interfaces
|
return interfaces
|
||||||
|
|
||||||
|
|
||||||
@vmax_utils.decorate_all_methods(vmax_utils.log_enter_exit,
|
@powermax_utils.decorate_all_methods(powermax_utils.log_enter_exit,
|
||||||
debug_only=True)
|
debug_only=True)
|
||||||
class Snapshot(StorageObject):
|
class Snapshot(StorageObject):
|
||||||
def __init__(self, conn, elt_maker, xml_parser, manager):
|
def __init__(self, conn, elt_maker, xml_parser, manager):
|
||||||
super(Snapshot, self).__init__(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,
|
'fs_name': fs_name,
|
||||||
'err': response['problems']})
|
'err': response['problems']})
|
||||||
LOG.error(message)
|
LOG.error(message)
|
||||||
raise exception.EMCVmaxXMLAPIError(err=message)
|
raise exception.EMCPowerMaxXMLAPIError(err=message)
|
||||||
|
|
||||||
def get(self, name):
|
def get(self, name):
|
||||||
if name not in self.snap_map:
|
if name not in self.snap_map:
|
||||||
@ -1107,7 +1107,7 @@ class Snapshot(StorageObject):
|
|||||||
"Reason: %(err)s.") %
|
"Reason: %(err)s.") %
|
||||||
{'name': name, 'err': out})
|
{'name': name, 'err': out})
|
||||||
LOG.error(message)
|
LOG.error(message)
|
||||||
raise exception.EMCVmaxXMLAPIError(err=message)
|
raise exception.EMCPowerMaxXMLAPIError(err=message)
|
||||||
|
|
||||||
chpt_id = self.snap_map[name]['id']
|
chpt_id = self.snap_map[name]['id']
|
||||||
|
|
||||||
@ -1121,7 +1121,7 @@ class Snapshot(StorageObject):
|
|||||||
"Reason: %(err)s.") %
|
"Reason: %(err)s.") %
|
||||||
{'name': name, 'err': response['problems']})
|
{'name': name, 'err': response['problems']})
|
||||||
LOG.error(message)
|
LOG.error(message)
|
||||||
raise exception.EMCVmaxXMLAPIError(err=message)
|
raise exception.EMCPowerMaxXMLAPIError(err=message)
|
||||||
|
|
||||||
self.snap_map.pop(name)
|
self.snap_map.pop(name)
|
||||||
|
|
||||||
@ -1133,19 +1133,19 @@ class Snapshot(StorageObject):
|
|||||||
"Reason: %(err)s.") %
|
"Reason: %(err)s.") %
|
||||||
{'name': name, 'err': out})
|
{'name': name, 'err': out})
|
||||||
LOG.error(message)
|
LOG.error(message)
|
||||||
raise exception.EMCVmaxXMLAPIError(err=message)
|
raise exception.EMCPowerMaxXMLAPIError(err=message)
|
||||||
|
|
||||||
return self.snap_map[name]['id']
|
return self.snap_map[name]['id']
|
||||||
|
|
||||||
|
|
||||||
@vmax_utils.decorate_all_methods(vmax_utils.log_enter_exit,
|
@powermax_utils.decorate_all_methods(powermax_utils.log_enter_exit,
|
||||||
debug_only=True)
|
debug_only=True)
|
||||||
class MoverInterface(StorageObject):
|
class MoverInterface(StorageObject):
|
||||||
def __init__(self, conn, elt_maker, xml_parser, manager):
|
def __init__(self, conn, elt_maker, xml_parser, manager):
|
||||||
super(MoverInterface, self).__init__(conn, elt_maker, xml_parser,
|
super(MoverInterface, self).__init__(conn, elt_maker, xml_parser,
|
||||||
manager)
|
manager)
|
||||||
|
|
||||||
@utils.retry(exception.EMCVmaxInvalidMoverID)
|
@utils.retry(exception.EMCPowerMaxInvalidMoverID)
|
||||||
def create(self, interface):
|
def create(self, interface):
|
||||||
# Maximum of 32 characters for mover interface name
|
# Maximum of 32 characters for mover interface name
|
||||||
name = interface['name']
|
name = interface['name']
|
||||||
@ -1182,7 +1182,7 @@ class MoverInterface(StorageObject):
|
|||||||
constants.MSG_INVALID_MOVER_ID) and
|
constants.MSG_INVALID_MOVER_ID) and
|
||||||
not self.xml_retry):
|
not self.xml_retry):
|
||||||
self.xml_retry = True
|
self.xml_retry = True
|
||||||
raise exception.EMCVmaxInvalidMoverID(id=mover_id)
|
raise exception.EMCPowerMaxInvalidMoverID(id=mover_id)
|
||||||
elif self._response_validation(
|
elif self._response_validation(
|
||||||
response, constants.MSG_INTERFACE_NAME_EXIST):
|
response, constants.MSG_INTERFACE_NAME_EXIST):
|
||||||
LOG.warning("Mover interface name %s already exists. "
|
LOG.warning("Mover interface name %s already exists. "
|
||||||
@ -1194,23 +1194,23 @@ class MoverInterface(StorageObject):
|
|||||||
elif self._response_validation(
|
elif self._response_validation(
|
||||||
response, constants.MSG_INTERFACE_INVALID_VLAN_ID):
|
response, constants.MSG_INTERFACE_INVALID_VLAN_ID):
|
||||||
# When fail to create a mover interface with the specified
|
# 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.
|
# backend. So we should explicitly remove the interface.
|
||||||
try:
|
try:
|
||||||
self.delete(six.text_type(ip_addr), mover_name)
|
self.delete(six.text_type(ip_addr), mover_name)
|
||||||
except exception.EMCVmaxXMLAPIError:
|
except exception.EMCPowerMaxXMLAPIError:
|
||||||
pass
|
pass
|
||||||
message = (_("Invalid vlan id %s. Other interfaces on this "
|
message = (_("Invalid vlan id %s. Other interfaces on this "
|
||||||
"subnet are in a different vlan.") % vlan_id)
|
"subnet are in a different vlan.") % vlan_id)
|
||||||
LOG.error(message)
|
LOG.error(message)
|
||||||
raise exception.EMCVmaxXMLAPIError(err=message)
|
raise exception.EMCPowerMaxXMLAPIError(err=message)
|
||||||
elif constants.STATUS_OK != response['maxSeverity']:
|
elif constants.STATUS_OK != response['maxSeverity']:
|
||||||
message = (_("Failed to create mover interface %(interface)s. "
|
message = (_("Failed to create mover interface %(interface)s. "
|
||||||
"Reason: %(err)s.") %
|
"Reason: %(err)s.") %
|
||||||
{'interface': interface,
|
{'interface': interface,
|
||||||
'err': response['problems']})
|
'err': response['problems']})
|
||||||
LOG.error(message)
|
LOG.error(message)
|
||||||
raise exception.EMCVmaxXMLAPIError(err=message)
|
raise exception.EMCPowerMaxXMLAPIError(err=message)
|
||||||
|
|
||||||
def get(self, name, mover_name):
|
def get(self, name, mover_name):
|
||||||
# Maximum of 32 characters for mover interface name
|
# Maximum of 32 characters for mover interface name
|
||||||
@ -1226,7 +1226,7 @@ class MoverInterface(StorageObject):
|
|||||||
|
|
||||||
return constants.STATUS_NOT_FOUND, None
|
return constants.STATUS_NOT_FOUND, None
|
||||||
|
|
||||||
@utils.retry(exception.EMCVmaxInvalidMoverID)
|
@utils.retry(exception.EMCPowerMaxInvalidMoverID)
|
||||||
def delete(self, ip_addr, mover_name):
|
def delete(self, ip_addr, mover_name):
|
||||||
mover_id = self._get_mover_id(mover_name, False)
|
mover_id = self._get_mover_id(mover_name, False)
|
||||||
|
|
||||||
@ -1246,7 +1246,7 @@ class MoverInterface(StorageObject):
|
|||||||
constants.MSG_INVALID_MOVER_ID) and
|
constants.MSG_INVALID_MOVER_ID) and
|
||||||
not self.xml_retry):
|
not self.xml_retry):
|
||||||
self.xml_retry = True
|
self.xml_retry = True
|
||||||
raise exception.EMCVmaxInvalidMoverID(id=mover_id)
|
raise exception.EMCPowerMaxInvalidMoverID(id=mover_id)
|
||||||
elif self._response_validation(
|
elif self._response_validation(
|
||||||
response, constants.MSG_INTERFACE_NON_EXISTENT):
|
response, constants.MSG_INTERFACE_NON_EXISTENT):
|
||||||
LOG.warning("Mover interface %s not found. "
|
LOG.warning("Mover interface %s not found. "
|
||||||
@ -1259,16 +1259,16 @@ class MoverInterface(StorageObject):
|
|||||||
'mover': mover_name,
|
'mover': mover_name,
|
||||||
'err': response['problems']})
|
'err': response['problems']})
|
||||||
LOG.error(message)
|
LOG.error(message)
|
||||||
raise exception.EMCVmaxXMLAPIError(err=message)
|
raise exception.EMCPowerMaxXMLAPIError(err=message)
|
||||||
|
|
||||||
|
|
||||||
@vmax_utils.decorate_all_methods(vmax_utils.log_enter_exit,
|
@powermax_utils.decorate_all_methods(powermax_utils.log_enter_exit,
|
||||||
debug_only=True)
|
debug_only=True)
|
||||||
class DNSDomain(StorageObject):
|
class DNSDomain(StorageObject):
|
||||||
def __init__(self, conn, elt_maker, xml_parser, manager):
|
def __init__(self, conn, elt_maker, xml_parser, manager):
|
||||||
super(DNSDomain, self).__init__(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'):
|
def create(self, mover_name, name, servers, protocol='udp'):
|
||||||
mover_id = self._get_mover_id(mover_name, False)
|
mover_id = self._get_mover_id(mover_name, False)
|
||||||
|
|
||||||
@ -1290,15 +1290,15 @@ class DNSDomain(StorageObject):
|
|||||||
constants.MSG_INVALID_MOVER_ID) and
|
constants.MSG_INVALID_MOVER_ID) and
|
||||||
not self.xml_retry):
|
not self.xml_retry):
|
||||||
self.xml_retry = True
|
self.xml_retry = True
|
||||||
raise exception.EMCVmaxInvalidMoverID(id=mover_id)
|
raise exception.EMCPowerMaxInvalidMoverID(id=mover_id)
|
||||||
elif constants.STATUS_OK != response['maxSeverity']:
|
elif constants.STATUS_OK != response['maxSeverity']:
|
||||||
message = (_("Failed to create DNS domain %(name)s. "
|
message = (_("Failed to create DNS domain %(name)s. "
|
||||||
"Reason: %(err)s.") %
|
"Reason: %(err)s.") %
|
||||||
{'name': name, 'err': response['problems']})
|
{'name': name, 'err': response['problems']})
|
||||||
LOG.error(message)
|
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):
|
def delete(self, mover_name, name):
|
||||||
mover_id = self._get_mover_id(mover_name, False)
|
mover_id = self._get_mover_id(mover_name, False)
|
||||||
|
|
||||||
@ -1317,21 +1317,21 @@ class DNSDomain(StorageObject):
|
|||||||
constants.MSG_INVALID_MOVER_ID) and
|
constants.MSG_INVALID_MOVER_ID) and
|
||||||
not self.xml_retry):
|
not self.xml_retry):
|
||||||
self.xml_retry = True
|
self.xml_retry = True
|
||||||
raise exception.EMCVmaxInvalidMoverID(id=mover_id)
|
raise exception.EMCPowerMaxInvalidMoverID(id=mover_id)
|
||||||
elif constants.STATUS_OK != response['maxSeverity']:
|
elif constants.STATUS_OK != response['maxSeverity']:
|
||||||
LOG.warning("Failed to delete DNS domain %(name)s. "
|
LOG.warning("Failed to delete DNS domain %(name)s. "
|
||||||
"Reason: %(err)s.",
|
"Reason: %(err)s.",
|
||||||
{'name': name, 'err': response['problems']})
|
{'name': name, 'err': response['problems']})
|
||||||
|
|
||||||
|
|
||||||
@vmax_utils.decorate_all_methods(vmax_utils.log_enter_exit,
|
@powermax_utils.decorate_all_methods(powermax_utils.log_enter_exit,
|
||||||
debug_only=True)
|
debug_only=True)
|
||||||
class CIFSServer(StorageObject):
|
class CIFSServer(StorageObject):
|
||||||
def __init__(self, conn, elt_maker, xml_parser, manager):
|
def __init__(self, conn, elt_maker, xml_parser, manager):
|
||||||
super(CIFSServer, self).__init__(conn, elt_maker, xml_parser, manager)
|
super(CIFSServer, self).__init__(conn, elt_maker, xml_parser, manager)
|
||||||
self.cifs_server_map = {}
|
self.cifs_server_map = {}
|
||||||
|
|
||||||
@utils.retry(exception.EMCVmaxInvalidMoverID)
|
@utils.retry(exception.EMCPowerMaxInvalidMoverID)
|
||||||
def create(self, server_args):
|
def create(self, server_args):
|
||||||
compName = server_args['name']
|
compName = server_args['name']
|
||||||
# Maximum of 14 characters for netBIOS name
|
# Maximum of 14 characters for netBIOS name
|
||||||
@ -1374,7 +1374,7 @@ class CIFSServer(StorageObject):
|
|||||||
constants.MSG_INVALID_MOVER_ID) and
|
constants.MSG_INVALID_MOVER_ID) and
|
||||||
not self.xml_retry):
|
not self.xml_retry):
|
||||||
self.xml_retry = True
|
self.xml_retry = True
|
||||||
raise exception.EMCVmaxInvalidMoverID(id=mover_id)
|
raise exception.EMCPowerMaxInvalidMoverID(id=mover_id)
|
||||||
if constants.STATUS_OK != response['maxSeverity']:
|
if constants.STATUS_OK != response['maxSeverity']:
|
||||||
status, out = self.get(compName, mover_name, is_vdm)
|
status, out = self.get(compName, mover_name, is_vdm)
|
||||||
if constants.STATUS_OK == status and out['domainJoined'] == 'true':
|
if constants.STATUS_OK == status and out['domainJoined'] == 'true':
|
||||||
@ -1385,9 +1385,9 @@ class CIFSServer(StorageObject):
|
|||||||
{'name': name,
|
{'name': name,
|
||||||
'err': response['problems']})
|
'err': response['problems']})
|
||||||
LOG.error(message)
|
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):
|
def get_all(self, mover_name, is_vdm=True):
|
||||||
mover_id = self._get_mover_id(mover_name, is_vdm)
|
mover_id = self._get_mover_id(mover_name, is_vdm)
|
||||||
|
|
||||||
@ -1408,7 +1408,7 @@ class CIFSServer(StorageObject):
|
|||||||
constants.MSG_INVALID_MOVER_ID) and
|
constants.MSG_INVALID_MOVER_ID) and
|
||||||
not self.xml_retry):
|
not self.xml_retry):
|
||||||
self.xml_retry = True
|
self.xml_retry = True
|
||||||
raise exception.EMCVmaxInvalidMoverID(id=mover_id)
|
raise exception.EMCPowerMaxInvalidMoverID(id=mover_id)
|
||||||
elif constants.STATUS_OK != response['maxSeverity']:
|
elif constants.STATUS_OK != response['maxSeverity']:
|
||||||
return response['maxSeverity'], response['objects']
|
return response['maxSeverity'], response['objects']
|
||||||
|
|
||||||
@ -1439,7 +1439,7 @@ class CIFSServer(StorageObject):
|
|||||||
|
|
||||||
return constants.STATUS_NOT_FOUND, None
|
return constants.STATUS_NOT_FOUND, None
|
||||||
|
|
||||||
@utils.retry(exception.EMCVmaxInvalidMoverID)
|
@utils.retry(exception.EMCPowerMaxInvalidMoverID)
|
||||||
def modify(self, server_args):
|
def modify(self, server_args):
|
||||||
"""Make CIFS server join or un-join the domain.
|
"""Make CIFS server join or un-join the domain.
|
||||||
|
|
||||||
@ -1450,7 +1450,7 @@ class CIFSServer(StorageObject):
|
|||||||
password: Password associated with the user name
|
password: Password associated with the user name
|
||||||
mover_name: mover or VDM name
|
mover_name: mover or VDM name
|
||||||
is_vdm: Boolean to indicate mover or VDM
|
is_vdm: Boolean to indicate mover or VDM
|
||||||
:raises exception.EMCVmaxXMLAPIError: if modification fails.
|
:raises exception.EMCPowerMaxXMLAPIError: if modification fails.
|
||||||
"""
|
"""
|
||||||
name = server_args['name']
|
name = server_args['name']
|
||||||
join_domain = server_args['join_domain']
|
join_domain = server_args['join_domain']
|
||||||
@ -1487,7 +1487,7 @@ class CIFSServer(StorageObject):
|
|||||||
constants.MSG_INVALID_MOVER_ID) and
|
constants.MSG_INVALID_MOVER_ID) and
|
||||||
not self.xml_retry):
|
not self.xml_retry):
|
||||||
self.xml_retry = True
|
self.xml_retry = True
|
||||||
raise exception.EMCVmaxInvalidMoverID(id=mover_id)
|
raise exception.EMCPowerMaxInvalidMoverID(id=mover_id)
|
||||||
elif self._ignore_modification_error(response, join_domain):
|
elif self._ignore_modification_error(response, join_domain):
|
||||||
return
|
return
|
||||||
elif constants.STATUS_OK != response['maxSeverity']:
|
elif constants.STATUS_OK != response['maxSeverity']:
|
||||||
@ -1496,7 +1496,7 @@ class CIFSServer(StorageObject):
|
|||||||
{'name': name,
|
{'name': name,
|
||||||
'err': response['problems']})
|
'err': response['problems']})
|
||||||
LOG.error(message)
|
LOG.error(message)
|
||||||
raise exception.EMCVmaxXMLAPIError(err=message)
|
raise exception.EMCPowerMaxXMLAPIError(err=message)
|
||||||
|
|
||||||
def _ignore_modification_error(self, response, join_domain):
|
def _ignore_modification_error(self, response, join_domain):
|
||||||
if self._response_validation(response, constants.MSG_JOIN_DOMAIN):
|
if self._response_validation(response, constants.MSG_JOIN_DOMAIN):
|
||||||
@ -1515,7 +1515,7 @@ class CIFSServer(StorageObject):
|
|||||||
"not found. Skip the deletion.",
|
"not found. Skip the deletion.",
|
||||||
{'name': computer_name, 'mover_name': mover_name})
|
{'name': computer_name, 'mover_name': mover_name})
|
||||||
return
|
return
|
||||||
except exception.EMCVmaxXMLAPIError:
|
except exception.EMCPowerMaxXMLAPIError:
|
||||||
LOG.warning("CIFS server %(name)s on mover %(mover_name)s "
|
LOG.warning("CIFS server %(name)s on mover %(mover_name)s "
|
||||||
"not found. Skip the deletion.",
|
"not found. Skip the deletion.",
|
||||||
{'name': computer_name, 'mover_name': mover_name})
|
{'name': computer_name, 'mover_name': mover_name})
|
||||||
@ -1540,19 +1540,19 @@ class CIFSServer(StorageObject):
|
|||||||
"Reason: %(err)s.") %
|
"Reason: %(err)s.") %
|
||||||
{'name': computer_name, 'err': response['problems']})
|
{'name': computer_name, 'err': response['problems']})
|
||||||
LOG.error(message)
|
LOG.error(message)
|
||||||
raise exception.EMCVmaxXMLAPIError(err=message)
|
raise exception.EMCPowerMaxXMLAPIError(err=message)
|
||||||
|
|
||||||
self.cifs_server_map[mover_name].pop(computer_name)
|
self.cifs_server_map[mover_name].pop(computer_name)
|
||||||
|
|
||||||
|
|
||||||
@vmax_utils.decorate_all_methods(vmax_utils.log_enter_exit,
|
@powermax_utils.decorate_all_methods(powermax_utils.log_enter_exit,
|
||||||
debug_only=True)
|
debug_only=True)
|
||||||
class CIFSShare(StorageObject):
|
class CIFSShare(StorageObject):
|
||||||
def __init__(self, conn, elt_maker, xml_parser, manager):
|
def __init__(self, conn, elt_maker, xml_parser, manager):
|
||||||
super(CIFSShare, self).__init__(conn, elt_maker, xml_parser, manager)
|
super(CIFSShare, self).__init__(conn, elt_maker, xml_parser, manager)
|
||||||
self.cifs_share_map = {}
|
self.cifs_share_map = {}
|
||||||
|
|
||||||
@utils.retry(exception.EMCVmaxInvalidMoverID)
|
@utils.retry(exception.EMCPowerMaxInvalidMoverID)
|
||||||
def create(self, name, server_name, mover_name, is_vdm=True):
|
def create(self, name, server_name, mover_name, is_vdm=True):
|
||||||
mover_id = self._get_mover_id(mover_name, is_vdm)
|
mover_id = self._get_mover_id(mover_name, is_vdm)
|
||||||
|
|
||||||
@ -1579,13 +1579,13 @@ class CIFSShare(StorageObject):
|
|||||||
constants.MSG_INVALID_MOVER_ID) and
|
constants.MSG_INVALID_MOVER_ID) and
|
||||||
not self.xml_retry):
|
not self.xml_retry):
|
||||||
self.xml_retry = True
|
self.xml_retry = True
|
||||||
raise exception.EMCVmaxInvalidMoverID(id=mover_id)
|
raise exception.EMCPowerMaxInvalidMoverID(id=mover_id)
|
||||||
elif constants.STATUS_OK != response['maxSeverity']:
|
elif constants.STATUS_OK != response['maxSeverity']:
|
||||||
message = (_("Failed to create file share %(name)s. "
|
message = (_("Failed to create file share %(name)s. "
|
||||||
"Reason: %(err)s.") %
|
"Reason: %(err)s.") %
|
||||||
{'name': name, 'err': response['problems']})
|
{'name': name, 'err': response['problems']})
|
||||||
LOG.error(message)
|
LOG.error(message)
|
||||||
raise exception.EMCVmaxXMLAPIError(err=message)
|
raise exception.EMCPowerMaxXMLAPIError(err=message)
|
||||||
|
|
||||||
def get(self, name):
|
def get(self, name):
|
||||||
if name not in self.cifs_share_map:
|
if name not in self.cifs_share_map:
|
||||||
@ -1605,7 +1605,7 @@ class CIFSShare(StorageObject):
|
|||||||
|
|
||||||
return constants.STATUS_OK, self.cifs_share_map[name]
|
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):
|
def delete(self, name, mover_name, is_vdm=True):
|
||||||
status, out = self.get(name)
|
status, out = self.get(name)
|
||||||
if constants.STATUS_NOT_FOUND == status:
|
if constants.STATUS_NOT_FOUND == status:
|
||||||
@ -1617,7 +1617,7 @@ class CIFSShare(StorageObject):
|
|||||||
"Reason: %(err)s.") %
|
"Reason: %(err)s.") %
|
||||||
{'name': name, 'err': out})
|
{'name': name, 'err': out})
|
||||||
LOG.error(message)
|
LOG.error(message)
|
||||||
raise exception.EMCVmaxXMLAPIError(err=message)
|
raise exception.EMCPowerMaxXMLAPIError(err=message)
|
||||||
|
|
||||||
mover_id = self._get_mover_id(mover_name, is_vdm)
|
mover_id = self._get_mover_id(mover_name, is_vdm)
|
||||||
|
|
||||||
@ -1642,13 +1642,13 @@ class CIFSShare(StorageObject):
|
|||||||
constants.MSG_INVALID_MOVER_ID) and
|
constants.MSG_INVALID_MOVER_ID) and
|
||||||
not self.xml_retry):
|
not self.xml_retry):
|
||||||
self.xml_retry = True
|
self.xml_retry = True
|
||||||
raise exception.EMCVmaxInvalidMoverID(id=mover_id)
|
raise exception.EMCPowerMaxInvalidMoverID(id=mover_id)
|
||||||
elif constants.STATUS_OK != response['maxSeverity']:
|
elif constants.STATUS_OK != response['maxSeverity']:
|
||||||
message = (_("Failed to delete file system %(name)s. "
|
message = (_("Failed to delete file system %(name)s. "
|
||||||
"Reason: %(err)s.") %
|
"Reason: %(err)s.") %
|
||||||
{'name': name, 'err': response['problems']})
|
{'name': name, 'err': response['problems']})
|
||||||
LOG.error(message)
|
LOG.error(message)
|
||||||
raise exception.EMCVmaxXMLAPIError(err=message)
|
raise exception.EMCPowerMaxXMLAPIError(err=message)
|
||||||
|
|
||||||
self.cifs_share_map.pop(name)
|
self.cifs_share_map.pop(name)
|
||||||
|
|
||||||
@ -1666,7 +1666,7 @@ class CIFSShare(StorageObject):
|
|||||||
'%(name)s.') %
|
'%(name)s.') %
|
||||||
{'name': share_name})
|
{'name': share_name})
|
||||||
LOG.exception(message)
|
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,
|
def allow_share_access(self, mover_name, share_name, user_name, domain,
|
||||||
access=constants.CIFS_ACL_FULLCONTROL):
|
access=constants.CIFS_ACL_FULLCONTROL):
|
||||||
@ -1694,7 +1694,7 @@ class CIFSShare(StorageObject):
|
|||||||
'CIFS share %(name)s. Reason: %(err)s.') %
|
'CIFS share %(name)s. Reason: %(err)s.') %
|
||||||
{'access': access, 'name': share_name, 'err': expt})
|
{'access': access, 'name': share_name, 'err': expt})
|
||||||
LOG.error(message)
|
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,
|
def deny_share_access(self, mover_name, share_name, user_name, domain,
|
||||||
access=constants.CIFS_ACL_FULLCONTROL):
|
access=constants.CIFS_ACL_FULLCONTROL):
|
||||||
@ -1728,7 +1728,7 @@ class CIFSShare(StorageObject):
|
|||||||
'CIFS share %(name)s. Reason: %(err)s.') %
|
'CIFS share %(name)s. Reason: %(err)s.') %
|
||||||
{'access': access, 'name': share_name, 'err': expt})
|
{'access': access, 'name': share_name, 'err': expt})
|
||||||
LOG.exception(message)
|
LOG.exception(message)
|
||||||
raise exception.EMCVmaxXMLAPIError(err=message)
|
raise exception.EMCPowerMaxXMLAPIError(err=message)
|
||||||
|
|
||||||
def get_share_access(self, mover_name, share_name):
|
def get_share_access(self, mover_name, share_name):
|
||||||
get_str = 'sharesd %s dump' % share_name
|
get_str = 'sharesd %s dump' % share_name
|
||||||
@ -1742,7 +1742,7 @@ class CIFSShare(StorageObject):
|
|||||||
except processutils.ProcessExecutionError:
|
except processutils.ProcessExecutionError:
|
||||||
msg = _('Failed to get access list of CIFS share %s.') % share_name
|
msg = _('Failed to get access list of CIFS share %s.') % share_name
|
||||||
LOG.exception(msg)
|
LOG.exception(msg)
|
||||||
raise exception.EMCVmaxXMLAPIError(err=msg)
|
raise exception.EMCPowerMaxXMLAPIError(err=msg)
|
||||||
|
|
||||||
ret = {}
|
ret = {}
|
||||||
name_pattern = re.compile(r"Unix user '(.+?)'")
|
name_pattern = re.compile(r"Unix user '(.+?)'")
|
||||||
@ -1772,8 +1772,8 @@ class CIFSShare(StorageObject):
|
|||||||
return users_to_remove
|
return users_to_remove
|
||||||
|
|
||||||
|
|
||||||
@vmax_utils.decorate_all_methods(vmax_utils.log_enter_exit,
|
@powermax_utils.decorate_all_methods(powermax_utils.log_enter_exit,
|
||||||
debug_only=True)
|
debug_only=True)
|
||||||
class NFSShare(StorageObject):
|
class NFSShare(StorageObject):
|
||||||
def __init__(self, conn, elt_maker, xml_parser, manager):
|
def __init__(self, conn, elt_maker, xml_parser, manager):
|
||||||
super(NFSShare, self).__init__(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.') %
|
'%(mover_name)s. Reason: %(err)s.') %
|
||||||
{'name': name, 'mover_name': mover_name, 'err': expt})
|
{'name': name, 'mover_name': mover_name, 'err': expt})
|
||||||
LOG.exception(message)
|
LOG.exception(message)
|
||||||
raise exception.EMCVmaxXMLAPIError(err=message)
|
raise exception.EMCPowerMaxXMLAPIError(err=message)
|
||||||
|
|
||||||
def delete(self, name, mover_name):
|
def delete(self, name, mover_name):
|
||||||
path = '/' + name
|
path = '/' + name
|
||||||
@ -1819,7 +1819,7 @@ class NFSShare(StorageObject):
|
|||||||
'%(mover_name)s. Reason: %(err)s.') %
|
'%(mover_name)s. Reason: %(err)s.') %
|
||||||
{'name': name, 'mover_name': mover_name, 'err': expt})
|
{'name': name, 'mover_name': mover_name, 'err': expt})
|
||||||
LOG.exception(message)
|
LOG.exception(message)
|
||||||
raise exception.EMCVmaxXMLAPIError(err=message)
|
raise exception.EMCPowerMaxXMLAPIError(err=message)
|
||||||
|
|
||||||
self.nfs_share_map.pop(name)
|
self.nfs_share_map.pop(name)
|
||||||
|
|
||||||
@ -1861,7 +1861,7 @@ class NFSShare(StorageObject):
|
|||||||
'mover_name': mover_name,
|
'mover_name': mover_name,
|
||||||
'err': expt})
|
'err': expt})
|
||||||
LOG.exception(message)
|
LOG.exception(message)
|
||||||
raise exception.EMCVmaxXMLAPIError(err=message)
|
raise exception.EMCPowerMaxXMLAPIError(err=message)
|
||||||
|
|
||||||
re_exports = '%s\s*:\s*\nexport\s*(.*)\n' % mover_name
|
re_exports = '%s\s*:\s*\nexport\s*(.*)\n' % mover_name
|
||||||
m = re.search(re_exports, out)
|
m = re.search(re_exports, out)
|
||||||
@ -1873,14 +1873,17 @@ class NFSShare(StorageObject):
|
|||||||
for field in fields:
|
for field in fields:
|
||||||
field = field.strip()
|
field = field.strip()
|
||||||
if field.startswith('rw='):
|
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='):
|
elif field.startswith('access='):
|
||||||
nfs_share['AccessHosts'] = vmax_utils.parse_ipaddr(
|
nfs_share['AccessHosts'] = powermax_utils.parse_ipaddr(
|
||||||
field[7:])
|
field[7:])
|
||||||
elif field.startswith('root='):
|
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='):
|
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
|
self.nfs_share_map[name] = nfs_share
|
||||||
else:
|
else:
|
||||||
@ -1896,13 +1899,13 @@ class NFSShare(StorageObject):
|
|||||||
if constants.STATUS_NOT_FOUND == status:
|
if constants.STATUS_NOT_FOUND == status:
|
||||||
message = (_('NFS share %s not found.') % share_name)
|
message = (_('NFS share %s not found.') % share_name)
|
||||||
LOG.error(message)
|
LOG.error(message)
|
||||||
raise exception.EMCVmaxXMLAPIError(err=message)
|
raise exception.EMCPowerMaxXMLAPIError(err=message)
|
||||||
|
|
||||||
changed = False
|
changed = False
|
||||||
rwhosts = share['RwHosts']
|
rwhosts = share['RwHosts']
|
||||||
rohosts = share['RoHosts']
|
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 access_level == const.ACCESS_LEVEL_RW:
|
||||||
if host_ip not in rwhosts:
|
if host_ip not in rwhosts:
|
||||||
@ -1956,7 +1959,7 @@ class NFSShare(StorageObject):
|
|||||||
'Reason %(err)s.') %
|
'Reason %(err)s.') %
|
||||||
{'path': share_name, 'err': share})
|
{'path': share_name, 'err': share})
|
||||||
LOG.error(message)
|
LOG.error(message)
|
||||||
raise exception.EMCVmaxXMLAPIError(err=message)
|
raise exception.EMCPowerMaxXMLAPIError(err=message)
|
||||||
|
|
||||||
changed = False
|
changed = False
|
||||||
rwhosts = set(share['RwHosts'])
|
rwhosts = set(share['RwHosts'])
|
||||||
@ -2008,7 +2011,7 @@ class NFSShare(StorageObject):
|
|||||||
message = (_('Query nfs share %(path)s failed. '
|
message = (_('Query nfs share %(path)s failed. '
|
||||||
'Reason %(err)s.') %
|
'Reason %(err)s.') %
|
||||||
{'path': share_name, 'err': status})
|
{'path': share_name, 'err': status})
|
||||||
raise exception.EMCVmaxXMLAPIError(err=message)
|
raise exception.EMCPowerMaxXMLAPIError(err=message)
|
||||||
|
|
||||||
self._set_share_access('/' + share_name,
|
self._set_share_access('/' + share_name,
|
||||||
mover_name,
|
mover_name,
|
||||||
@ -2056,4 +2059,4 @@ class NFSShare(StorageObject):
|
|||||||
'mover_name': mover_name,
|
'mover_name': mover_name,
|
||||||
'err': expt})
|
'err': expt})
|
||||||
LOG.exception(message)
|
LOG.exception(message)
|
||||||
raise exception.EMCVmaxXMLAPIError(err=message)
|
raise exception.EMCPowerMaxXMLAPIError(err=message)
|
@ -147,7 +147,7 @@ class FakeData(object):
|
|||||||
fake_error_msg = 'fake error message'
|
fake_error_msg = 'fake error message'
|
||||||
|
|
||||||
emc_share_backend = 'vnx'
|
emc_share_backend = 'vnx'
|
||||||
vmax_share_backend = 'vmax'
|
powermax_share_backend = 'powermax'
|
||||||
emc_nas_server = '192.168.1.20'
|
emc_nas_server = '192.168.1.20'
|
||||||
emc_nas_login = 'fakename'
|
emc_nas_login = 'fakename'
|
||||||
emc_nas_password = 'fakepassword'
|
emc_nas_password = 'fakepassword'
|
||||||
@ -1564,8 +1564,9 @@ class FakeEMCShareDriver(object):
|
|||||||
self.configuration.append_config_values = mock.Mock(return_value=0)
|
self.configuration.append_config_values = mock.Mock(return_value=0)
|
||||||
self.configuration.emc_share_backend = FakeData.emc_share_backend
|
self.configuration.emc_share_backend = FakeData.emc_share_backend
|
||||||
self.configuration.vnx_server_container = FakeData.mover_name
|
self.configuration.vnx_server_container = FakeData.mover_name
|
||||||
if enas_type == 'vmax':
|
if enas_type == 'powermax':
|
||||||
self.configuration.emc_share_backend = FakeData.vmax_share_backend
|
self.configuration.emc_share_backend = (
|
||||||
|
FakeData.powermax_share_backend)
|
||||||
self.configuration.vmax_server_container = FakeData.mover_name
|
self.configuration.vmax_server_container = FakeData.mover_name
|
||||||
self.configuration.emc_nas_server = FakeData.emc_nas_server
|
self.configuration.emc_nas_server = FakeData.emc_nas_server
|
||||||
self.configuration.emc_nas_login = FakeData.emc_nas_login
|
self.configuration.emc_nas_login = FakeData.emc_nas_login
|
||||||
|
@ -167,7 +167,8 @@ def patch_get_managed_ports_vnx(*arg, **kwargs):
|
|||||||
mock.Mock(*arg, **kwargs))
|
mock.Mock(*arg, **kwargs))
|
||||||
|
|
||||||
|
|
||||||
def patch_get_managed_ports_vmax(*arg, **kwargs):
|
def patch_get_managed_ports_powermax(*arg, **kwargs):
|
||||||
return mock.patch('manila.share.drivers.dell_emc.plugins.vmax.connection.'
|
return mock.patch(
|
||||||
'VMAXStorageConnection.get_managed_ports',
|
'manila.share.drivers.dell_emc.plugins.powermax.connection.'
|
||||||
mock.Mock(*arg, **kwargs))
|
'PowerMaxStorageConnection.get_managed_ports',
|
||||||
|
mock.Mock(*arg, **kwargs))
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# Copyright (c) 2016 Dell Inc. or its subsidiaries.
|
# Copyright (c) 2019 Dell Inc. or its subsidiaries.
|
||||||
# All Rights Reserved.
|
# All Rights Reserved.
|
||||||
#
|
#
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
@ -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 connector
|
||||||
from manila.share.drivers.dell_emc.common.enas import constants
|
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.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)
|
object_manager as manager)
|
||||||
from manila import test
|
from manila import test
|
||||||
from manila.tests.share.drivers.dell_emc.common.enas import fakes
|
from manila.tests.share.drivers.dell_emc.common.enas import fakes
|
||||||
@ -39,7 +39,7 @@ class StorageObjectManagerTestCase(test.TestCase):
|
|||||||
def setUp(self):
|
def setUp(self):
|
||||||
super(StorageObjectManagerTestCase, self).setUp()
|
super(StorageObjectManagerTestCase, self).setUp()
|
||||||
|
|
||||||
emd_share_driver = fakes.FakeEMCShareDriver('vmax')
|
emd_share_driver = fakes.FakeEMCShareDriver('powermax')
|
||||||
|
|
||||||
self.manager = manager.StorageObjectManager(
|
self.manager = manager.StorageObjectManager(
|
||||||
emd_share_driver.configuration)
|
emd_share_driver.configuration)
|
||||||
@ -70,7 +70,7 @@ class StorageObjectManagerTestCase(test.TestCase):
|
|||||||
|
|
||||||
fake_type = 'fake_type'
|
fake_type = 'fake_type'
|
||||||
|
|
||||||
self.assertRaises(exception.EMCVmaxXMLAPIError,
|
self.assertRaises(exception.EMCPowerMaxXMLAPIError,
|
||||||
self.manager.getStorageContext,
|
self.manager.getStorageContext,
|
||||||
fake_type)
|
fake_type)
|
||||||
|
|
||||||
@ -81,7 +81,7 @@ class StorageObjectTestCaseBase(test.TestCase):
|
|||||||
def setUp(self):
|
def setUp(self):
|
||||||
super(StorageObjectTestCaseBase, self).setUp()
|
super(StorageObjectTestCaseBase, self).setUp()
|
||||||
|
|
||||||
emd_share_driver = fakes.FakeEMCShareDriver('vmax')
|
emd_share_driver = fakes.FakeEMCShareDriver('powermax')
|
||||||
|
|
||||||
self.manager = manager.StorageObjectManager(
|
self.manager = manager.StorageObjectManager(
|
||||||
emd_share_driver.configuration)
|
emd_share_driver.configuration)
|
||||||
@ -227,7 +227,7 @@ class FileSystemTestCase(StorageObjectTestCaseBase):
|
|||||||
context = self.manager.getStorageContext('FileSystem')
|
context = self.manager.getStorageContext('FileSystem')
|
||||||
context.conn['XML'].request = utils.EMCMock(side_effect=self.hook)
|
context.conn['XML'].request = utils.EMCMock(side_effect=self.hook)
|
||||||
|
|
||||||
self.assertRaises(exception.EMCVmaxXMLAPIError,
|
self.assertRaises(exception.EMCPowerMaxXMLAPIError,
|
||||||
context.create,
|
context.create,
|
||||||
name=self.fs.filesystem_name,
|
name=self.fs.filesystem_name,
|
||||||
size=self.fs.filesystem_size,
|
size=self.fs.filesystem_size,
|
||||||
@ -287,7 +287,7 @@ class FileSystemTestCase(StorageObjectTestCaseBase):
|
|||||||
status, out = context.get(self.fs.filesystem_name)
|
status, out = context.get(self.fs.filesystem_name)
|
||||||
self.assertEqual(constants.STATUS_ERROR, status)
|
self.assertEqual(constants.STATUS_ERROR, status)
|
||||||
|
|
||||||
self.assertRaises(exception.EMCVmaxXMLAPIError,
|
self.assertRaises(exception.EMCPowerMaxXMLAPIError,
|
||||||
context.get_id,
|
context.get_id,
|
||||||
self.fs.filesystem_name)
|
self.fs.filesystem_name)
|
||||||
|
|
||||||
@ -363,7 +363,7 @@ class FileSystemTestCase(StorageObjectTestCaseBase):
|
|||||||
context = self.manager.getStorageContext('FileSystem')
|
context = self.manager.getStorageContext('FileSystem')
|
||||||
context.conn['XML'].request = utils.EMCMock(side_effect=self.hook)
|
context.conn['XML'].request = utils.EMCMock(side_effect=self.hook)
|
||||||
|
|
||||||
self.assertRaises(exception.EMCVmaxXMLAPIError,
|
self.assertRaises(exception.EMCPowerMaxXMLAPIError,
|
||||||
context.delete,
|
context.delete,
|
||||||
self.fs.filesystem_name)
|
self.fs.filesystem_name)
|
||||||
|
|
||||||
@ -377,7 +377,7 @@ class FileSystemTestCase(StorageObjectTestCaseBase):
|
|||||||
context = self.manager.getStorageContext('FileSystem')
|
context = self.manager.getStorageContext('FileSystem')
|
||||||
context.conn['XML'].request = utils.EMCMock(side_effect=self.hook)
|
context.conn['XML'].request = utils.EMCMock(side_effect=self.hook)
|
||||||
|
|
||||||
self.assertRaises(exception.EMCVmaxXMLAPIError,
|
self.assertRaises(exception.EMCPowerMaxXMLAPIError,
|
||||||
context.delete,
|
context.delete,
|
||||||
self.fs.filesystem_name)
|
self.fs.filesystem_name)
|
||||||
|
|
||||||
@ -414,7 +414,7 @@ class FileSystemTestCase(StorageObjectTestCaseBase):
|
|||||||
context = self.manager.getStorageContext('FileSystem')
|
context = self.manager.getStorageContext('FileSystem')
|
||||||
context.conn['XML'].request = utils.EMCMock(side_effect=self.hook)
|
context.conn['XML'].request = utils.EMCMock(side_effect=self.hook)
|
||||||
|
|
||||||
self.assertRaises(exception.EMCVmaxXMLAPIError,
|
self.assertRaises(exception.EMCPowerMaxXMLAPIError,
|
||||||
context.extend,
|
context.extend,
|
||||||
name=self.fs.filesystem_name,
|
name=self.fs.filesystem_name,
|
||||||
pool_name=self.fs.pool_name,
|
pool_name=self.fs.pool_name,
|
||||||
@ -429,7 +429,7 @@ class FileSystemTestCase(StorageObjectTestCaseBase):
|
|||||||
context = self.manager.getStorageContext('FileSystem')
|
context = self.manager.getStorageContext('FileSystem')
|
||||||
context.conn['XML'].request = utils.EMCMock(side_effect=self.hook)
|
context.conn['XML'].request = utils.EMCMock(side_effect=self.hook)
|
||||||
|
|
||||||
self.assertRaises(exception.EMCVmaxXMLAPIError,
|
self.assertRaises(exception.EMCPowerMaxXMLAPIError,
|
||||||
context.extend,
|
context.extend,
|
||||||
name=self.fs.filesystem_name,
|
name=self.fs.filesystem_name,
|
||||||
pool_name=self.pool.pool_name,
|
pool_name=self.pool.pool_name,
|
||||||
@ -459,7 +459,7 @@ class FileSystemTestCase(StorageObjectTestCaseBase):
|
|||||||
context = self.manager.getStorageContext('FileSystem')
|
context = self.manager.getStorageContext('FileSystem')
|
||||||
context.conn['XML'].request = utils.EMCMock(side_effect=self.hook)
|
context.conn['XML'].request = utils.EMCMock(side_effect=self.hook)
|
||||||
|
|
||||||
self.assertRaises(exception.EMCVmaxXMLAPIError,
|
self.assertRaises(exception.EMCPowerMaxXMLAPIError,
|
||||||
context.extend,
|
context.extend,
|
||||||
name=self.fs.filesystem_name,
|
name=self.fs.filesystem_name,
|
||||||
pool_name=self.pool.pool_name,
|
pool_name=self.pool.pool_name,
|
||||||
@ -635,7 +635,7 @@ class MountPointTestCase(StorageObjectTestCaseBase):
|
|||||||
context = self.manager.getStorageContext('MountPoint')
|
context = self.manager.getStorageContext('MountPoint')
|
||||||
context.conn['XML'].request = utils.EMCMock(side_effect=self.hook)
|
context.conn['XML'].request = utils.EMCMock(side_effect=self.hook)
|
||||||
|
|
||||||
self.assertRaises(exception.EMCVmaxXMLAPIError,
|
self.assertRaises(exception.EMCPowerMaxXMLAPIError,
|
||||||
context.create,
|
context.create,
|
||||||
mount_path=self.mount.path,
|
mount_path=self.mount.path,
|
||||||
fs_name=self.fs.filesystem_name,
|
fs_name=self.fs.filesystem_name,
|
||||||
@ -731,7 +731,7 @@ class MountPointTestCase(StorageObjectTestCaseBase):
|
|||||||
context = self.manager.getStorageContext('MountPoint')
|
context = self.manager.getStorageContext('MountPoint')
|
||||||
context.conn['XML'].request = utils.EMCMock(side_effect=self.hook)
|
context.conn['XML'].request = utils.EMCMock(side_effect=self.hook)
|
||||||
|
|
||||||
self.assertRaises(exception.EMCVmaxXMLAPIError,
|
self.assertRaises(exception.EMCPowerMaxXMLAPIError,
|
||||||
context.delete,
|
context.delete,
|
||||||
mount_path=self.mount.path,
|
mount_path=self.mount.path,
|
||||||
mover_name=self.vdm.vdm_name,
|
mover_name=self.vdm.vdm_name,
|
||||||
@ -920,7 +920,7 @@ class VDMTestCase(StorageObjectTestCaseBase):
|
|||||||
context.conn['XML'].request = utils.EMCMock(side_effect=self.hook)
|
context.conn['XML'].request = utils.EMCMock(side_effect=self.hook)
|
||||||
|
|
||||||
# Create VDM with invalid mover ID
|
# Create VDM with invalid mover ID
|
||||||
self.assertRaises(exception.EMCVmaxXMLAPIError,
|
self.assertRaises(exception.EMCPowerMaxXMLAPIError,
|
||||||
context.create,
|
context.create,
|
||||||
name=self.vdm.vdm_name,
|
name=self.vdm.vdm_name,
|
||||||
mover_name=self.mover.mover_name)
|
mover_name=self.mover.mover_name)
|
||||||
@ -992,7 +992,7 @@ class VDMTestCase(StorageObjectTestCaseBase):
|
|||||||
context = self.manager.getStorageContext('VDM')
|
context = self.manager.getStorageContext('VDM')
|
||||||
context.conn['XML'].request = utils.EMCMock(side_effect=self.hook)
|
context.conn['XML'].request = utils.EMCMock(side_effect=self.hook)
|
||||||
|
|
||||||
self.assertRaises(exception.EMCVmaxXMLAPIError,
|
self.assertRaises(exception.EMCPowerMaxXMLAPIError,
|
||||||
context.get_id,
|
context.get_id,
|
||||||
self.vdm.vdm_name)
|
self.vdm.vdm_name)
|
||||||
|
|
||||||
@ -1031,7 +1031,7 @@ class VDMTestCase(StorageObjectTestCaseBase):
|
|||||||
context = self.manager.getStorageContext('VDM')
|
context = self.manager.getStorageContext('VDM')
|
||||||
context.conn['XML'].request = utils.EMCMock(side_effect=self.hook)
|
context.conn['XML'].request = utils.EMCMock(side_effect=self.hook)
|
||||||
|
|
||||||
self.assertRaises(exception.EMCVmaxXMLAPIError,
|
self.assertRaises(exception.EMCPowerMaxXMLAPIError,
|
||||||
context.delete,
|
context.delete,
|
||||||
self.vdm.vdm_name)
|
self.vdm.vdm_name)
|
||||||
|
|
||||||
@ -1045,7 +1045,7 @@ class VDMTestCase(StorageObjectTestCaseBase):
|
|||||||
context = self.manager.getStorageContext('VDM')
|
context = self.manager.getStorageContext('VDM')
|
||||||
context.conn['XML'].request = utils.EMCMock(side_effect=self.hook)
|
context.conn['XML'].request = utils.EMCMock(side_effect=self.hook)
|
||||||
|
|
||||||
self.assertRaises(exception.EMCVmaxXMLAPIError,
|
self.assertRaises(exception.EMCPowerMaxXMLAPIError,
|
||||||
context.delete,
|
context.delete,
|
||||||
self.vdm.vdm_name)
|
self.vdm.vdm_name)
|
||||||
|
|
||||||
@ -1086,7 +1086,7 @@ class VDMTestCase(StorageObjectTestCaseBase):
|
|||||||
context = self.manager.getStorageContext('VDM')
|
context = self.manager.getStorageContext('VDM')
|
||||||
context.conn['SSH'].run_ssh = mock.Mock(side_effect=self.ssh_hook)
|
context.conn['SSH'].run_ssh = mock.Mock(side_effect=self.ssh_hook)
|
||||||
|
|
||||||
self.assertRaises(exception.EMCVmaxXMLAPIError,
|
self.assertRaises(exception.EMCPowerMaxXMLAPIError,
|
||||||
context.detach_nfs_interface,
|
context.detach_nfs_interface,
|
||||||
self.vdm.vdm_name,
|
self.vdm.vdm_name,
|
||||||
self.mover.interface_name2)
|
self.mover.interface_name2)
|
||||||
@ -1175,7 +1175,7 @@ class StoragePoolTestCase(StorageObjectTestCaseBase):
|
|||||||
context = self.manager.getStorageContext('StoragePool')
|
context = self.manager.getStorageContext('StoragePool')
|
||||||
context.conn['XML'].request = utils.EMCMock(side_effect=self.hook)
|
context.conn['XML'].request = utils.EMCMock(side_effect=self.hook)
|
||||||
|
|
||||||
self.assertRaises(exception.EMCVmaxXMLAPIError,
|
self.assertRaises(exception.EMCPowerMaxXMLAPIError,
|
||||||
context.get_id,
|
context.get_id,
|
||||||
self.pool.pool_name)
|
self.pool.pool_name)
|
||||||
|
|
||||||
@ -1295,7 +1295,7 @@ class MoverTestCase(StorageObjectTestCaseBase):
|
|||||||
context = self.manager.getStorageContext('Mover')
|
context = self.manager.getStorageContext('Mover')
|
||||||
context.conn['XML'].request = utils.EMCMock(side_effect=self.hook)
|
context.conn['XML'].request = utils.EMCMock(side_effect=self.hook)
|
||||||
|
|
||||||
self.assertRaises(exception.EMCVmaxXMLAPIError,
|
self.assertRaises(exception.EMCPowerMaxXMLAPIError,
|
||||||
context.get,
|
context.get,
|
||||||
self.mover.mover_name)
|
self.mover.mover_name)
|
||||||
|
|
||||||
@ -1407,7 +1407,7 @@ class SnapshotTestCase(StorageObjectTestCaseBase):
|
|||||||
context = self.manager.getStorageContext('Snapshot')
|
context = self.manager.getStorageContext('Snapshot')
|
||||||
context.conn['XML'].request = utils.EMCMock(side_effect=self.hook)
|
context.conn['XML'].request = utils.EMCMock(side_effect=self.hook)
|
||||||
|
|
||||||
self.assertRaises(exception.EMCVmaxXMLAPIError,
|
self.assertRaises(exception.EMCPowerMaxXMLAPIError,
|
||||||
context.create,
|
context.create,
|
||||||
name=self.snap.snapshot_name,
|
name=self.snap.snapshot_name,
|
||||||
fs_name=self.fs.filesystem_name,
|
fs_name=self.fs.filesystem_name,
|
||||||
@ -1487,7 +1487,7 @@ class SnapshotTestCase(StorageObjectTestCaseBase):
|
|||||||
context = self.manager.getStorageContext('Snapshot')
|
context = self.manager.getStorageContext('Snapshot')
|
||||||
context.conn['XML'].request = utils.EMCMock(side_effect=self.hook)
|
context.conn['XML'].request = utils.EMCMock(side_effect=self.hook)
|
||||||
|
|
||||||
self.assertRaises(exception.EMCVmaxXMLAPIError,
|
self.assertRaises(exception.EMCPowerMaxXMLAPIError,
|
||||||
context.delete,
|
context.delete,
|
||||||
self.snap.snapshot_name)
|
self.snap.snapshot_name)
|
||||||
|
|
||||||
@ -1513,7 +1513,7 @@ class SnapshotTestCase(StorageObjectTestCaseBase):
|
|||||||
context = self.manager.getStorageContext('Snapshot')
|
context = self.manager.getStorageContext('Snapshot')
|
||||||
context.conn['XML'].request = utils.EMCMock(side_effect=self.hook)
|
context.conn['XML'].request = utils.EMCMock(side_effect=self.hook)
|
||||||
|
|
||||||
self.assertRaises(exception.EMCVmaxXMLAPIError,
|
self.assertRaises(exception.EMCPowerMaxXMLAPIError,
|
||||||
context.delete,
|
context.delete,
|
||||||
self.snap.snapshot_name)
|
self.snap.snapshot_name)
|
||||||
|
|
||||||
@ -1541,7 +1541,7 @@ class SnapshotTestCase(StorageObjectTestCaseBase):
|
|||||||
context = self.manager.getStorageContext('Snapshot')
|
context = self.manager.getStorageContext('Snapshot')
|
||||||
context.conn['XML'].request = utils.EMCMock(side_effect=self.hook)
|
context.conn['XML'].request = utils.EMCMock(side_effect=self.hook)
|
||||||
|
|
||||||
self.assertRaises(exception.EMCVmaxXMLAPIError,
|
self.assertRaises(exception.EMCPowerMaxXMLAPIError,
|
||||||
context.get_id,
|
context.get_id,
|
||||||
self.snap.snapshot_name)
|
self.snap.snapshot_name)
|
||||||
|
|
||||||
@ -1651,7 +1651,7 @@ class MoverInterfaceTestCase(StorageObjectTestCaseBase):
|
|||||||
'net_mask': self.mover.net_mask,
|
'net_mask': self.mover.net_mask,
|
||||||
'vlan_id': self.mover.vlan_id,
|
'vlan_id': self.mover.vlan_id,
|
||||||
}
|
}
|
||||||
self.assertRaises(exception.EMCVmaxXMLAPIError,
|
self.assertRaises(exception.EMCPowerMaxXMLAPIError,
|
||||||
context.create,
|
context.create,
|
||||||
interface)
|
interface)
|
||||||
|
|
||||||
@ -1707,7 +1707,7 @@ class MoverInterfaceTestCase(StorageObjectTestCaseBase):
|
|||||||
'net_mask': self.mover.net_mask,
|
'net_mask': self.mover.net_mask,
|
||||||
'vlan_id': self.mover.vlan_id,
|
'vlan_id': self.mover.vlan_id,
|
||||||
}
|
}
|
||||||
self.assertRaises(exception.EMCVmaxXMLAPIError,
|
self.assertRaises(exception.EMCPowerMaxXMLAPIError,
|
||||||
context.create,
|
context.create,
|
||||||
interface)
|
interface)
|
||||||
|
|
||||||
@ -1831,7 +1831,7 @@ class MoverInterfaceTestCase(StorageObjectTestCaseBase):
|
|||||||
context = self.manager.getStorageContext('MoverInterface')
|
context = self.manager.getStorageContext('MoverInterface')
|
||||||
context.conn['XML'].request = utils.EMCMock(side_effect=self.hook)
|
context.conn['XML'].request = utils.EMCMock(side_effect=self.hook)
|
||||||
|
|
||||||
self.assertRaises(exception.EMCVmaxXMLAPIError,
|
self.assertRaises(exception.EMCPowerMaxXMLAPIError,
|
||||||
context.delete,
|
context.delete,
|
||||||
ip_addr=self.mover.ip_address1,
|
ip_addr=self.mover.ip_address1,
|
||||||
mover_name=self.mover.mover_name)
|
mover_name=self.mover.mover_name)
|
||||||
@ -1896,7 +1896,7 @@ class DNSDomainTestCase(StorageObjectTestCaseBase):
|
|||||||
context = self.manager.getStorageContext('DNSDomain')
|
context = self.manager.getStorageContext('DNSDomain')
|
||||||
context.conn['XML'].request = utils.EMCMock(side_effect=self.hook)
|
context.conn['XML'].request = utils.EMCMock(side_effect=self.hook)
|
||||||
|
|
||||||
self.assertRaises(exception.EMCVmaxXMLAPIError,
|
self.assertRaises(exception.EMCPowerMaxXMLAPIError,
|
||||||
context.create,
|
context.create,
|
||||||
mover_name=self.mover.mover_name,
|
mover_name=self.mover.mover_name,
|
||||||
name=self.mover.domain_name,
|
name=self.mover.domain_name,
|
||||||
@ -2075,7 +2075,7 @@ class CIFSServerTestCase(StorageObjectTestCaseBase):
|
|||||||
'mover_name': self.vdm.vdm_name,
|
'mover_name': self.vdm.vdm_name,
|
||||||
'is_vdm': True,
|
'is_vdm': True,
|
||||||
}
|
}
|
||||||
self.assertRaises(exception.EMCVmaxXMLAPIError,
|
self.assertRaises(exception.EMCPowerMaxXMLAPIError,
|
||||||
context.create,
|
context.create,
|
||||||
cifs_server_args)
|
cifs_server_args)
|
||||||
|
|
||||||
@ -2304,7 +2304,7 @@ class CIFSServerTestCase(StorageObjectTestCaseBase):
|
|||||||
'password': self.cifs_server.domain_password,
|
'password': self.cifs_server.domain_password,
|
||||||
'mover_name': self.vdm.vdm_name,
|
'mover_name': self.vdm.vdm_name,
|
||||||
}
|
}
|
||||||
self.assertRaises(exception.EMCVmaxXMLAPIError,
|
self.assertRaises(exception.EMCPowerMaxXMLAPIError,
|
||||||
context.modify,
|
context.modify,
|
||||||
cifs_server_args)
|
cifs_server_args)
|
||||||
|
|
||||||
@ -2377,7 +2377,7 @@ class CIFSServerTestCase(StorageObjectTestCaseBase):
|
|||||||
context = self.manager.getStorageContext('CIFSServer')
|
context = self.manager.getStorageContext('CIFSServer')
|
||||||
context.conn['XML'].request = utils.EMCMock(side_effect=self.hook)
|
context.conn['XML'].request = utils.EMCMock(side_effect=self.hook)
|
||||||
|
|
||||||
self.assertRaises(exception.EMCVmaxXMLAPIError,
|
self.assertRaises(exception.EMCPowerMaxXMLAPIError,
|
||||||
context.delete,
|
context.delete,
|
||||||
computer_name=self.cifs_server.cifs_server_name,
|
computer_name=self.cifs_server.cifs_server_name,
|
||||||
mover_name=self.mover.mover_name,
|
mover_name=self.mover.mover_name,
|
||||||
@ -2456,7 +2456,7 @@ class CIFSShareTestCase(StorageObjectTestCaseBase):
|
|||||||
context = self.manager.getStorageContext('CIFSShare')
|
context = self.manager.getStorageContext('CIFSShare')
|
||||||
context.conn['XML'].request = utils.EMCMock(side_effect=self.hook)
|
context.conn['XML'].request = utils.EMCMock(side_effect=self.hook)
|
||||||
|
|
||||||
self.assertRaises(exception.EMCVmaxXMLAPIError,
|
self.assertRaises(exception.EMCPowerMaxXMLAPIError,
|
||||||
context.create,
|
context.create,
|
||||||
name=self.cifs_share.share_name,
|
name=self.cifs_share.share_name,
|
||||||
server_name=self.cifs_share.cifs_server_name[-14:],
|
server_name=self.cifs_share.cifs_server_name[-14:],
|
||||||
@ -2506,7 +2506,7 @@ class CIFSShareTestCase(StorageObjectTestCaseBase):
|
|||||||
context = self.manager.getStorageContext('CIFSShare')
|
context = self.manager.getStorageContext('CIFSShare')
|
||||||
context.conn['XML'].request = utils.EMCMock(side_effect=self.hook)
|
context.conn['XML'].request = utils.EMCMock(side_effect=self.hook)
|
||||||
|
|
||||||
self.assertRaises(exception.EMCVmaxXMLAPIError,
|
self.assertRaises(exception.EMCPowerMaxXMLAPIError,
|
||||||
context.delete,
|
context.delete,
|
||||||
name=self.cifs_share.share_name,
|
name=self.cifs_share.share_name,
|
||||||
mover_name=self.vdm.vdm_name,
|
mover_name=self.vdm.vdm_name,
|
||||||
@ -2557,7 +2557,7 @@ class CIFSShareTestCase(StorageObjectTestCaseBase):
|
|||||||
context = self.manager.getStorageContext('CIFSShare')
|
context = self.manager.getStorageContext('CIFSShare')
|
||||||
context.conn['XML'].request = utils.EMCMock(side_effect=self.hook)
|
context.conn['XML'].request = utils.EMCMock(side_effect=self.hook)
|
||||||
|
|
||||||
self.assertRaises(exception.EMCVmaxXMLAPIError,
|
self.assertRaises(exception.EMCPowerMaxXMLAPIError,
|
||||||
context.delete,
|
context.delete,
|
||||||
name=self.cifs_share.share_name,
|
name=self.cifs_share.share_name,
|
||||||
mover_name=self.vdm.vdm_name,
|
mover_name=self.vdm.vdm_name,
|
||||||
@ -2600,7 +2600,7 @@ class CIFSShareTestCase(StorageObjectTestCaseBase):
|
|||||||
context = self.manager.getStorageContext('CIFSShare')
|
context = self.manager.getStorageContext('CIFSShare')
|
||||||
context.conn['SSH'].run_ssh = mock.Mock(side_effect=self.ssh_hook)
|
context.conn['SSH'].run_ssh = mock.Mock(side_effect=self.ssh_hook)
|
||||||
|
|
||||||
self.assertRaises(exception.EMCVmaxXMLAPIError,
|
self.assertRaises(exception.EMCPowerMaxXMLAPIError,
|
||||||
context.disable_share_access,
|
context.disable_share_access,
|
||||||
share_name=self.cifs_share.share_name,
|
share_name=self.cifs_share.share_name,
|
||||||
mover_name=self.vdm.vdm_name)
|
mover_name=self.vdm.vdm_name)
|
||||||
@ -2648,7 +2648,7 @@ class CIFSShareTestCase(StorageObjectTestCaseBase):
|
|||||||
context = self.manager.getStorageContext('CIFSShare')
|
context = self.manager.getStorageContext('CIFSShare')
|
||||||
context.conn['SSH'].run_ssh = mock.Mock(side_effect=self.ssh_hook)
|
context.conn['SSH'].run_ssh = mock.Mock(side_effect=self.ssh_hook)
|
||||||
|
|
||||||
self.assertRaises(exception.EMCVmaxXMLAPIError,
|
self.assertRaises(exception.EMCPowerMaxXMLAPIError,
|
||||||
context.allow_share_access,
|
context.allow_share_access,
|
||||||
mover_name=self.vdm.vdm_name,
|
mover_name=self.vdm.vdm_name,
|
||||||
share_name=self.cifs_share.share_name,
|
share_name=self.cifs_share.share_name,
|
||||||
@ -2725,7 +2725,7 @@ class CIFSShareTestCase(StorageObjectTestCaseBase):
|
|||||||
context = self.manager.getStorageContext('CIFSShare')
|
context = self.manager.getStorageContext('CIFSShare')
|
||||||
context.conn['SSH'].run_ssh = mock.Mock(side_effect=self.ssh_hook)
|
context.conn['SSH'].run_ssh = mock.Mock(side_effect=self.ssh_hook)
|
||||||
|
|
||||||
self.assertRaises(exception.EMCVmaxXMLAPIError,
|
self.assertRaises(exception.EMCPowerMaxXMLAPIError,
|
||||||
context.deny_share_access,
|
context.deny_share_access,
|
||||||
mover_name=self.vdm.vdm_name,
|
mover_name=self.vdm.vdm_name,
|
||||||
share_name=self.cifs_share.share_name,
|
share_name=self.cifs_share.share_name,
|
||||||
@ -2765,7 +2765,7 @@ class CIFSShareTestCase(StorageObjectTestCaseBase):
|
|||||||
context = self.manager.getStorageContext('CIFSShare')
|
context = self.manager.getStorageContext('CIFSShare')
|
||||||
context.conn['SSH'].run_ssh = mock.Mock(side_effect=self.ssh_hook)
|
context.conn['SSH'].run_ssh = mock.Mock(side_effect=self.ssh_hook)
|
||||||
|
|
||||||
self.assertRaises(exception.EMCVmaxXMLAPIError,
|
self.assertRaises(exception.EMCPowerMaxXMLAPIError,
|
||||||
context.get_share_access,
|
context.get_share_access,
|
||||||
mover_name=self.vdm.vdm_name,
|
mover_name=self.vdm.vdm_name,
|
||||||
share_name=self.cifs_share.share_name)
|
share_name=self.cifs_share.share_name)
|
||||||
@ -2822,7 +2822,7 @@ class NFSShareTestCase(StorageObjectTestCaseBase):
|
|||||||
context = self.manager.getStorageContext('NFSShare')
|
context = self.manager.getStorageContext('NFSShare')
|
||||||
context.conn['SSH'].run_ssh = mock.Mock(side_effect=self.ssh_hook)
|
context.conn['SSH'].run_ssh = mock.Mock(side_effect=self.ssh_hook)
|
||||||
|
|
||||||
self.assertRaises(exception.EMCVmaxXMLAPIError,
|
self.assertRaises(exception.EMCPowerMaxXMLAPIError,
|
||||||
context.create,
|
context.create,
|
||||||
name=self.nfs_share.share_name,
|
name=self.nfs_share.share_name,
|
||||||
mover_name=self.vdm.vdm_name)
|
mover_name=self.vdm.vdm_name)
|
||||||
@ -2898,7 +2898,7 @@ class NFSShareTestCase(StorageObjectTestCaseBase):
|
|||||||
context = self.manager.getStorageContext('NFSShare')
|
context = self.manager.getStorageContext('NFSShare')
|
||||||
context.conn['SSH'].run_ssh = mock.Mock(side_effect=self.ssh_hook)
|
context.conn['SSH'].run_ssh = mock.Mock(side_effect=self.ssh_hook)
|
||||||
|
|
||||||
self.assertRaises(exception.EMCVmaxXMLAPIError,
|
self.assertRaises(exception.EMCPowerMaxXMLAPIError,
|
||||||
context.delete,
|
context.delete,
|
||||||
name=self.nfs_share.share_name,
|
name=self.nfs_share.share_name,
|
||||||
mover_name=self.vdm.vdm_name)
|
mover_name=self.vdm.vdm_name)
|
||||||
@ -2956,7 +2956,7 @@ class NFSShareTestCase(StorageObjectTestCaseBase):
|
|||||||
context = self.manager.getStorageContext('NFSShare')
|
context = self.manager.getStorageContext('NFSShare')
|
||||||
context.conn['SSH'].run_ssh = mock.Mock(side_effect=self.ssh_hook)
|
context.conn['SSH'].run_ssh = mock.Mock(side_effect=self.ssh_hook)
|
||||||
|
|
||||||
self.assertRaises(exception.EMCVmaxXMLAPIError,
|
self.assertRaises(exception.EMCPowerMaxXMLAPIError,
|
||||||
context.get,
|
context.get,
|
||||||
name=self.nfs_share.share_name,
|
name=self.nfs_share.share_name,
|
||||||
mover_name=self.vdm.vdm_name)
|
mover_name=self.vdm.vdm_name)
|
||||||
@ -3031,7 +3031,7 @@ class NFSShareTestCase(StorageObjectTestCaseBase):
|
|||||||
context.conn['SSH'].run_ssh = utils.EMCNFSShareMock(
|
context.conn['SSH'].run_ssh = utils.EMCNFSShareMock(
|
||||||
side_effect=self.ssh_hook)
|
side_effect=self.ssh_hook)
|
||||||
|
|
||||||
self.assertRaises(exception.EMCVmaxXMLAPIError,
|
self.assertRaises(exception.EMCPowerMaxXMLAPIError,
|
||||||
context.allow_share_access,
|
context.allow_share_access,
|
||||||
share_name=self.nfs_share.share_name,
|
share_name=self.nfs_share.share_name,
|
||||||
host_ip=self.nfs_share.nfs_host_ip,
|
host_ip=self.nfs_share.nfs_host_ip,
|
||||||
@ -3134,7 +3134,7 @@ class NFSShareTestCase(StorageObjectTestCaseBase):
|
|||||||
context.conn['SSH'].run_ssh = utils.EMCNFSShareMock(
|
context.conn['SSH'].run_ssh = utils.EMCNFSShareMock(
|
||||||
side_effect=self.ssh_hook)
|
side_effect=self.ssh_hook)
|
||||||
|
|
||||||
self.assertRaises(exception.EMCVmaxXMLAPIError,
|
self.assertRaises(exception.EMCPowerMaxXMLAPIError,
|
||||||
context.deny_share_access,
|
context.deny_share_access,
|
||||||
share_name=self.nfs_share.share_name,
|
share_name=self.nfs_share.share_name,
|
||||||
host_ip=self.nfs_share.nfs_host_ip,
|
host_ip=self.nfs_share.nfs_host_ip,
|
||||||
@ -3157,7 +3157,7 @@ class NFSShareTestCase(StorageObjectTestCaseBase):
|
|||||||
context.conn['SSH'].run_ssh = utils.EMCNFSShareMock(
|
context.conn['SSH'].run_ssh = utils.EMCNFSShareMock(
|
||||||
side_effect=self.ssh_hook)
|
side_effect=self.ssh_hook)
|
||||||
|
|
||||||
self.assertRaises(exception.EMCVmaxXMLAPIError,
|
self.assertRaises(exception.EMCPowerMaxXMLAPIError,
|
||||||
context.deny_share_access,
|
context.deny_share_access,
|
||||||
share_name=self.nfs_share.share_name,
|
share_name=self.nfs_share.share_name,
|
||||||
host_ip=self.nfs_share.nfs_host_ip,
|
host_ip=self.nfs_share.nfs_host_ip,
|
||||||
@ -3176,7 +3176,7 @@ class NFSShareTestCase(StorageObjectTestCaseBase):
|
|||||||
context = self.manager.getStorageContext('NFSShare')
|
context = self.manager.getStorageContext('NFSShare')
|
||||||
context.conn['SSH'].run_ssh = mock.Mock(side_effect=self.ssh_hook)
|
context.conn['SSH'].run_ssh = mock.Mock(side_effect=self.ssh_hook)
|
||||||
|
|
||||||
self.assertRaises(exception.EMCVmaxXMLAPIError,
|
self.assertRaises(exception.EMCPowerMaxXMLAPIError,
|
||||||
context.clear_share_access,
|
context.clear_share_access,
|
||||||
share_name=self.nfs_share.share_name,
|
share_name=self.nfs_share.share_name,
|
||||||
mover_name=self.vdm.vdm_name,
|
mover_name=self.vdm.vdm_name,
|
@ -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.
|
@ -82,7 +82,7 @@ manila.share.drivers.dell_emc.plugins =
|
|||||||
vnx = manila.share.drivers.dell_emc.plugins.vnx.connection:VNXStorageConnection
|
vnx = manila.share.drivers.dell_emc.plugins.vnx.connection:VNXStorageConnection
|
||||||
unity = manila.share.drivers.dell_emc.plugins.unity.connection:UnityStorageConnection
|
unity = manila.share.drivers.dell_emc.plugins.unity.connection:UnityStorageConnection
|
||||||
isilon = manila.share.drivers.dell_emc.plugins.isilon.isilon:IsilonStorageConnection
|
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 =
|
manila.tests.scheduler.fakes =
|
||||||
FakeWeigher1 = manila.tests.scheduler.fakes:FakeWeigher1
|
FakeWeigher1 = manila.tests.scheduler.fakes:FakeWeigher1
|
||||||
FakeWeigher2 = manila.tests.scheduler.fakes:FakeWeigher2
|
FakeWeigher2 = manila.tests.scheduler.fakes:FakeWeigher2
|
||||||
|
Loading…
Reference in New Issue
Block a user