Fix for x86_64 build fail
[platform/upstream/connectedhomeip.git] / src / test_driver / happy / lib / ChipState.py
1 #!/usr/bin/env python3
2
3 #
4 #    Copyright (c) 2020 Project CHIP Authors
5 #    Copyright (c) 2015-2018 Nest Labs, Inc.
6 #    All rights reserved.
7 #
8 #    Licensed under the Apache License, Version 2.0 (the "License");
9 #    you may not use this file except in compliance with the License.
10 #    You may obtain a copy of the License at
11 #
12 #        http://www.apache.org/licenses/LICENSE-2.0
13 #
14 #    Unless required by applicable law or agreed to in writing, software
15 #    distributed under the License is distributed on an "AS IS" BASIS,
16 #    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 #    See the License for the specific language governing permissions and
18 #    limitations under the License.
19 #
20
21 ##
22 #    @file
23 #       Implements ChipState class that implements methods to retrieve
24 #       parts of state setup that relate to Chip plugin.
25 #
26
27 import json
28 from happy.State import State
29 from happy.utils.IP import IP
30
31 options = {}
32 options["quiet"] = False
33
34
35 def option():
36     return options.copy()
37
38
39 class ChipState(State):
40     """
41     Displays CHIP-related parameters for CHIP nodes in a Happy network
42     topology.
43     chip-state [-h --help] [-q --quiet]
44     Examples:
45     $ chip-state
46         Displays CHIP-related parameters for all CHIP nodes in the
47         current Happy topology.
48     return:
49         0    success
50         1    fail
51     """
52
53     def __init__(self, opts=options):
54         State.__init__(self)
55         self.quiet = opts["quiet"]