Skip to content

Commit

Permalink
testing the current version (#119)
Browse files Browse the repository at this point in the history

Signed-off-by: Tullio Sebastiani <[email protected]>
  • Loading branch information
tsebastiani authored Aug 13, 2024
1 parent 1051a31 commit aceeef4
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,4 @@ The documentation is automatically generated by [Sphinx](https://www.sphinx-doc.
of the [reStructuredText Docstring Format](https://peps.python.org/pep-0287/) comments present in the code.



3 changes: 1 addition & 2 deletions src/krkn_lib/k8s/krkn_kubernetes.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,8 +219,7 @@ def get_kubeconfig_path(self) -> str:
kubeconfig.close()
return kubeconfig_path

def get_version(self) -> str:

def get_version(self) -> str:
try:
api_response = self.version_client.get_code()
major_version = api_response.major
Expand Down
10 changes: 5 additions & 5 deletions src/krkn_lib/models/telemetry/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ class ChaosRunTelemetry:

affected_pods: PodsStatus = PodsStatus()

def __init__(self, json_object: any = None):
def __init__(self, json_dict: any = None):
self.scenarios = list[ScenarioTelemetry]()
self.node_summary_infos = list[NodeInfo]()
self.node_taints = list[Taint]()
Expand All @@ -227,8 +227,8 @@ def __init__(self, json_object: any = None):
self.timestamp = datetime.now(timezone.utc).strftime(
"%Y-%m-%dT%H:%M:%SZ"
)
if json_object is not None:
scenarios = json_object.get("scenarios")
if json_dict is not None:
scenarios = json_dict.get("scenarios")
if scenarios is None or isinstance(scenarios, list) is False:
raise Exception("scenarios param must be a list of object")
for scenario in scenarios:
Expand All @@ -248,8 +248,8 @@ def __init__(self, json_object: any = None):
self.kubernetes_objects_count = json_dict.get(
"kubernetes_objects_count"
)
self.network_plugins = json_object.get("network_plugins")
self.run_uuid = json_object.get("run_uuid")
self.network_plugins = json_dict.get("network_plugins")
self.run_uuid = json_dict.get("run_uuid")

def to_json(self) -> str:
return json.dumps(self, default=lambda o: o.__dict__, indent=4)
Expand Down

0 comments on commit aceeef4

Please sign in to comment.