From 47a53197c3005d368af4b8ef6e3a3340e517482e Mon Sep 17 00:00:00 2001 From: "ying.yunlong" Date: Tue, 15 Aug 2017 15:55:47 +0800 Subject: [PATCH] Add code logic of tosca parser In ONAP R1, VFC project will use nfv tosca parser to parse csar package, init the directory and file at the first time. Change-Id: I826c8f485e0254832ca3b5b4d2808410eb5b7687 Issue-ID: VFC-97 Signed-off-by: ying.yunlong --- .gitignore | 3 ++- lcm/pub/utils/toscaparser/__init__.py | 19 +++++++++++++++++++ lcm/pub/utils/toscaparser/convert.py | 13 +++++++++++++ lcm/pub/utils/toscaparser/parser.py | 13 +++++++++++++ 4 files changed, 47 insertions(+), 1 deletion(-) create mode 100644 lcm/pub/utils/toscaparser/__init__.py create mode 100644 lcm/pub/utils/toscaparser/convert.py create mode 100644 lcm/pub/utils/toscaparser/parser.py diff --git a/.gitignore b/.gitignore index 821f62a6..67c551bb 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ logs/*.log -*.pyc \ No newline at end of file +*.pyc +.idea \ No newline at end of file diff --git a/lcm/pub/utils/toscaparser/__init__.py b/lcm/pub/utils/toscaparser/__init__.py new file mode 100644 index 00000000..a2564f74 --- /dev/null +++ b/lcm/pub/utils/toscaparser/__init__.py @@ -0,0 +1,19 @@ +# Copyright 2017 ZTE Corporation. +# +# 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. + +def parse_nsd(path, input_parameters=[]): + pass + +def parse_vnfd(path, input_parameters=[]): + pass \ No newline at end of file diff --git a/lcm/pub/utils/toscaparser/convert.py b/lcm/pub/utils/toscaparser/convert.py new file mode 100644 index 00000000..5399fe66 --- /dev/null +++ b/lcm/pub/utils/toscaparser/convert.py @@ -0,0 +1,13 @@ +# Copyright 2017 ZTE Corporation. +# +# 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. diff --git a/lcm/pub/utils/toscaparser/parser.py b/lcm/pub/utils/toscaparser/parser.py new file mode 100644 index 00000000..5399fe66 --- /dev/null +++ b/lcm/pub/utils/toscaparser/parser.py @@ -0,0 +1,13 @@ +# Copyright 2017 ZTE Corporation. +# +# 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. -- 2.16.6