From: Glenn M. Gobeli Date: Fri, 21 Mar 2014 14:05:07 +0000 (-0400) Subject: Changes to correct name of missing NetApp license. X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=9920eb9edc9707270e20a9286774f20f95fc7cca;p=openstack-build%2Fcinder-build.git Changes to correct name of missing NetApp license. Change to have the NetApp ZAPI error of "SIS clone not licensed" refer to the correct NetApp license of "FlexClone not licensed". This code path is encountered when the NetApp 7mode driver uses the clone interface for snapshotting or cloning. Change-Id: I3e4d07d38870928a324ad044e03938826b0d0a98 Closes-Bug: #1295349 --- diff --git a/cinder/volume/drivers/netapp/api.py b/cinder/volume/drivers/netapp/api.py index 8e99b7e62..6494f12df 100644 --- a/cinder/volume/drivers/netapp/api.py +++ b/cinder/volume/drivers/netapp/api.py @@ -26,6 +26,8 @@ from cinder.openstack.common import log as logging LOG = logging.getLogger(__name__) +ESIS_CLONE_NOT_LICENSED = '14956' + class NaServer(object): """Encapsulates server connection logic.""" @@ -214,9 +216,12 @@ class NaServer(object): code = result.get_attr('errno')\ or result.get_child_content('errorno')\ or 'ESTATUSFAILED' - msg = result.get_attr('reason')\ - or result.get_child_content('reason')\ - or 'Execution status is failed due to unknown reason' + if code == ESIS_CLONE_NOT_LICENSED: + msg = 'Clone operation failed: FlexClone not licensed.' + else: + msg = result.get_attr('reason')\ + or result.get_child_content('reason')\ + or 'Execution status is failed due to unknown reason' raise NaApiError(code, msg) def _create_request(self, na_element, enable_tunneling=False):