Skip to content

Commit 03a33c4

Browse files
committed
Add Lifecycle management APIs for NAS SDK.
1 parent 90ab7d7 commit 03a33c4

File tree

53 files changed

+582
-65
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+582
-65
lines changed

aliyun-python-sdk-nas/ChangeLog.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
2020-07-27 Version: 3.9.0
2+
- Add Lifecycle management APIs for NAS SDK.
3+
- Add Quota management APIs for NAS SDK.
4+
15
2020-04-02 Version: 3.7.0
26
- Update CreateFileSystem for NAS SDK.
37

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = '3.7.0'
1+
__version__ = '3.9.0'

aliyun-python-sdk-nas/aliyunsdknas/request/v20170626/AddClientToBlackListRequest.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@
2323
class AddClientToBlackListRequest(RpcRequest):
2424

2525
def __init__(self):
26-
RpcRequest.__init__(self, 'NAS', '2017-06-26', 'AddClientToBlackList','nas')
26+
RpcRequest.__init__(self, 'NAS', '2017-06-26', 'AddClientToBlackList','nas')
27+
self.set_method('POST')
2728
if hasattr(self, "endpoint_map"):
2829
setattr(self, "endpoint_map", endpoint_data.getEndpointMap())
2930
if hasattr(self, "endpoint_regional"):

aliyun-python-sdk-nas/aliyunsdknas/request/v20170626/AddTagsRequest.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@
2323
class AddTagsRequest(RpcRequest):
2424

2525
def __init__(self):
26-
RpcRequest.__init__(self, 'NAS', '2017-06-26', 'AddTags','nas')
26+
RpcRequest.__init__(self, 'NAS', '2017-06-26', 'AddTags','nas')
27+
self.set_method('POST')
2728
if hasattr(self, "endpoint_map"):
2829
setattr(self, "endpoint_map", endpoint_data.getEndpointMap())
2930
if hasattr(self, "endpoint_regional"):
@@ -33,13 +34,12 @@ def __init__(self):
3334
def get_Tags(self):
3435
return self.get_query_params().get('Tags')
3536

36-
def set_Tags(self,Tags):
37-
for i in range(len(Tags)):
38-
if Tags[i].get('Value') is not None:
39-
self.add_query_param('Tag.' + str(i + 1) + '.Value' , Tags[i].get('Value'))
40-
if Tags[i].get('Key') is not None:
41-
self.add_query_param('Tag.' + str(i + 1) + '.Key' , Tags[i].get('Key'))
42-
37+
def set_Tags(self, Tags):
38+
for depth1 in range(len(Tags)):
39+
if Tags[depth1].get('Value') is not None:
40+
self.add_query_param('Tag.' + str(depth1 + 1) + '.Value', Tags[depth1].get('Value'))
41+
if Tags[depth1].get('Key') is not None:
42+
self.add_query_param('Tag.' + str(depth1 + 1) + '.Key', Tags[depth1].get('Key'))
4343

4444
def get_FileSystemId(self):
4545
return self.get_query_params().get('FileSystemId')

aliyun-python-sdk-nas/aliyunsdknas/request/v20170626/ApplyAutoSnapshotPolicyRequest.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@
2323
class ApplyAutoSnapshotPolicyRequest(RpcRequest):
2424

2525
def __init__(self):
26-
RpcRequest.__init__(self, 'NAS', '2017-06-26', 'ApplyAutoSnapshotPolicy','nas')
26+
RpcRequest.__init__(self, 'NAS', '2017-06-26', 'ApplyAutoSnapshotPolicy','nas')
27+
self.set_method('POST')
2728
if hasattr(self, "endpoint_map"):
2829
setattr(self, "endpoint_map", endpoint_data.getEndpointMap())
2930
if hasattr(self, "endpoint_regional"):

aliyun-python-sdk-nas/aliyunsdknas/request/v20170626/CancelAutoSnapshotPolicyRequest.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@
2323
class CancelAutoSnapshotPolicyRequest(RpcRequest):
2424

2525
def __init__(self):
26-
RpcRequest.__init__(self, 'NAS', '2017-06-26', 'CancelAutoSnapshotPolicy','nas')
26+
RpcRequest.__init__(self, 'NAS', '2017-06-26', 'CancelAutoSnapshotPolicy','nas')
27+
self.set_method('POST')
2728
if hasattr(self, "endpoint_map"):
2829
setattr(self, "endpoint_map", endpoint_data.getEndpointMap())
2930
if hasattr(self, "endpoint_regional"):
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
#
10+
# http://www.apache.org/licenses/LICENSE-2.0
11+
#
12+
#
13+
# Unless required by applicable law or agreed to in writing,
14+
# software distributed under the License is distributed on an
15+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16+
# KIND, either express or implied. See the License for the
17+
# specific language governing permissions and limitations
18+
# under the License.
19+
20+
from aliyunsdkcore.request import RpcRequest
21+
from aliyunsdknas.endpoint import endpoint_data
22+
23+
class CancelDirQuotaRequest(RpcRequest):
24+
25+
def __init__(self):
26+
RpcRequest.__init__(self, 'NAS', '2017-06-26', 'CancelDirQuota','nas')
27+
self.set_method('POST')
28+
if hasattr(self, "endpoint_map"):
29+
setattr(self, "endpoint_map", endpoint_data.getEndpointMap())
30+
if hasattr(self, "endpoint_regional"):
31+
setattr(self, "endpoint_regional", endpoint_data.getEndpointRegional())
32+
33+
34+
def get_UserId(self):
35+
return self.get_query_params().get('UserId')
36+
37+
def set_UserId(self,UserId):
38+
self.add_query_param('UserId',UserId)
39+
40+
def get_Path(self):
41+
return self.get_query_params().get('Path')
42+
43+
def set_Path(self,Path):
44+
self.add_query_param('Path',Path)
45+
46+
def get_FileSystemId(self):
47+
return self.get_query_params().get('FileSystemId')
48+
49+
def set_FileSystemId(self,FileSystemId):
50+
self.add_query_param('FileSystemId',FileSystemId)
51+
52+
def get_UserType(self):
53+
return self.get_query_params().get('UserType')
54+
55+
def set_UserType(self,UserType):
56+
self.add_query_param('UserType',UserType)

aliyun-python-sdk-nas/aliyunsdknas/request/v20170626/CreateAccessGroupRequest.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@
2323
class CreateAccessGroupRequest(RpcRequest):
2424

2525
def __init__(self):
26-
RpcRequest.__init__(self, 'NAS', '2017-06-26', 'CreateAccessGroup','nas')
26+
RpcRequest.__init__(self, 'NAS', '2017-06-26', 'CreateAccessGroup','nas')
27+
self.set_method('POST')
2728
if hasattr(self, "endpoint_map"):
2829
setattr(self, "endpoint_map", endpoint_data.getEndpointMap())
2930
if hasattr(self, "endpoint_regional"):

aliyun-python-sdk-nas/aliyunsdknas/request/v20170626/CreateAccessRuleRequest.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@
2323
class CreateAccessRuleRequest(RpcRequest):
2424

2525
def __init__(self):
26-
RpcRequest.__init__(self, 'NAS', '2017-06-26', 'CreateAccessRule','nas')
26+
RpcRequest.__init__(self, 'NAS', '2017-06-26', 'CreateAccessRule','nas')
27+
self.set_method('POST')
2728
if hasattr(self, "endpoint_map"):
2829
setattr(self, "endpoint_map", endpoint_data.getEndpointMap())
2930
if hasattr(self, "endpoint_regional"):

aliyun-python-sdk-nas/aliyunsdknas/request/v20170626/CreateAutoSnapshotPolicyRequest.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@
2323
class CreateAutoSnapshotPolicyRequest(RpcRequest):
2424

2525
def __init__(self):
26-
RpcRequest.__init__(self, 'NAS', '2017-06-26', 'CreateAutoSnapshotPolicy','nas')
26+
RpcRequest.__init__(self, 'NAS', '2017-06-26', 'CreateAutoSnapshotPolicy','nas')
27+
self.set_method('POST')
2728
if hasattr(self, "endpoint_map"):
2829
setattr(self, "endpoint_map", endpoint_data.getEndpointMap())
2930
if hasattr(self, "endpoint_regional"):

0 commit comments

Comments
 (0)