|
|
@ -23,6 +23,14 @@ |
|
|
# limitations under the License. |
|
|
# limitations under the License. |
|
|
# |
|
|
# |
|
|
|
|
|
|
|
|
|
|
|
# Import Python modules |
|
|
|
|
|
|
|
|
|
|
|
from sharedfunctions import callrestapi, getapplicationproperties |
|
|
|
|
|
import argparse |
|
|
|
|
|
import json |
|
|
|
|
|
import sys |
|
|
|
|
|
import os |
|
|
|
|
|
|
|
|
# get python version |
|
|
# get python version |
|
|
version=int(str(sys.version_info[0])) |
|
|
version=int(str(sys.version_info[0])) |
|
|
|
|
|
|
|
|
@ -35,7 +43,6 @@ cliexe=propertylist["sascli.executable"] |
|
|
clicommand=os.path.join(clidir,cliexe) |
|
|
clicommand=os.path.join(clidir,cliexe) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
debug=False |
|
|
debug=False |
|
|
defaultBackupScheduleName="DEFAULT_BACKUP_SCHEDULE" |
|
|
defaultBackupScheduleName="DEFAULT_BACKUP_SCHEDULE" |
|
|
newScheduleName="BINARY_BACKUP_SCHEDULE" |
|
|
newScheduleName="BINARY_BACKUP_SCHEDULE" |
|
|
@ -44,20 +51,12 @@ jobDefinitionURIStem="/jobDefinitions/definitions/" |
|
|
newScheduleContentType="application/vnd.sas.backup.request+json" # For a single-tenant deployment |
|
|
newScheduleContentType="application/vnd.sas.backup.request+json" # For a single-tenant deployment |
|
|
#newScheduleContentType="application/vnd.sas.backup.deployment.request+json" # For a multi-tenant deployment |
|
|
#newScheduleContentType="application/vnd.sas.backup.deployment.request+json" # For a multi-tenant deployment |
|
|
|
|
|
|
|
|
# Import Python modules |
|
|
|
|
|
|
|
|
|
|
|
import argparse |
|
|
|
|
|
import json |
|
|
|
|
|
import sys |
|
|
|
|
|
|
|
|
|
|
|
from sharedfunctions import callrestapi |
|
|
|
|
|
|
|
|
|
|
|
# Define exception handler so that we only output trace info from errors when in debug mode |
|
|
# Define exception handler so that we only output trace info from errors when in debug mode |
|
|
def exception_handler(exception_type, exception, traceback, debug_hook=sys.excepthook): |
|
|
def exception_handler(exception_type, exception, traceback, debug_hook=sys.excepthook): |
|
|
if debug: |
|
|
if debug: |
|
|
debug_hook(exception_type, exception, traceback) |
|
|
debug_hook(exception_type, exception, traceback) |
|
|
else: |
|
|
else: |
|
|
print "%s: %s" % (exception_type.__name__, exception) |
|
|
print (exception_type.__name__, exception) |
|
|
|
|
|
|
|
|
sys.excepthook = exception_handler |
|
|
sys.excepthook = exception_handler |
|
|
|
|
|
|
|
|
|