Skip to content

Commit

Permalink
Create OBS bucket with parallel file system enable
Browse files Browse the repository at this point in the history
Related-with: oap-project#1011
  • Loading branch information
kiwik committed Feb 17, 2023
1 parent f34080c commit 2e47e8e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions python/cloudtik/providers/_private/huaweicloud/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
ListVpcPeeringsRequest, ListVpcsRequest, RouteTableRoute, ShowVpcRequest, \
UpdateRouteTableReq, UpdateRoutetableReqBody, UpdateRouteTableRequest, \
VpcInfo
from obs import CreateBucketHeader

from cloudtik.core._private.cli_logger import cf, cli_logger
from cloudtik.core._private.utils import check_cidr_conflict, \
Expand Down Expand Up @@ -264,8 +265,10 @@ def _check_and_create_cloud_storage_bucket(obs_client, workspace_name):
return
else:
bucket_name = HWC_WORKSPACE_OBS_BUCKET_NAME.format(workspace_name)
# Create new bucket
resp = obs_client.createBucket(bucket_name, location=obs_client.region)
# Create new bucket with parallel file system enable
resp = obs_client.createBucket(bucket_name,
header=CreateBucketHeader(isPFS=True),
location=obs_client.region)
if resp.status < 300:
cli_logger.print(
"Successfully created OBS bucket: {}.".format(bucket_name))
Expand Down

0 comments on commit 2e47e8e

Please sign in to comment.