Skip to content
Snippets Groups Projects

Resolve: "(CNIT) Multi-Granular Optical Nodes and Optical Transpoders management"

Merged Lluis Gifre Renom requested to merge cnit_related_activity into develop
34 files
+ 47
36
Compare changes
  • Side-by-side
  • Inline
Files
34
# Copyright 2022-2024 ETSI OSG/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.
from common.method_wrappers.ServiceExceptions import InvalidArgumentsException
from typing import Optional, Union
@@ -34,8 +48,6 @@ def get_uuid_random() -> str:
def channel_get_uuid(
channel_name :str , allow_random : bool = False
) -> str:
if len(channel_name) > 0:
return get_uuid_from_string(channel_name)
if allow_random: return get_uuid_random()
@@ -56,7 +68,6 @@ def device_get_uuid (device_name) :
def opticalconfig_get_uuid(
device_name : str = '', allow_random : bool = False
) -> str:
if len(device_name) > 0:
device_uuid= device_get_uuid(device_name=device_name)
return get_uuid_from_string(f"{device_uuid}_opticalconfig")
Loading