IBM-Security / ibmsecurity

Idempotent functions for IBM Security Appliance REST APIs. Currently covering ISAM and ISDS Appliances.
Apache License 2.0
47 stars 73 forks source link

Unable to install new Dynatrace extension #415

Closed aditiParimanshu closed 6 months ago

aditiParimanshu commented 7 months ago

Due to below code error unable to install the Dynatrace extension:

https://github.com/IBM-Security/ibmsecurity/blob/3ff140924e2e56b54364a2a78249bc392cec66aa/ibmsecurity/isam/base/extensions.py#L63

def _get_config_data(extId, config_data):

"""

Generate a JSON payload for activate/update

"""

if config_data is None:

   return json.dumps({extId: extId}) >>> **Should be return json.dumps({'extId': extId})** 

if isinstance(config_data, basestring):

   return '{extId:}' + extId + ',' + config_data + '}'  >>> **should be return '{extId:' + extId + ',' + config_data + '}'**

config_data['extId'] = extId

return json.dumps(config_data)

Added the correct return statement for the _get_config_data() method in bold

Take this issue on priority. @tombosmansibm please take thiss issue on priority , due to this issue correct json is not getting formed for installing the dynatrace extension

tombosmansibm commented 6 months ago

closed by #417