|
|
|
@ -57,9 +57,14 @@ except ImportError: |
|
|
|
from urlparse import urlparse |
|
|
|
|
|
|
|
|
|
|
|
# CHANGE THIS VARIABLE IF YOUR CLI IS IN A DIFFERENT LOCATION |
|
|
|
clidir='/opt/sas/viya/home/bin/' |
|
|
|
#clidir='c:\\admincli\\' |
|
|
|
# get cli location from properties |
|
|
|
propertylist=getapplicationproperties() |
|
|
|
|
|
|
|
clidir=propertylist["sascli.location"] |
|
|
|
cliexe=propertylist["sascli.executable"] |
|
|
|
|
|
|
|
clicommand=os.path.join(clidir,cliexe) |
|
|
|
|
|
|
|
|
|
|
|
debug=0 |
|
|
|
profileexists=0 |
|
|
|
@ -126,8 +131,8 @@ if profileexists: |
|
|
|
print('host: '+host) |
|
|
|
|
|
|
|
#quote the password string for posix systems |
|
|
|
if (os.name =='posix'): command=clidir+"sas-admin --profile "+myprofile+ " auth login -u "+username+ " -p '"+password+"'" |
|
|
|
else: command=clidir+'sas-admin --profile '+myprofile+ ' auth login -u '+username+ ' -p '+password |
|
|
|
if (os.name =='posix'): command=clicommand+" --profile "+myprofile+ " auth login -u "+username+ " -p '"+password+"'" |
|
|
|
else: command=clicommand+' --profile '+myprofile+ ' auth login -u '+username+ ' -p '+password |
|
|
|
subprocess.call(command, shell=True) |
|
|
|
|
|
|
|
else: |
|
|
|
|