1 # ============LICENSE_START=======================================================
2 # Copyright (C) 2021 Orange
3 # ================================================================================
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at
8 # http://www.apache.org/licenses/LICENSE-2.0
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
16 # ============LICENSE_END=========================================================
21 from io import BytesIO
23 from onapsdk.cds import Blueprint
25 from config import Config
27 logger = logging.getLogger("")
28 logger.setLevel(logging.DEBUG)
29 fh = logging.StreamHandler()
30 fh_formatter = logging.Formatter('%(asctime)s %(levelname)s %(lineno)d:%(filename)s(%(process)d) - %(message)s')
31 fh.setFormatter(fh_formatter)
36 mypath = os.path.dirname(os.path.realpath(__file__))
37 file_path = os.path.join(mypath, file)
39 with zipfile.ZipFile(file_path, 'r') as package:
40 cba_io = BytesIO(package.read("CBA.zip"))
42 blueprint = Blueprint(cba_io)
44 except FileNotFoundError:
45 logger.error("Error - File Not Found")
50 update_cba(Config.VSPFILE)
53 if __name__ == "__main__":