This repository was archived by the owner on Jan 23, 2026. It is now read-only.
File tree Expand file tree Collapse file tree
jumpstarter-cli-admin/jumpstarter_cli_admin
jumpstarter-kubernetes/jumpstarter_kubernetes
jumpstarter/jumpstarter/common Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33import asyncclick as click
44from jumpstarter_cli_common .opt import opt_context , opt_kubeconfig
55from jumpstarter_cli_common .version import get_client_version
6- from jumpstarter_kubernetes import get_ip_address , helm_installed , install_helm_chart
6+ from jumpstarter_kubernetes import helm_installed , install_helm_chart
7+
8+ from jumpstarter .common .ipaddress import get_ip_address
79
810
911def get_chart_version () -> str :
Original file line number Diff line number Diff line change 66 V1Alpha1ExporterList ,
77 V1Alpha1ExporterStatus ,
88)
9- from .install import get_ip_address , helm_installed , install_helm_chart
9+ from .install import helm_installed , install_helm_chart
1010from .leases import (
1111 LeasesV1Alpha1Api ,
1212 V1Alpha1Lease ,
3434 "V1Alpha1LeaseSelector" ,
3535 "V1Alpha1LeaseSpec" ,
3636 "V1Alpha1List" ,
37- "get_ip_address" ,
3837 "helm_installed" ,
3938 "install_helm_chart" ,
4039]
Original file line number Diff line number Diff line change 11import asyncio
22import shutil
3- import socket
43from typing import Literal , Optional
54
65
7- def get_ip_address () -> str :
8- """Get the IP address of the host machine"""
9- # Try to get the IP address using the hostname
10- hostname = socket .gethostname ()
11- address = socket .gethostbyname (hostname )
12- # If it returns a bogus address, do it the hard way
13- if not address or address .startswith ("127." ):
14- s = socket .socket (socket .AF_INET , socket .SOCK_DGRAM )
15- s .connect (("1.1.1.1" , 0 ))
16- address = s .getsockname ()[0 ]
17- return address
18-
19-
206def helm_installed (name : str ) -> bool :
217 return shutil .which (name ) is not None
228
Original file line number Diff line number Diff line change 1+ import socket
2+
3+
4+ def get_ip_address () -> str :
5+ """Get the IP address of the host machine"""
6+ # Try to get the IP address using the hostname
7+ hostname = socket .gethostname ()
8+ address = socket .gethostbyname (hostname )
9+ # If it returns a bogus address, do it the hard way
10+ if not address or address .startswith ("127." ):
11+ s = socket .socket (socket .AF_INET , socket .SOCK_DGRAM )
12+ s .connect (("1.1.1.1" , 0 ))
13+ address = s .getsockname ()[0 ]
14+ return address
You can’t perform that action at this time.
0 commit comments