aboutsummaryrefslogtreecommitdiffstats
path: root/components/scripts
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/scripts
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/scripts')
-rw-r--r--components/scripts/python/ccsdk_blueprints/abstract_blueprint_function.py4
-rw-r--r--components/scripts/python/ccsdk_blueprints/abstract_ra_processor.py6
-rw-r--r--components/scripts/python/ccsdk_blueprints/sample_blueprint_component.py8
-rw-r--r--components/scripts/python/ccsdk_blueprints/sample_ra_processor_function.py8
4 files changed, 13 insertions, 13 deletions
diff --git a/components/scripts/python/ccsdk_blueprints/abstract_blueprint_function.py b/components/scripts/python/ccsdk_blueprints/abstract_blueprint_function.py
index a9d4d454e..916ef9b43 100644
--- a/components/scripts/python/ccsdk_blueprints/abstract_blueprint_function.py
+++ b/components/scripts/python/ccsdk_blueprints/abstract_blueprint_function.py
@@ -7,9 +7,9 @@ class AbstractPythonComponentFunction(AbstractComponentFunction):
AbstractComponentFunction.__init__(self)
def process(self, execution_request):
- print "Processing calling from parent..."
+ print("Processing calling from parent...")
return None
def recover(self, runtime_exception, execution_request):
- print "Recovering calling from parent..."
+ print("Recovering calling from parent...")
return None
diff --git a/components/scripts/python/ccsdk_blueprints/abstract_ra_processor.py b/components/scripts/python/ccsdk_blueprints/abstract_ra_processor.py
index 05fe2e082..9f0fd4a71 100644
--- a/components/scripts/python/ccsdk_blueprints/abstract_ra_processor.py
+++ b/components/scripts/python/ccsdk_blueprints/abstract_ra_processor.py
@@ -9,11 +9,11 @@ from org.onap.ccsdk.cds.controllerblueprints.core import \
class AbstractRAProcessor(ResourceAssignmentProcessor):
def process(self, resource_assignment):
- print "Processing.."
+ print("Processing..")
return None
def recover(self, runtime_exception, resource_assignment):
- print "Recovering.."
+ print("Recovering..")
return None
def set_resource_data_value(self, resource_assignment, value):
@@ -24,6 +24,6 @@ class AbstractRAProcessor(ResourceAssignmentProcessor):
else:
ResourceAssignmentUtils.Companion.setFailedResourceDataValue(
resource_assignment, "Fail to resolve value")
- except BluePrintProcessorException, err:
+ except BluePrintProcessorException as err:
raise BluePrintProcessorException(
"Error on resource assignment. Message = " + err.message)
diff --git a/components/scripts/python/ccsdk_blueprints/sample_blueprint_component.py b/components/scripts/python/ccsdk_blueprints/sample_blueprint_component.py
index a1e6c5d3b..ca0be5761 100644
--- a/components/scripts/python/ccsdk_blueprints/sample_blueprint_component.py
+++ b/components/scripts/python/ccsdk_blueprints/sample_blueprint_component.py
@@ -1,5 +1,5 @@
-from abstract_blueprint_function import AbstractPythonComponentFunction
-from blueprint_constants import *
+from .abstract_blueprint_function import AbstractPythonComponentFunction
+from .blueprint_constants import *
class SampleBlueprintComponent(AbstractPythonComponentFunction):
@@ -9,10 +9,10 @@ class SampleBlueprintComponent(AbstractPythonComponentFunction):
def process(self, execution_request):
super(SamplePythonComponentNode, self).process(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):
super(SamplePythonComponentNode, self).recover(runtime_exception, execution_request)
- print "Recovering calling..." + PROPERTY_BLUEPRINT_BASE_PATH
+ print("Recovering calling..." + PROPERTY_BLUEPRINT_BASE_PATH)
return None
diff --git a/components/scripts/python/ccsdk_blueprints/sample_ra_processor_function.py b/components/scripts/python/ccsdk_blueprints/sample_ra_processor_function.py
index fa821082e..5e789815b 100644
--- a/components/scripts/python/ccsdk_blueprints/sample_ra_processor_function.py
+++ b/components/scripts/python/ccsdk_blueprints/sample_ra_processor_function.py
@@ -1,14 +1,14 @@
-from abstract_ra_processor import AbstractRAProcessor
-from blueprint_constants import *
+from .abstract_ra_processor import AbstractRAProcessor
+from .blueprint_constants import *
class SampleRAProcessorFunction(AbstractRAProcessor):
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