mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 01:32:18 +02:00
cloudutils: use ip command instead of route in networkConfig.py (#10726)
This commit is contained in:
parent
9d9737ae04
commit
7f16a207e0
@ -41,7 +41,7 @@ class networkConfig:
|
||||
return devs
|
||||
@staticmethod
|
||||
def getDefaultNetwork():
|
||||
cmd = bash("route -n|awk \'/^0.0.0.0/ {print $2,$8}\'")
|
||||
cmd = bash("ip route show default | awk \'{print $3,$5}\'")
|
||||
if not cmd.isSuccess():
|
||||
logging.debug("Failed to get default route")
|
||||
raise CloudRuntimeException("Failed to get default route")
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user