-
Notifications
You must be signed in to change notification settings - Fork 0
/
deployer_example.py
33 lines (22 loc) · 1.13 KB
/
deployer_example.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
import sys
import os
from sherpa.utils.basics import Properties
from sherpa.utils.basics import Logger
from sherpa.janssen.janssen_lib import ConfigAPIClient
def main():
properties = Properties("./local.properties", "./default.properties")
logger = Logger(os.path.basename(__file__), properties.get("idp_deployment_log_level"), properties.get("idp_deployment_log_file"))
run(logger, properties)
def run(logger, properties):
file_name = os.path.basename(__file__)
logger.debug("Starting {} deployment".format(file_name))
config_api_client = ConfigAPIClient(logger, properties)
config_api_client.import_attributes("./customization/attributes")
config_api_client.patch_attributes("./customization/attributes/patch")
config_api_client.import_scripts("./customization/script-objects")
config_api_client.patch_scripts("./customization/script-objects/patch")
config_api_client.import_scopes("./customization/scopes")
config_api_client.import_clients("./customization/clients")
config_api_client.import_auth_server_config("./customization/jans_auth_server")
if __name__ == "__main__":
sys.exit(main())