algosec-appviz 0.0.8__tar.gz → 0.0.9__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.
- {algosec_appviz-0.0.8 → algosec_appviz-0.0.9}/PKG-INFO +1 -1
- {algosec_appviz-0.0.8 → algosec_appviz-0.0.9}/pyproject.toml +1 -1
- {algosec_appviz-0.0.8 → algosec_appviz-0.0.9}/src/algosec_appviz/main.py +24 -1
- {algosec_appviz-0.0.8 → algosec_appviz-0.0.9}/LICENSE +0 -0
- {algosec_appviz-0.0.8 → algosec_appviz-0.0.9}/README.md +0 -0
- {algosec_appviz-0.0.8 → algosec_appviz-0.0.9}/src/algosec_appviz/__init__.py +0 -0
- {algosec_appviz-0.0.8 → algosec_appviz-0.0.9}/src/algosec_appviz/environment.py +0 -0
|
@@ -6,7 +6,7 @@ build-backend = "poetry.core.masonry.api"
|
|
|
6
6
|
name = "algosec_appviz"
|
|
7
7
|
repository = "https://github.com/bogdan-iot/algosec-appviz"
|
|
8
8
|
documentation = "https://github.com/bogdan-iot/algosec-appviz/blob/master/README.md"
|
|
9
|
-
version = "0.0.
|
|
9
|
+
version = "0.0.9"
|
|
10
10
|
license = "LICENSE"
|
|
11
11
|
readme = "README.md"
|
|
12
12
|
description = "AlgoSec AppViz Library"
|
|
@@ -82,7 +82,7 @@ class AppViz:
|
|
|
82
82
|
"""
|
|
83
83
|
Deletes a network object in AppViz
|
|
84
84
|
:param obj_id: The object ID
|
|
85
|
-
:return:
|
|
85
|
+
:return: Change details if successful, empty string otherwise
|
|
86
86
|
"""
|
|
87
87
|
if not obj_id:
|
|
88
88
|
raise ValueError("Object ID is mandatory")
|
|
@@ -96,6 +96,29 @@ class AppViz:
|
|
|
96
96
|
|
|
97
97
|
return result
|
|
98
98
|
|
|
99
|
+
def update_network_object(self, obj_id=None, **kwargs):
|
|
100
|
+
"""
|
|
101
|
+
Updates a network object in AppViz
|
|
102
|
+
:return: The new object details, if successful, empty string otherwise
|
|
103
|
+
"""
|
|
104
|
+
if not obj_id:
|
|
105
|
+
raise ValueError("Object ID is mandatory")
|
|
106
|
+
|
|
107
|
+
result = self._make_api_call('POST',
|
|
108
|
+
f'/BusinessFlow/rest/v1/network_objects/{obj_id}',
|
|
109
|
+
body={**kwargs})
|
|
110
|
+
|
|
111
|
+
if isinstance(result, dict) and 'networkObject' in result.keys():
|
|
112
|
+
return result['networkObject']
|
|
113
|
+
|
|
114
|
+
try:
|
|
115
|
+
print(result[1])
|
|
116
|
+
except KeyError:
|
|
117
|
+
if 'success' in result.keys() and not result['success']:
|
|
118
|
+
print(result['message'])
|
|
119
|
+
|
|
120
|
+
return ""
|
|
121
|
+
|
|
99
122
|
def get_applications(self):
|
|
100
123
|
response = self._make_api_call('GET',
|
|
101
124
|
'/BusinessFlow/rest/v1/applications')
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|