From 9920eb9edc9707270e20a9286774f20f95fc7cca Mon Sep 17 00:00:00 2001 From: "Glenn M. Gobeli" Date: Fri, 21 Mar 2014 10:05:07 -0400 Subject: [PATCH] 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 --- cinder/volume/drivers/netapp/api.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) 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): -- 2.45.2