Browse Source

test with foldertree

master
Gerry Nelson 5 years ago
parent
commit
49f7229d1d
  1. 2
      application.properties
  2. 11
      exportfoldertree.py
  3. 5
      listreports.py
  4. 2
      sharedfunctions.py

2
application.properties

@ -1,2 +1,2 @@
sascli.location=/opt/sas/viya/home/bin
sascli.executable=sas.admin
sascli.executable=sas-viya

11
exportfoldertree.py

@ -30,13 +30,18 @@
# Import Python modules
import argparse, sys, subprocess, uuid, time, os, glob
from sharedfunctions import getfolderid, callrestapi
from sharedfunctions import getfolderid, callrestapi,getapplicationproperties
# get python version
version=int(str(sys.version_info[0]))
# CHANGE THIS VARIABLE IF YOUR CLI IS IN A DIFFERENT LOCATION
clidir='/opt/sas/viya/home/bin/'
# get cli location from properties
propertylist=getapplicationproperties()
clidir=propertylist["sascli.location"]
cliexe=propertylist["sascli.executable"]
cli_command=os.path.join(clidir,cliexe)
# get input parameters
parser = argparse.ArgumentParser(description="Export the complete Viya folder tree")

5
listreports.py

@ -32,11 +32,6 @@ from sharedfunctions import getfolderid, callrestapi, getpath, printresult, geta
# get python version
version=int(str(sys.version_info[0]))
propertylist=getapplicationproperties()
clidir=propertylist["sascli.location"]
cliexe=propertylist["sascli.executable"]
# get input parameters
parser = argparse.ArgumentParser(description="List Viya Reports and their folder path.")
parser.add_argument("-n","--name", help="Name contains?",default=None)

2
sharedfunctions.py

@ -686,6 +686,6 @@ def getapplicationproperties():
myparams=dict(line.strip().split('=') for line in open(prop_file) if line[0].isalpha())
print(myparams)
return myparms
return myparams

Loading…
Cancel
Save