python-eigen-ingenuity 0.4.13__tar.gz → 0.4.16__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {python-eigen-ingenuity-0.4.13/python_eigen_ingenuity.egg-info → python-eigen-ingenuity-0.4.16}/PKG-INFO +1 -1
- {python-eigen-ingenuity-0.4.13 → python-eigen-ingenuity-0.4.16}/eigeningenuity/historian.py +8 -10
- {python-eigen-ingenuity-0.4.13 → python-eigen-ingenuity-0.4.16}/eigeningenuity/settings.py +14 -1
- {python-eigen-ingenuity-0.4.13 → python-eigen-ingenuity-0.4.16/python_eigen_ingenuity.egg-info}/PKG-INFO +1 -1
- {python-eigen-ingenuity-0.4.13 → python-eigen-ingenuity-0.4.16}/setup.py +1 -1
- {python-eigen-ingenuity-0.4.13 → python-eigen-ingenuity-0.4.16}/MANIFEST.in +0 -0
- {python-eigen-ingenuity-0.4.13 → python-eigen-ingenuity-0.4.16}/README.md +0 -0
- {python-eigen-ingenuity-0.4.13 → python-eigen-ingenuity-0.4.16}/eigeningenuity/__init__.py +0 -0
- {python-eigen-ingenuity-0.4.13 → python-eigen-ingenuity-0.4.16}/eigeningenuity/assetmodel.py +0 -0
- {python-eigen-ingenuity-0.4.13 → python-eigen-ingenuity-0.4.16}/eigeningenuity/auth.py +0 -0
- {python-eigen-ingenuity-0.4.13 → python-eigen-ingenuity-0.4.16}/eigeningenuity/core/__init__.py +0 -0
- {python-eigen-ingenuity-0.4.13 → python-eigen-ingenuity-0.4.16}/eigeningenuity/elastic.py +0 -0
- {python-eigen-ingenuity-0.4.13 → python-eigen-ingenuity-0.4.16}/eigeningenuity/events.py +0 -0
- {python-eigen-ingenuity-0.4.13 → python-eigen-ingenuity-0.4.16}/eigeningenuity/smartdash.py +0 -0
- {python-eigen-ingenuity-0.4.13 → python-eigen-ingenuity-0.4.16}/eigeningenuity/sql.py +0 -0
- {python-eigen-ingenuity-0.4.13 → python-eigen-ingenuity-0.4.16}/eigeningenuity/util.py +0 -0
- {python-eigen-ingenuity-0.4.13 → python-eigen-ingenuity-0.4.16}/python_eigen_ingenuity.egg-info/SOURCES.txt +0 -0
- {python-eigen-ingenuity-0.4.13 → python-eigen-ingenuity-0.4.16}/python_eigen_ingenuity.egg-info/dependency_links.txt +0 -0
- {python-eigen-ingenuity-0.4.13 → python-eigen-ingenuity-0.4.16}/python_eigen_ingenuity.egg-info/requires.txt +0 -0
- {python-eigen-ingenuity-0.4.13 → python-eigen-ingenuity-0.4.16}/python_eigen_ingenuity.egg-info/top_level.txt +0 -0
- {python-eigen-ingenuity-0.4.13 → python-eigen-ingenuity-0.4.16}/setup.cfg +0 -0
|
@@ -19,7 +19,7 @@ eigeningenuity.core) or a full URL to a JSON Bridge Historian instance.
|
|
|
19
19
|
|
|
20
20
|
import json
|
|
21
21
|
import math
|
|
22
|
-
import
|
|
22
|
+
import warnings
|
|
23
23
|
import csv
|
|
24
24
|
import requests
|
|
25
25
|
from urllib.parse import quote as urlquote
|
|
@@ -37,8 +37,6 @@ from eigeningenuity.util import _do_eigen_json_request, force_list, time_to_epoc
|
|
|
37
37
|
from urllib3.exceptions import InsecureRequestWarning
|
|
38
38
|
requests.packages.urllib3.disable_warnings(category=InsecureRequestWarning)
|
|
39
39
|
|
|
40
|
-
logging.basicConfig(format='%(levelname)s - %(message)s', level=logging.INFO)
|
|
41
|
-
|
|
42
40
|
|
|
43
41
|
class JsonBridgeHistorian (object):
|
|
44
42
|
"""A Historian which talks the Eigen Historian Json Bridge protocol.
|
|
@@ -153,7 +151,7 @@ class JsonBridgeHistorian (object):
|
|
|
153
151
|
if response['unknown'] != []:
|
|
154
152
|
if items == {}:
|
|
155
153
|
raise EigenException("None of the provided tags could be found in historian " + self.historian)
|
|
156
|
-
|
|
154
|
+
warnings.warn("Could not find tags: " + str(response["unknown"]) + " in historian " + self.historian)
|
|
157
155
|
|
|
158
156
|
if output == "raw":
|
|
159
157
|
return response
|
|
@@ -202,7 +200,7 @@ class JsonBridgeHistorian (object):
|
|
|
202
200
|
if response['unknown'] != []:
|
|
203
201
|
if items == {}:
|
|
204
202
|
raise EigenException("None of the provided tags could be found in historian " + self.historian)
|
|
205
|
-
|
|
203
|
+
warnings.warn("Could not find tags: " + str(response["unknown"]) + " in historian " + self.historian)
|
|
206
204
|
|
|
207
205
|
if output == "raw":
|
|
208
206
|
return response
|
|
@@ -254,7 +252,7 @@ class JsonBridgeHistorian (object):
|
|
|
254
252
|
if response['unknown'] != []:
|
|
255
253
|
if items == {}:
|
|
256
254
|
raise EigenException("None of the provided tags could be found in historian " + self.historian)
|
|
257
|
-
|
|
255
|
+
warnings.warn("Could not find tags: " + str(response["unknown"]) + " in historian " + self.historian)
|
|
258
256
|
|
|
259
257
|
if output == "raw":
|
|
260
258
|
return response
|
|
@@ -307,7 +305,7 @@ class JsonBridgeHistorian (object):
|
|
|
307
305
|
if response['unknown'] != []:
|
|
308
306
|
if items == {}:
|
|
309
307
|
raise EigenException("None of the provided tags could be found in historian " + self.historian)
|
|
310
|
-
|
|
308
|
+
warnings.warn("Could not find tags: " + str(response["unknown"]) + " in historian " + self.historian)
|
|
311
309
|
|
|
312
310
|
if output == "raw":
|
|
313
311
|
return response
|
|
@@ -365,7 +363,7 @@ class JsonBridgeHistorian (object):
|
|
|
365
363
|
if missing != []:
|
|
366
364
|
if response == {}:
|
|
367
365
|
raise EigenException("None of the provided tags could be found in historian " + self.historian)
|
|
368
|
-
|
|
366
|
+
warnings.warn("Could not find tags: " + str(missing) + " in historian " + self.historian)
|
|
369
367
|
|
|
370
368
|
if output == "raw":
|
|
371
369
|
return response
|
|
@@ -422,7 +420,7 @@ class JsonBridgeHistorian (object):
|
|
|
422
420
|
else:
|
|
423
421
|
count = 1
|
|
424
422
|
if count > 1000:
|
|
425
|
-
|
|
423
|
+
warnings.warn(
|
|
426
424
|
"getAggregateIntervals is only designed to return up to 1000 aggregate sets, currently returning " + str(
|
|
427
425
|
count) + " sets. This may return overlapping intervals")
|
|
428
426
|
|
|
@@ -440,7 +438,7 @@ class JsonBridgeHistorian (object):
|
|
|
440
438
|
if missing != []:
|
|
441
439
|
if response == {}:
|
|
442
440
|
raise EigenException("None of the provided tags could be found in historian " + self.historian)
|
|
443
|
-
|
|
441
|
+
warnings.warn("Could not find tags: " + str(missing) + " in historian " + self.historian)
|
|
444
442
|
|
|
445
443
|
if output == "raw":
|
|
446
444
|
return response
|
|
@@ -2,7 +2,7 @@ import os
|
|
|
2
2
|
from getpass import getuser
|
|
3
3
|
|
|
4
4
|
_token_cache_enabled_ = True
|
|
5
|
-
_azure_auth_enabled_ =
|
|
5
|
+
_azure_auth_enabled_ = False
|
|
6
6
|
_azure_tenant_id_ = os.getenv("TENANTID", "74efa022-e6d6-42ad-bc15-edc76c525bde")
|
|
7
7
|
_azure_client_id_ = os.getenv("CLIENTID", "c2b9aa13-e178-4dde-bc2c-b6cc4c8391d2")
|
|
8
8
|
|
|
@@ -45,6 +45,19 @@ def disable_azure_auth(state=True):
|
|
|
45
45
|
global _azure_auth_enabled_
|
|
46
46
|
_azure_auth_enabled_ = not state
|
|
47
47
|
|
|
48
|
+
def enable_azure_auth(state=True):
|
|
49
|
+
"""
|
|
50
|
+
Skip all azure authentication steps, note that this will cause an error if querying a protected resource
|
|
51
|
+
|
|
52
|
+
Args:
|
|
53
|
+
None
|
|
54
|
+
|
|
55
|
+
Returns:
|
|
56
|
+
None
|
|
57
|
+
"""
|
|
58
|
+
global _azure_auth_enabled_
|
|
59
|
+
_azure_auth_enabled_ = state
|
|
60
|
+
|
|
48
61
|
def set_azure_tenant_id(id):
|
|
49
62
|
"""
|
|
50
63
|
Set the ID of the Azure tenant of the eigenserver. This value is required for Azure authentication, but the use of the TENANTID environmental variable can be used as an alternative way of setting it.
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{python-eigen-ingenuity-0.4.13 → python-eigen-ingenuity-0.4.16}/eigeningenuity/assetmodel.py
RENAMED
|
File without changes
|
|
File without changes
|
{python-eigen-ingenuity-0.4.13 → python-eigen-ingenuity-0.4.16}/eigeningenuity/core/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|