You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe
Like in the code snippet, the add() method should call dsAddDataSourcesStatus , make sure there is no error or raise an Exception if the Datasource were not added.
Only if special argument check_added=True to keep compatibility.
** msiempy versions:**
msiempy: 0.3.3
Additional context
ifds.get('client', None):
print("Adding Client Datasource: {}".format(ds))
resp=devtree.add_client(ds)
else:
print("Adding Datasource: {}".format(ds))
resp=devtree.add(ds)
ifnotresp:
print('Something went wrong, Datasource {} not added.')
continueelse:
# Wait for the add DS query to execuite ...time.sleep(1)
ds_status=NitroSession().api_request('dsAddDataSourcesStatus', {"jobId": resp}, retry=0)
ifnotisinstance(ds_status, dict):
print('Something went wrong, Datasource {} not added.\n{}'.format(ds['name'], ds_status))
continuewhilenotds_status['jobStatus'] =='COMPLETE':
time.sleep(1)
ds_status=NitroSession().api_request('dsAddDataSourcesStatus', {"jobId": resp}, retry=0)
iflen(ds_status['unsuccessfulDatasources'])>0:
print('Something went wrong, Datasource {} not added. {}'.format(ds['name'], ds_status['unsuccessfulDatasources'][0]))
continueelse:
ds_to_verify.append(ds['name'])
devtree.refresh()
The text was updated successfully, but these errors were encountered:
Describe
Like in the code snippet, the
add()
method should calldsAddDataSourcesStatus
, make sure there is no error or raise an Exception if the Datasource were not added.Only if special argument
check_added=True
to keep compatibility.** msiempy versions:**
Additional context
The text was updated successfully, but these errors were encountered: