aboutsummaryrefslogtreecommitdiffstats
path: root/components/model-catalog/blueprint-model/test-blueprint/capability_python
diff options
context:
space:
mode:
authorDan Timoney <dtimoney@att.com>2023-06-14 17:07:55 -0400
committerDan Timoney <dtimoney@att.com>2023-06-14 17:07:55 -0400
commit2593494642c8f425f5e6897241312006563797b1 (patch)
tree7b0311126f48415263ab3f011851a6dbf9b14598 /components/model-catalog/blueprint-model/test-blueprint/capability_python
parent5e9a1da4ef37b6b47ba428325478b79466d7d181 (diff)
Convert scripts to python3
Convert python2 scripts to python3 Issue-ID: CCSDK-3906 Signed-off-by: Dan Timoney <dtimoney@att.com> Change-Id: I68b82108c5cd51a99735f65f964b8ebc16181c1b
Diffstat (limited to 'components/model-catalog/blueprint-model/test-blueprint/capability_python')
-rwxr-xr-xcomponents/model-catalog/blueprint-model/test-blueprint/capability_python/Scripts/python/DefaultGetNetConfig.py4
-rwxr-xr-xcomponents/model-catalog/blueprint-model/test-blueprint/capability_python/Scripts/python/SamplePythonComponentNode.py4
-rwxr-xr-xcomponents/model-catalog/blueprint-model/test-blueprint/capability_python/Scripts/python/SampleRAProcessor.py4
3 files changed, 6 insertions, 6 deletions
diff --git a/components/model-catalog/blueprint-model/test-blueprint/capability_python/Scripts/python/DefaultGetNetConfig.py b/components/model-catalog/blueprint-model/test-blueprint/capability_python/Scripts/python/DefaultGetNetConfig.py
index 5038caa77..15eb38c16 100755
--- a/components/model-catalog/blueprint-model/test-blueprint/capability_python/Scripts/python/DefaultGetNetConfig.py
+++ b/components/model-catalog/blueprint-model/test-blueprint/capability_python/Scripts/python/DefaultGetNetConfig.py
@@ -37,12 +37,12 @@ class DefaultGetNetConfig(AbstractPythonComponentFunction):
if (deviceResponse.status != netconf_constant.STATUS_SUCCESS and deviceResponse.errorMessage != 'null'):
errorMessage = "Get Running Config Failure ::"+ deviceResponse.errorMessage
- except Exception, err:
+ except Exception as err:
log.info("Exception in the script {}",err.getMessage())
status = netconf_constant.STATUS_FAILURE
errorMessage = "Get Running Config Failure ::"+err.getMessage()
def recover(self, runtime_exception, execution_request):
- print "Recovering calling.." + PROPERTY_BLUEPRINT_BASE_PATH
+ print("Recovering calling.." + PROPERTY_BLUEPRINT_BASE_PATH)
return None
diff --git a/components/model-catalog/blueprint-model/test-blueprint/capability_python/Scripts/python/SamplePythonComponentNode.py b/components/model-catalog/blueprint-model/test-blueprint/capability_python/Scripts/python/SamplePythonComponentNode.py
index 86c9ff141..1ee41825d 100755
--- a/components/model-catalog/blueprint-model/test-blueprint/capability_python/Scripts/python/SamplePythonComponentNode.py
+++ b/components/model-catalog/blueprint-model/test-blueprint/capability_python/Scripts/python/SamplePythonComponentNode.py
@@ -5,9 +5,9 @@ from blueprint_constants import *
class SamplePythonComponentNode(JythonComponentFunction):
def process(self, execution_request):
- print "Processing calling..." + PROPERTY_BLUEPRINT_BASE_PATH
+ print("Processing calling..." + PROPERTY_BLUEPRINT_BASE_PATH)
return None
def recover(self, runtime_exception, execution_request):
- print "Recovering calling..." + PROPERTY_BLUEPRINT_BASE_PATH
+ print("Recovering calling..." + PROPERTY_BLUEPRINT_BASE_PATH)
return None
diff --git a/components/model-catalog/blueprint-model/test-blueprint/capability_python/Scripts/python/SampleRAProcessor.py b/components/model-catalog/blueprint-model/test-blueprint/capability_python/Scripts/python/SampleRAProcessor.py
index acf12b333..c76c589c2 100755
--- a/components/model-catalog/blueprint-model/test-blueprint/capability_python/Scripts/python/SampleRAProcessor.py
+++ b/components/model-catalog/blueprint-model/test-blueprint/capability_python/Scripts/python/SampleRAProcessor.py
@@ -8,10 +8,10 @@ class SampleRAProcessor(AbstractRAProcessor):
AbstractRAProcessor.__init__(self)
def process(self, resource_assignment):
- print "Processing calling.." + PROPERTY_BLUEPRINT_BASE_PATH
+ print("Processing calling.." + PROPERTY_BLUEPRINT_BASE_PATH)
self.set_resource_data_value(resource_assignment, "")
return None
def recover(self, runtime_exception, resource_assignment):
- print "Recovering calling.." + PROPERTY_BLUEPRINT_BASE_PATH
+ print("Recovering calling.." + PROPERTY_BLUEPRINT_BASE_PATH)
return None