Skip to content

Commit

Permalink
class-generator: remove minimum cluster version in update-schema (#2080)
Browse files Browse the repository at this point in the history
  • Loading branch information
myakove authored Aug 27, 2024
1 parent 0afd4bb commit d697808
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions class_generator/class_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import sys
import requests
from pathlib import Path
from packaging.version import Version

import textwrap
from typing import Any, Dict, List, Tuple
Expand Down Expand Up @@ -149,20 +148,9 @@ def get_client_binary() -> str:
sys.exit(1)


def check_minimum_cluster_version(client) -> None:
cluster_version = get_server_version(client=client)
minimum_server_version = "v1.30.0"
if Version(cluster_version) < Version(minimum_server_version):
LOGGER.error(
f"Server version {cluster_version} is not supported. Minimum supported version is {minimum_server_version}"
)
sys.exit(1)


def update_kind_schema():
openapi2jsonschema_str: str = "openapi2jsonschema"
client = get_client_binary()
check_minimum_cluster_version(client=client)

if not run_command(command=shlex.split("which openapi2jsonschema"), check=False, log_errors=False)[0]:
LOGGER.error(
Expand Down

0 comments on commit d697808

Please sign in to comment.