-
Notifications
You must be signed in to change notification settings - Fork 75
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: supports some offline deployment methods
- Loading branch information
1 parent
0267809
commit 357c2be
Showing
11 changed files
with
237 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import logging | ||
|
||
from django.views.decorators.cache import never_cache | ||
|
||
from console.views.base import RegionTenantHeaderView | ||
from www.apiclient.regionapi import RegionInvokeApi | ||
from www.utils.return_message import general_message | ||
from rest_framework.response import Response | ||
|
||
logger = logging.getLogger("default") | ||
region_api = RegionInvokeApi() | ||
|
||
|
||
class TenantImageRepositories(RegionTenantHeaderView): | ||
@never_cache | ||
def get(self, request, *args, **kwargs): | ||
res, body = region_api.get_tenant_image_repositories(self.region_name, self.tenant_name, self.tenant.namespace) | ||
result = general_message(200, "success", "请求成功", list=body.get("list", [])) | ||
return Response(result, status=result["code"]) | ||
|
||
|
||
class TenantImageTags(RegionTenantHeaderView): | ||
@never_cache | ||
def get(self, request, *args, **kwargs): | ||
repository = request.GET.get("repository", None) | ||
res, body = region_api.get_tenant_image_tags(self.region_name, self.tenant_name, repository) | ||
result = general_message(200, "success", "请求成功", list=body.get("list", [])) | ||
return Response(result, status=result["code"]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters