-
Notifications
You must be signed in to change notification settings - Fork 1
Aispm feature new #104
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Aispm feature new #104
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pls move impl to service like rest of the methods.
| 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pls revert back.
|
|
||
| return url | ||
|
|
||
| def _construct_aispm_url(self, request: Request) -> str: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not required, since its moving to construct_url
| 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
move this logic to contrust_url fn
abhijitjavelin
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pls run 'black .' on files you updated.
move aispm url contruction logic to contrust_url
Changes made commenting the print statements and added new client method for aispm