Skip to content
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

fix: 🐛 rent extension agent #1038

Merged
merged 1 commit into from
Jul 14, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion api/v1/views/arkstore.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
# unbind_arkstore_agent,
get_arkstore_extension_markdown,
)
from arkid.common.bind_saas import get_bind_info
from arkid.core.api import api, operation
from datetime import datetime
from typing import List, Optional
Expand Down Expand Up @@ -347,7 +348,12 @@ def create_rent_order_arkstore_extension(request, tenant_id: str, package: str,
ext_info = get_arkstore_extension_detail_by_package(access_token, package)
if ext_info is None:
return {}
resp = lease_arkstore_extension(access_token, ext_info['uuid'], data.dict())
platform_tenant = Tenant.platform_tenant()
resp = get_bind_info(platform_tenant.id.hex)
agent_uuid = resp.get('saas_tenant_id')
rent_data = data.dict()
rent_data['agent_uuid'] = agent_uuid
resp = lease_arkstore_extension(access_token, ext_info['uuid'], rent_data)
return resp


Expand Down