Wei-Yu Chen | ad55cb8 | 2022-02-15 20:07:01 +0800 | [diff] [blame] | 1 | # SPDX-FileCopyrightText: 2020 The Magma Authors. |
| 2 | # SPDX-FileCopyrightText: 2022 Open Networking Foundation <support@opennetworking.org> |
| 3 | # |
| 4 | # SPDX-License-Identifier: BSD-3-Clause |
Wei-Yu Chen | 49950b9 | 2021-11-08 19:19:18 +0800 | [diff] [blame] | 5 | |
| 6 | import os |
| 7 | |
| 8 | |
| 9 | def is_dev_mode() -> bool: |
| 10 | """ |
| 11 | Returns whether the environment is set for dev mode |
| 12 | """ |
| 13 | return os.environ.get('MAGMA_DEV_MODE') == '1' |
| 14 | |
| 15 | |
| 16 | def is_docker_network_mode() -> bool: |
| 17 | """ |
| 18 | Returns whether the environment is set for dev mode |
| 19 | """ |
| 20 | return os.environ.get('DOCKER_NETWORK_MODE') == '1' |