-
Notifications
You must be signed in to change notification settings - Fork 170
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Example runbook example, dev: mock_tcp_ping: True jump_boxes: - private_key_file: $(admin_private_key_file) address: 20.236.23.33 - private_key_file: $(admin_private_key_file) address: 20.236.23.40
- Loading branch information
1 parent
650bf3f
commit 2778cff
Showing
4 changed files
with
164 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# Copyright (c) Microsoft Corporation. | ||
# Licensed under the MIT license. | ||
|
||
|
||
from typing import List, Optional | ||
|
||
from lisa import schema | ||
|
||
_development_settings: Optional[schema.Development] = None | ||
|
||
|
||
def load_development_settings(runbook: Optional[schema.Development]) -> None: | ||
global _development_settings | ||
if runbook and runbook.enabled: | ||
_development_settings = runbook | ||
|
||
|
||
def is_mock_tcp_ping() -> bool: | ||
return _development_settings is not None and _development_settings.mock_tcp_ping | ||
|
||
|
||
def is_trace_enabled() -> bool: | ||
return _development_settings is not None and _development_settings.enable_trace | ||
|
||
|
||
def get_jump_boxes() -> List[schema.ProxyConnectionInfo]: | ||
if _development_settings and _development_settings.jump_boxes: | ||
return _development_settings.jump_boxes | ||
else: | ||
return [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters