PyPowerStore 3.2.0.0__tar.gz → 3.3.0.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {PyPowerStore-3.2.0.0 → PyPowerStore-3.3.0.0}/PKG-INFO +1 -1
- {PyPowerStore-3.2.0.0 → PyPowerStore-3.3.0.0}/PyPowerStore/__init__.py +1 -1
- {PyPowerStore-3.2.0.0 → PyPowerStore-3.3.0.0}/PyPowerStore/protection.py +2 -2
- {PyPowerStore-3.2.0.0 → PyPowerStore-3.3.0.0}/PyPowerStore/provisioning.py +42 -1
- {PyPowerStore-3.2.0.0 → PyPowerStore-3.3.0.0}/PyPowerStore/utils/constants.py +4 -0
- {PyPowerStore-3.2.0.0 → PyPowerStore-3.3.0.0}/PyPowerStore/utils/exception.py +1 -1
- {PyPowerStore-3.2.0.0 → PyPowerStore-3.3.0.0}/PyPowerStore.egg-info/PKG-INFO +1 -1
- {PyPowerStore-3.2.0.0 → PyPowerStore-3.3.0.0}/setup.py +1 -1
- {PyPowerStore-3.2.0.0 → PyPowerStore-3.3.0.0}/PyPowerStore/client.py +0 -0
- {PyPowerStore-3.2.0.0 → PyPowerStore-3.3.0.0}/PyPowerStore/configuration.py +0 -0
- {PyPowerStore-3.2.0.0 → PyPowerStore-3.3.0.0}/PyPowerStore/objects/__init__.py +0 -0
- {PyPowerStore-3.2.0.0 → PyPowerStore-3.3.0.0}/PyPowerStore/objects/file_dns.py +0 -0
- {PyPowerStore-3.2.0.0 → PyPowerStore-3.3.0.0}/PyPowerStore/objects/file_interface.py +0 -0
- {PyPowerStore-3.2.0.0 → PyPowerStore-3.3.0.0}/PyPowerStore/objects/file_nis.py +0 -0
- {PyPowerStore-3.2.0.0 → PyPowerStore-3.3.0.0}/PyPowerStore/objects/nfs_server.py +0 -0
- {PyPowerStore-3.2.0.0 → PyPowerStore-3.3.0.0}/PyPowerStore/objects/smb_server.py +0 -0
- {PyPowerStore-3.2.0.0 → PyPowerStore-3.3.0.0}/PyPowerStore/powerstore_conn.py +0 -0
- {PyPowerStore-3.2.0.0 → PyPowerStore-3.3.0.0}/PyPowerStore/utils/__init__.py +0 -0
- {PyPowerStore-3.2.0.0 → PyPowerStore-3.3.0.0}/PyPowerStore/utils/helpers.py +0 -0
- {PyPowerStore-3.2.0.0 → PyPowerStore-3.3.0.0}/PyPowerStore.egg-info/SOURCES.txt +0 -0
- {PyPowerStore-3.2.0.0 → PyPowerStore-3.3.0.0}/PyPowerStore.egg-info/dependency_links.txt +0 -0
- {PyPowerStore-3.2.0.0 → PyPowerStore-3.3.0.0}/PyPowerStore.egg-info/requires.txt +0 -0
- {PyPowerStore-3.2.0.0 → PyPowerStore-3.3.0.0}/PyPowerStore.egg-info/top_level.txt +0 -0
- {PyPowerStore-3.2.0.0 → PyPowerStore-3.3.0.0}/README.md +0 -0
- {PyPowerStore-3.2.0.0 → PyPowerStore-3.3.0.0}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# -*- coding: utf-8 -*-
|
|
2
|
-
# Copyright: (c)
|
|
3
|
-
# Copyright: (c)
|
|
2
|
+
# Copyright: (c) 2024, Dell Technologies
|
|
3
|
+
# Copyright: (c) 2024, Ivan Pchelintsev <Ivan.Pchelintsev@emc.com>
|
|
4
4
|
|
|
5
5
|
"""Collection of protection related functions for PowerStore"""
|
|
6
6
|
|
|
@@ -2010,7 +2010,7 @@ class Provisioning:
|
|
|
2010
2010
|
LOG.info("Getting smbshares with filter: '%s' and all_pages: %s"
|
|
2011
2011
|
% (filter_dict, all_pages))
|
|
2012
2012
|
querystring = helpers.prepare_querystring(
|
|
2013
|
-
constants.
|
|
2013
|
+
constants.SELECT_ALL_SMB_SHARE, filter_dict)
|
|
2014
2014
|
LOG.info("Querystring: '%s'" % querystring)
|
|
2015
2015
|
return self.client.request(constants.GET,
|
|
2016
2016
|
constants.GET_SMB_SHARE_LIST_URL.format
|
|
@@ -2109,6 +2109,47 @@ class Provisioning:
|
|
|
2109
2109
|
self.server_ip, share_id))
|
|
2110
2110
|
# SMB Share Methods End
|
|
2111
2111
|
|
|
2112
|
+
# ACL Methods
|
|
2113
|
+
|
|
2114
|
+
def get_acl(self, share_id):
|
|
2115
|
+
"""
|
|
2116
|
+
Retrieves the Access Control List (ACL) details for a given share ID.
|
|
2117
|
+
|
|
2118
|
+
:param share_id: The ID of the share for which to retrieve the ACL details.
|
|
2119
|
+
:type share_id: str
|
|
2120
|
+
:return: The response from the client's request to retrieve the ACL details.
|
|
2121
|
+
:rtype: dict
|
|
2122
|
+
"""
|
|
2123
|
+
LOG.info(f"Getting ACL details: '{share_id}'")
|
|
2124
|
+
return self.client.request(
|
|
2125
|
+
constants.POST,
|
|
2126
|
+
constants.GET_ACL_DETAILS.format(self.server_ip, share_id),
|
|
2127
|
+
)
|
|
2128
|
+
|
|
2129
|
+
def set_acl(self, share_id, add_aces=None, remove_aces=None):
|
|
2130
|
+
"""
|
|
2131
|
+
Sets the access control list (ACL) for a given share.
|
|
2132
|
+
Args:
|
|
2133
|
+
share_id (str): The ID of the share.
|
|
2134
|
+
add_aces (list, optional): A list of access control entries
|
|
2135
|
+
(ACEs) to add to the ACL. Defaults to None.
|
|
2136
|
+
remove_aces (list, optional): A list of access control entries
|
|
2137
|
+
(ACEs) to remove from the ACL. Defaults to None.
|
|
2138
|
+
|
|
2139
|
+
Returns:
|
|
2140
|
+
dict: The response from the server after setting the ACL.
|
|
2141
|
+
"""
|
|
2142
|
+
payload = dict()
|
|
2143
|
+
if add_aces:
|
|
2144
|
+
payload["add_aces"] = add_aces
|
|
2145
|
+
if remove_aces:
|
|
2146
|
+
payload["remove_aces"] = remove_aces
|
|
2147
|
+
return self.client.request(
|
|
2148
|
+
constants.POST, constants.SET_ACL_DETAILS.format(
|
|
2149
|
+
self.server_ip, share_id), payload=payload)
|
|
2150
|
+
|
|
2151
|
+
# ACL Methods End
|
|
2152
|
+
|
|
2112
2153
|
# FS Quota Methods
|
|
2113
2154
|
def get_file_tree_quotas(self, filter_dict=None, all_pages=False):
|
|
2114
2155
|
"""Get a list of file tree quotas.
|
|
@@ -640,6 +640,10 @@ GET_SMB_SHARE_DETAILS_URL = 'https://{0}/api/rest/smb_share/{1}'
|
|
|
640
640
|
MODIFY_SMB_SHARE_URL = GET_SMB_SHARE_DETAILS_URL
|
|
641
641
|
DELETE_SMB_SHARE_URL = GET_SMB_SHARE_DETAILS_URL
|
|
642
642
|
|
|
643
|
+
# SMB Share ACL endpoints
|
|
644
|
+
GET_ACL_DETAILS = 'https://{0}/api/rest/smb_share/{1}/get_acl'
|
|
645
|
+
SET_ACL_DETAILS = 'https://{0}/api/rest/smb_share/{1}/set_acl'
|
|
646
|
+
|
|
643
647
|
# File Tree Quota endpoints
|
|
644
648
|
GET_TREE_QUOTA_LIST_URL = 'https://{0}/api/rest/file_tree_quota'
|
|
645
649
|
CREATE_TREE_QUOTA_URL = GET_TREE_QUOTA_LIST_URL
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|