Browse Source

add get of properties to listreports

master
Gerry Nelson 5 years ago
parent
commit
2a93bc155b
  1. 7
      listreports.py
  2. 6
      sharedfunctions.py

7
listreports.py

@ -27,13 +27,14 @@
# Import Python modules # Import Python modules
import argparse, sys, subprocess, uuid, time, os, glob import argparse, sys, subprocess, uuid, time, os, glob
from datetime import datetime as dt, timedelta as td from datetime import datetime as dt, timedelta as td
from sharedfunctions import getfolderid, callrestapi, getpath, printresult from sharedfunctions import getfolderid, callrestapi, getpath, printresult, getapplicationproperties
# get python version # get python version
version=int(str(sys.version_info[0])) version=int(str(sys.version_info[0]))
# CHANGE THIS VARIABLE IF YOUR CLI IS IN A DIFFERENT LOCATION propertylist=getapplicationproperties()
clidir='/opt/sas/viya/home/bin/'
clidir=propertylist["sascli.location"]
# get input parameters # get input parameters
parser = argparse.ArgumentParser(description="List Viya Reports and their folder path.") parser = argparse.ArgumentParser(description="List Viya Reports and their folder path.")

6
sharedfunctions.py

@ -669,6 +669,12 @@ def simplejsonresults(resultdata):
print(json.dumps(resultdata,indent=2)) print(json.dumps(resultdata,indent=2))
# getapplicationproperties
# 20nov2020 initial development
def getapplicationproperties: def getapplicationproperties:
# get the path for the script file this is where the properties file will bbe # get the path for the script file this is where the properties file will bbe

Loading…
Cancel
Save