Conversation
javelin_cli/_internal/commands.py
Outdated
| javelin_api_key = selected_gateway["api_key_value"] | ||
|
|
||
| # Ensure the API key is set before initializing | ||
| if not javelin_api_key or javelin_api_key == "": |
There was a problem hiding this comment.
every gateway will have javelin_api_key. msging here might confuse the user. remove this check.
| security_interval=args.security_interval | ||
| ) | ||
| return client.aispm.create_customer(customer) | ||
|
|
There was a problem hiding this comment.
run 'black javelin_cli/_internal/commands.py' on the changes to remove trailing spaces and format the file.
| except Exception as e: | ||
| print(f"Error getting AWS configurations: {e}") | ||
|
|
||
| def delete_aws_config(args): |
There was a problem hiding this comment.
pls move impl to service like rest of the methods.
There was a problem hiding this comment.
Outdated. Looks like the implementation is already in the service layer, and the CLI command follows the same pattern as the other AISPM methods. Please recheck.
javelin_sdk/client.py
Outdated
| is_transformation_rules=request.is_transformation_rules, | ||
| is_reload=request.is_reload, | ||
| ) | ||
| if request.route.startswith("v1/admin/aispm"): |
There was a problem hiding this comment.
pls move to construct_url fn
| return url, headers | ||
|
|
||
| def _send_request_sync(self, request: Request) -> httpx.Response: | ||
| return self._core_send_request(self.client, request) |
javelin_sdk/client.py
Outdated
|
|
||
| return url | ||
|
|
||
| def _construct_aispm_url(self, request: Request) -> str: |
There was a problem hiding this comment.
not required, since its moving to construct_url
javelin_sdk/client.py
Outdated
| is_reload=request.is_reload, | ||
| ) | ||
| if request.route.startswith("v1/admin/aispm"): | ||
| url = f"{self.config.base_url.rstrip('/')}/{request.route}" |
There was a problem hiding this comment.
move this logic to contrust_url fn
abhijitjavelin
left a comment
There was a problem hiding this comment.
pls run 'black .' on files you updated.
move aispm url contruction logic to contrust_url
|
Previously, account_id was only checked in the gateway configuration and role_arn. This is changed to add fallback logic to check organization.public_metadata.account_id |
|
Also fixes issue: #230 |
c675aac to
7ad667b
Compare
Changes made commenting the print statements and added new client method for aispm