-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9 from dell/release_1.7.0
release 1.7.0 for PyPowerStore python library
- Loading branch information
Showing
64 changed files
with
791 additions
and
1,451 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
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 was deleted.
Oops, something went wrong.
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,48 @@ | ||
# -*- coding: utf-8 -*- | ||
# Copyright: (c) 2022, Dell Technologies | ||
|
||
""" LDAP Account operations""" | ||
|
||
from PyPowerStore import powerstore_conn | ||
|
||
CONN = powerstore_conn.PowerStoreConn(username="<username>", | ||
password="<password>", | ||
server_ip="<server_ip>", | ||
verify=False, | ||
timeout=180.0) | ||
print(CONN) | ||
|
||
# Create LDAP account | ||
create_dict = { | ||
|
||
"domain_id": "2", | ||
"name": "ldap_test_user_1", | ||
"type": "User", | ||
"role_id": "1" | ||
|
||
} | ||
resp = CONN.config_mgmt.create_ldap_account(create_dict) | ||
print(resp) | ||
|
||
# Modify LDAP account | ||
modify_dict = { | ||
"role_id": "2" | ||
} | ||
resp = CONN.config_mgmt.modify_ldap_account_details(resp['id'], modify_dict) | ||
print(resp) | ||
|
||
# Get LDAP account list | ||
ldap_account_list = CONN.config_mgmt.get_ldap_account_list() | ||
print(ldap_account_list) | ||
|
||
# Get LDAP account details | ||
ldap_account_details = CONN.config_mgmt.get_ldap_account_details(ldap_account_list[0]['id']) | ||
print(ldap_account_details) | ||
|
||
# Get LDAP account details by name | ||
ldap_account_details = CONN.config_mgmt.get_ldap_account_details_by_name(ldap_account_list[0]['name']) | ||
print(ldap_account_details) | ||
|
||
# Delete LDAP domain configuration | ||
resp = CONN.config_mgmt.delete_ldap_account(ldap_account_details['id']) | ||
print(resp) |
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,57 @@ | ||
# -*- coding: utf-8 -*- | ||
# Copyright: (c) 2022, Dell Technologies | ||
|
||
""" LDAP domain operations""" | ||
|
||
from PyPowerStore import powerstore_conn | ||
|
||
CONN = powerstore_conn.PowerStoreConn(username="<username>", | ||
password="<password>", | ||
server_ip="<IP>", | ||
verify=False, | ||
application_type="<Application>", | ||
timeout=180.0) | ||
print(CONN) | ||
|
||
# Create LDAP domain configuration | ||
create_dict = { | ||
"domain_name": "<<domain_name>>", | ||
"ldap_servers": [ | ||
"<<ldap_server_ip>>" | ||
], | ||
"protocol": "LDAP", | ||
"ldap_server_type": "OpenLDAP", | ||
"bind_user": "<<LDAP_user_DN>>", | ||
"bind_password": "<<password>>", | ||
"is_global_catalog": False, | ||
"user_search_path": "cn=Users", | ||
"group_search_path": "cn=Users" | ||
} | ||
resp = CONN.config_mgmt.create_ldap_domain_configuration(create_dict) | ||
print(resp) | ||
|
||
# Verify LDAP domain configuration | ||
print(CONN.config_mgmt.verify_ldap_domain_configuration(resp['id'])) | ||
|
||
# Modify LDAP domain configuration | ||
modify_dict = { | ||
"ldap_server_type": "AD" | ||
} | ||
resp = CONN.config_mgmt.modify_ldap_domain_configuration(resp['id'], modify_dict) | ||
print(resp) | ||
|
||
# Get LDAP domain configuration list | ||
ldap_domain_list = CONN.config_mgmt.get_ldap_domain_configuration_list() | ||
print(ldap_domain_list) | ||
|
||
# Get LDAP domain configuration details | ||
ldap_domain_details = CONN.config_mgmt.get_ldap_domain_configuration_details(ldap_domain_list[0]['id']) | ||
print(ldap_domain_details) | ||
|
||
# Get LDAP domain configuration details by name | ||
ldap_domain_details = CONN.config_mgmt.get_ldap_domain_configuration_details_by_name(ldap_domain_details['domain_name']) | ||
print(ldap_domain_details) | ||
|
||
# Delete LDAP domain configuration | ||
resp = CONN.config_mgmt.delete_ldap_domain_configuration(resp['id']) | ||
print(resp) |
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
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
Oops, something went wrong.