Mercurial > hg > orthanc-tests
comparison PerfsDb/ConfigFileBuilder.py @ 159:616da104a996
fix for ubuntu 18.04
author | am@osimis.io |
---|---|
date | Fri, 17 Aug 2018 14:49:59 +0200 |
parents | df1f9946571c |
children |
comparison
equal
deleted
inserted
replaced
158:df1f9946571c | 159:616da104a996 |
---|---|
1 import typing | 1 import typing |
2 import json | 2 import json |
3 import os | 3 import os |
4 import platform | |
4 | 5 |
5 from DbType import DbType | 6 from DbType import DbType |
6 | 7 |
7 class ConfigFileBuilder: | 8 class ConfigFileBuilder: |
8 | 9 |
50 | 51 |
51 elif dbType == DbType.MSSQL: | 52 elif dbType == DbType.MSSQL: |
52 config["Plugins"] = [os.path.join(pluginsPath, "libOrthancMsSqlIndex.so")] | 53 config["Plugins"] = [os.path.join(pluginsPath, "libOrthancMsSqlIndex.so")] |
53 dbConfig["EnableStorage"] = False | 54 dbConfig["EnableStorage"] = False |
54 | 55 |
55 dbConfig["ConnectionString"] = "Driver={ODBC Driver 13 for SQL Server};Server=tcp:127.0.0.1," + str(port) + ";Database=master;Uid=sa;Pwd=MyStrOngPa55word!;Encrypt=yes;TrustServerCertificate=yes;Connection Timeout=30" | 56 if platform.node() == "benchmark": # the benchmark VM on Azure is a 18.04 -> it has version 17 |
57 odbcVersion = 17 | |
58 else: | |
59 odbcVersion = 13 | |
60 | |
61 dbConfig["ConnectionString"] = "Driver={ODBC Driver " + str(odbcVersion) + " for SQL Server};Server=tcp:127.0.0.1," + str(port) + ";Database=master;Uid=sa;Pwd=MyStrOngPa55word!;Encrypt=yes;TrustServerCertificate=yes;Connection Timeout=30" | |
56 dbConfig["LicenseString"] = "1abaamBcReVXv6EtE_X___demo-orthanc%osimis.io___HHHnqVHYvEkR3jGs2Y3EvpbxZgTt7yaCniJa2Bz7hFWTMa" # note: this is a trial license expiring on 2018-09-30, replace with your license code | 62 dbConfig["LicenseString"] = "1abaamBcReVXv6EtE_X___demo-orthanc%osimis.io___HHHnqVHYvEkR3jGs2Y3EvpbxZgTt7yaCniJa2Bz7hFWTMa" # note: this is a trial license expiring on 2018-09-30, replace with your license code |
57 | 63 |
58 config["MSSQL"] = dbConfig | 64 config["MSSQL"] = dbConfig |
59 | 65 |
60 elif dbType.isSqlite(): | 66 elif dbType.isSqlite(): |