diff --git a/bin/cloudnet/tosca/tosca_diagrams.py b/bin/cloudnet/tosca/tosca_diagrams.py index 8779c35..1dcdc50 100644 --- a/bin/cloudnet/tosca/tosca_diagrams.py +++ b/bin/cloudnet/tosca/tosca_diagrams.py @@ -2,7 +2,7 @@ # # Software Name : Cloudnet TOSCA toolbox # Version: 1.0 -# SPDX-FileCopyrightText: Copyright (c) 2020-22 Orange +# SPDX-FileCopyrightText: Copyright (c) 2020-24 Orange # SPDX-License-Identifier: Apache-2.0 # # This software is distributed under the Apache License 2.0 @@ -185,7 +185,7 @@ def generation(self): node_name, ": ", short_type_name(node_type), - '|\l\l\l\l" shape=record style=rounded]', + '|\\l\\l\\l\\l" shape=record style=rounded]', sep="", ) for capability_name, capability_yaml in syntax.get_capabilities( diff --git a/bin/cloudnet/tosca/type_system.py b/bin/cloudnet/tosca/type_system.py index 8e51002..532c750 100644 --- a/bin/cloudnet/tosca/type_system.py +++ b/bin/cloudnet/tosca/type_system.py @@ -2,7 +2,7 @@ # # Software Name : Cloudnet TOSCA toolbox # Version: 1.0 -# SPDX-FileCopyrightText: Copyright (c) 2020-22 Orange +# SPDX-FileCopyrightText: Copyright (c) 2020-24 Orange # SPDX-License-Identifier: Apache-2.0 # # This software is distributed under the Apache License 2.0 @@ -346,7 +346,7 @@ def array_to_string_with_or_separator(a_list): return str(a_list).replace("['", "").replace("']", "").replace("', '", " or ") -SCALAR_UNIT_RE = re.compile("^([0-9]+(\.[0-9]+)?)( )*([A-Za-z]+)$") +SCALAR_UNIT_RE = re.compile("^([0-9]+(\\.[0-9]+)?)( )*([A-Za-z]+)$") def split_scalar_unit(a_string, units): @@ -380,7 +380,7 @@ def normalize_scalar_unit(a_string, units): return scalar * units.get(unit) -VERSION_RE = re.compile("^([0-9]+)\.([0-9]+)(((\.[0-9]+)?)(\.[A-Za-z]+(\-[0-9]+)?)?)?$") +VERSION_RE = re.compile("^([0-9]+)\\.([0-9]+)(((\\.[0-9]+)?)(\\.[A-Za-z]+(\\-[0-9]+)?)?)?$") def check_version(a_string): diff --git a/bin/cloudnet/tosca/utils.py b/bin/cloudnet/tosca/utils.py index 1e2beb9..cad0316 100644 --- a/bin/cloudnet/tosca/utils.py +++ b/bin/cloudnet/tosca/utils.py @@ -2,7 +2,7 @@ # # Software Name : Cloudnet TOSCA toolbox # Version: 1.0 -# SPDX-FileCopyrightText: Copyright (c) 2020 Orange +# SPDX-FileCopyrightText: Copyright (c) 2020-24 Orange # SPDX-License-Identifier: Apache-2.0 # # This software is distributed under the Apache License 2.0 @@ -15,7 +15,7 @@ import re -SCALAR_UNIT_RE = re.compile("^([0-9]+(\.[0-9]+)?)( )*([A-Za-z]+)$") +SCALAR_UNIT_RE = re.compile("^([0-9]+(\\.[0-9]+)?)( )*([A-Za-z]+)$") def split_scalar_unit(scalar):