From e7486cf8acafad5ce03979a8d3b426266cf7437b Mon Sep 17 00:00:00 2001
From: armingol <pablo.armingolrobles@telefonica.com>
Date: Fri, 14 Feb 2025 11:56:23 +0100
Subject: [PATCH] Code CleanUP

---
 .../drivers/openconfig/OpenConfigDriver.py       |  2 +-
 .../drivers/openconfig/templates/Namespace.py    |  2 +-
 .../drivers/openconfig/templates/__init__.py     |  2 +-
 .../openconfig/templates/photonpath/get.xml      |  1 -
 .../service/templates/device/amplifier.html      | 16 ++++++++++++++++
 5 files changed, 19 insertions(+), 4 deletions(-)

diff --git a/src/device/service/drivers/openconfig/OpenConfigDriver.py b/src/device/service/drivers/openconfig/OpenConfigDriver.py
index 378ea1957..f15ea649a 100644
--- a/src/device/service/drivers/openconfig/OpenConfigDriver.py
+++ b/src/device/service/drivers/openconfig/OpenConfigDriver.py
@@ -319,7 +319,7 @@ class OpenConfigDriver(_Driver):
                 try:
                     chk_string(str_resource_name, resource_key, allow_empty=False)
                     str_filter = get_filter(resource_key)
-                    self.__logger.debug('[GetConfig] str_filter = {:s}'.format(str(str_filter)))
+                    # self.__logger.debug('[GetConfig] str_filter = {:s}'.format(str(str_filter)))
                     if str_filter is None: str_filter = resource_key
                     if self.__netconf_handler.vendor == 'PHOTONPATH' and not 'amplifier' in str(str_filter): continue
                     xml_data = self.__netconf_handler.get(filter=str_filter).data_ele
diff --git a/src/device/service/drivers/openconfig/templates/Namespace.py b/src/device/service/drivers/openconfig/templates/Namespace.py
index 170160d66..b79386cb3 100644
--- a/src/device/service/drivers/openconfig/templates/Namespace.py
+++ b/src/device/service/drivers/openconfig/templates/Namespace.py
@@ -47,5 +47,5 @@ NAMESPACES = {
     'ocrp' : NAMESPACE_ROUTING_POLICY,
     'ocv'  : NAMESPACE_VLAN,
     'ocptr': NAMESPACE_PLATFORM_TRANSCEIVER,
-    'ocpp' : NAMESPACE_PHOTONPATH
+    'ocpp' : NAMESPACE_PHOTONPATH,
 }
diff --git a/src/device/service/drivers/openconfig/templates/__init__.py b/src/device/service/drivers/openconfig/templates/__init__.py
index 57934b149..eecfa91fd 100644
--- a/src/device/service/drivers/openconfig/templates/__init__.py
+++ b/src/device/service/drivers/openconfig/templates/__init__.py
@@ -40,7 +40,7 @@ ALL_RESOURCE_KEYS = [
     RESOURCE_ROUTING_POLICIES,      # routing policies should come before network instances
     RESOURCE_NETWORK_INSTANCES,
     RESOURCE_ACL,
-    RESOURCE_PHOTONPATH
+    RESOURCE_PHOTONPATH,
 ]
 
 RESOURCE_KEY_MAPPINGS = {
diff --git a/src/device/service/drivers/openconfig/templates/photonpath/get.xml b/src/device/service/drivers/openconfig/templates/photonpath/get.xml
index 7ee85a4c6..5be71d372 100644
--- a/src/device/service/drivers/openconfig/templates/photonpath/get.xml
+++ b/src/device/service/drivers/openconfig/templates/photonpath/get.xml
@@ -1,3 +1,2 @@
 <amplifier-ols xmlns="http://photon-path.com/yang/optical-amplifier">
-
 </amplifier-ols>
diff --git a/src/webui/service/templates/device/amplifier.html b/src/webui/service/templates/device/amplifier.html
index a9ae90a29..24724ad9f 100644
--- a/src/webui/service/templates/device/amplifier.html
+++ b/src/webui/service/templates/device/amplifier.html
@@ -1,3 +1,19 @@
+<!--
+    Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/)
+   
+    Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+   
+         http://www.apache.org/licenses/LICENSE-2.0
+   
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+   -->
+
 {% extends 'base.html' %}
 
 {% block content %}
-- 
GitLab