Add getDomainName to vm functions
This commit is contained in:
parent
7daed1b0d8
commit
9107e16c33
|
@ -25,7 +25,6 @@ import socket
|
||||||
import time
|
import time
|
||||||
import uuid
|
import uuid
|
||||||
import re
|
import re
|
||||||
import tempfile
|
|
||||||
import subprocess
|
import subprocess
|
||||||
import difflib
|
import difflib
|
||||||
import colorama
|
import colorama
|
||||||
|
@ -180,6 +179,17 @@ def getDomainUUID(zk_conn, domain):
|
||||||
|
|
||||||
return dom_uuid
|
return dom_uuid
|
||||||
|
|
||||||
|
def getDomainName(zk_conn, domain):
|
||||||
|
# Validate and obtain alternate passed value
|
||||||
|
if common.validateUUID(domain):
|
||||||
|
dom_name = searchClusterByUUID(zk_conn, domain)
|
||||||
|
dom_uuid = searchClusterByName(zk_conn, dom_name)
|
||||||
|
else:
|
||||||
|
dom_uuid = searchClusterByName(zk_conn, domain)
|
||||||
|
dom_name = searchClusterByUUID(zk_conn, dom_uuid)
|
||||||
|
|
||||||
|
return dom_name
|
||||||
|
|
||||||
#
|
#
|
||||||
# Direct functions
|
# Direct functions
|
||||||
#
|
#
|
||||||
|
|
Loading…
Reference in New Issue