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=========================================================
20 from config import Config, VariablesDict
21 from create_cloud_regions import update_connectivity_info, is_k8s_region
23 logger = logging.getLogger()
24 logger.setLevel(logging.DEBUG)
28 config = Config(env_dict=VariablesDict.env_variable)
29 for region in config.cloud_regions:
30 if is_k8s_region(region):
31 update_connectivity_info(region)
34 if __name__ == "__main__":
35 sh = logging.StreamHandler()
36 sh_formatter = logging.Formatter('%(asctime)s %(levelname)s %(lineno)d:%(filename)s(%(process)d) - %(message)s')
37 sh.setFormatter(sh_formatter)