Skip to content

Aispm feature new#104

Merged
darshana-v merged 14 commits intomainfrom
aispm-feature-new
Dec 22, 2025
Merged

Aispm feature new#104
darshana-v merged 14 commits intomainfrom
aispm-feature-new

Conversation

@kamalgovindgj
Copy link
Copy Markdown
Contributor

Changes made commenting the print statements and added new client method for aispm

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 == "":
Copy link
Copy Markdown
Contributor

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)

Copy link
Copy Markdown
Contributor

@abhijitjavelin abhijitjavelin Jan 15, 2025

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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed this

except Exception as e:
print(f"Error getting AWS configurations: {e}")

def delete_aws_config(args):
Copy link
Copy Markdown
Contributor

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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

is_transformation_rules=request.is_transformation_rules,
is_reload=request.is_reload,
)
if request.route.startswith("v1/admin/aispm"):
Copy link
Copy Markdown
Contributor

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

return url, headers

def _send_request_sync(self, request: Request) -> httpx.Response:
return self._core_send_request(self.client, request)
Copy link
Copy Markdown
Contributor

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:
Copy link
Copy Markdown
Contributor

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

is_reload=request.is_reload,
)
if request.route.startswith("v1/admin/aispm"):
url = f"{self.config.base_url.rstrip('/')}/{request.route}"
Copy link
Copy Markdown
Contributor

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

@abhijitjavelin abhijitjavelin self-requested a review January 22, 2025 16:00
Copy link
Copy Markdown
Contributor

@abhijitjavelin abhijitjavelin left a 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

@darshana-v darshana-v self-assigned this Dec 15, 2025
@darshana-v
Copy link
Copy Markdown
Contributor

darshana-v commented Dec 17, 2025

Previously, account_id was only checked in the gateway configuration and role_arn.
After authenticating with dev environment, account_id is stored in the
organization's public_metadata instead of gateway config.

This is changed to add fallback logic to check organization.public_metadata.account_id
when account_id is not found in the gateway configuration, ensuring AISPM
commands work correctly with both localhost and dev environments.

@darshana-v
Copy link
Copy Markdown
Contributor

Also fixes issue: #230

@darshana-v darshana-v merged commit 2b9a99d into main Dec 22, 2025
6 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants