Skip to content

Commit

Permalink
Merge pull request #62 from epam/develop
Browse files Browse the repository at this point in the history
Release 5.1.3
  • Loading branch information
oleksandr-onsha authored Jun 13, 2024
2 parents ac775cb + 8f5c5d5 commit b728709
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 2 deletions.
File renamed without changes.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).


# [5.1.3] - 2024-06-09
- added new Application and Parent type: "GCP_CHRONICLE_INSTANCE"

# [5.1.2] - 2024-05-13
- try to load json from vault str values

# [5.1.1] - 2024-03-12
- add pyright config to pyproject.toml
- add values preprocessor to pynamodb_to_pymongo_adapter instead of using
Expand Down
2 changes: 2 additions & 0 deletions modular_sdk/commons/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ class ParentType(str, Enum):
RIGHTSIZER_LICENSES_PARENT = 'RIGHTSIZER_LICENSES'
SIEM_DEFECT_DOJO = 'SIEM_DEFECT_DOJO'
PLATFORM_K8S = 'PLATFORM_K8S'
GCP_CHRONICLE_INSTANCE = 'GCP_CHRONICLE_INSTANCE'

@classmethod
def iter(cls):
Expand Down Expand Up @@ -146,6 +147,7 @@ class ApplicationType(str, Enum):
RABBITMQ = 'RABBITMQ'
DEFECT_DOJO = 'DEFECT_DOJO'
K8S_KUBE_CONFIG = 'K8S_KUBE_CONFIG'
GCP_CHRONICLE_INSTANCE = 'GCP_CHRONICLE_INSTANCE'

@classmethod
def iter(cls):
Expand Down
8 changes: 7 additions & 1 deletion modular_sdk/services/ssm_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,13 @@ def get_parameter(self, name: str) -> Optional[SecretValue]:
path=name, mount_point=self.mount_point) or {}
except Exception: # hvac.InvalidPath
return
return response.get('data', {}).get('data', {}).get(self.key)
val = response.get('data', {}).get('data', {}).get(self.key)
if isinstance(val, str):
try:
val = json.loads(val)
except json.JSONDecodeError:
pass
return val

def put_parameter(self, name: str, value: SecretValue,
_type='SecureString') -> Optional[str]:
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = modular_sdk
version = 5.1.1
version = 5.1.3
python_requires = >=3.10
classifiers =
Programming Language :: Python :: 3
Expand Down

0 comments on commit b728709

Please sign in to comment.