1#!/usr/bin/env python 2# -*- coding: utf-8 -*- 3 4# 5# Copyright (c) 2020 Huawei Device Co., Ltd. 6# Licensed under the Apache License, Version 2.0 (the "License"); 7# you may not use this file except in compliance with the License. 8# You may obtain a copy of the License at 9# 10# http://www.apache.org/licenses/LICENSE-2.0 11# 12# Unless required by applicable law or agreed to in writing, software 13# distributed under the License is distributed on an "AS IS" BASIS, 14# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15# See the License for the specific language governing permissions and 16# limitations under the License. 17# 18 19from hb_internal import CONFIG_JSON 20from hb_internal.common.utils import read_json_file 21from hb_internal.common.utils import hb_info 22 23 24def add_options(parser): 25 pass 26 27 28def exec_command(args): 29 json_data = read_json_file(CONFIG_JSON) 30 root_path = json_data.get('root_path', 'not set') 31 board = json_data.get('board', 'not set') 32 kernel = json_data.get('kernel', 'not set') 33 product = json_data.get('product', 'not set') 34 product_path = json_data.get('product_path', 'not set') 35 device_path = json_data.get('device_path', 'not set') 36 device_company = json_data.get('device_company', 'not set') 37 38 hb_info('root path: {}'.format(root_path)) 39 hb_info('board: {}'.format(board)) 40 hb_info('kernel: {}'.format(kernel)) 41 hb_info('product: {}'.format(product)) 42 hb_info('product path: {}'.format(product_path)) 43 hb_info('device path: {}'.format(device_path)) 44 hb_info('device company: {}'.format(device_company)) 45