Skip to content

Commit

Permalink
Merge pull request #9 from dell/release_1.7.0
Browse files Browse the repository at this point in the history
release 1.7.0 for PyPowerStore python library
  • Loading branch information
shenda1 committed Jun 21, 2022
2 parents 3983982 + a96a5df commit c08b35f
Show file tree
Hide file tree
Showing 64 changed files with 791 additions and 1,451 deletions.
3 changes: 3 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# PyPowerStore Change Log

## Version 1.7.0 - released on 28/06/22
- Added configuration operations include LDAP domain and LDAP accounts and getting high level facts about the LDAP accounts.

## Version 1.6.0 - released on 25/03/22
- Added configuration operations includes SMTP configuration, email notification, NTP servers, DNS servers, remote support and remote support contacts and getting high level facts about all these entities.

Expand Down
2 changes: 1 addition & 1 deletion ProgrammersGuideExamples/appliance_examples.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
# Copyright: (c) 2021, Dell EMC
# Copyright: (c) 2021, Dell Technologies

""" Appliance operations"""

Expand Down
2 changes: 1 addition & 1 deletion ProgrammersGuideExamples/certificate_examples.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
# Copyright: (c) 2021, Dell EMC
# Copyright: (c) 2021, Dell Technologies

""" Certificate operations"""

Expand Down
2 changes: 1 addition & 1 deletion ProgrammersGuideExamples/chap_config_examples.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
# Copyright: (c) 2021, Dell EMC
# Copyright: (c) 2021, Dell Technologies

""" CHAP config operations"""

Expand Down
2 changes: 1 addition & 1 deletion ProgrammersGuideExamples/cluster_examples.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
# Copyright: (c) 2021, Dell EMC
# Copyright: (c) 2021, Dell Technologies

""" Cluster Operations"""
from PyPowerStore import powerstore_conn
Expand Down
2 changes: 1 addition & 1 deletion ProgrammersGuideExamples/dns_examples.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
# Copyright: (c) 2022, Dell EMC
# Copyright: (c) 2022, Dell Technologies

""" DNS operations"""

Expand Down
2 changes: 1 addition & 1 deletion ProgrammersGuideExamples/email_examples.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
# Copyright: (c) 2022, Dell EMC
# Copyright: (c) 2022, Dell Technologies

""" Email operations"""

Expand Down
2 changes: 1 addition & 1 deletion ProgrammersGuideExamples/file_system_examples.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
# Copyright: (c) 2020, Dell EMC
# Copyright: (c) 2020, Dell Technologies

""" File System Operations"""
from PyPowerStore import powerstore_conn
Expand Down
2 changes: 1 addition & 1 deletion ProgrammersGuideExamples/file_tree_quota_examples.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
# Copyright: (c) 2020, Dell EMC
# Copyright: (c) 2020, Dell Technologies

""" File Tree Quota Operations"""
from PyPowerStore import powerstore_conn
Expand Down
2 changes: 1 addition & 1 deletion ProgrammersGuideExamples/file_user_quota_examples.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
# Copyright: (c) 2020, Dell EMC
# Copyright: (c) 2020, Dell Technologies

""" File User Quota Operations"""
from PyPowerStore import powerstore_conn
Expand Down
126 changes: 0 additions & 126 deletions ProgrammersGuideExamples/gather_facts_examples.py

This file was deleted.

2 changes: 1 addition & 1 deletion ProgrammersGuideExamples/host_examples.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
# Copyright: (c) 2019, Dell EMC
# Copyright: (c) 2019, Dell Technologies

""" Host Module Operations"""

Expand Down
2 changes: 1 addition & 1 deletion ProgrammersGuideExamples/host_group_examples.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
# Copyright: (c) 2019, Dell EMC
# Copyright: (c) 2019, Dell Technologies

""" Host Group Module Operations"""

Expand Down
2 changes: 1 addition & 1 deletion ProgrammersGuideExamples/info_examples.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
# Copyright: (c) 2019-2021, Dell EMC
# Copyright: (c) 2019-2021, Dell Technologies

""" Info Module Operations"""

Expand Down
2 changes: 1 addition & 1 deletion ProgrammersGuideExamples/ip_pool_address_examples.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
# Copyright: (c) 2021, Dell EMC
# Copyright: (c) 2021, Dell Technologies

""" IP Pool Address Operations"""
from PyPowerStore import powerstore_conn
Expand Down
2 changes: 1 addition & 1 deletion ProgrammersGuideExamples/ip_port_examples.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
# Copyright: (c) 2021, Dell EMC
# Copyright: (c) 2021, Dell Technologies

""" IP Port Operations"""
from PyPowerStore import powerstore_conn
Expand Down
48 changes: 48 additions & 0 deletions ProgrammersGuideExamples/ldap_account_examples.py
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)
57 changes: 57 additions & 0 deletions ProgrammersGuideExamples/ldap_domain_examples.py
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)
2 changes: 1 addition & 1 deletion ProgrammersGuideExamples/local_user_examples.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
# Copyright: (c) 2021, Dell EMC
# Copyright: (c) 2021, Dell Technologies

""" Local User Operations"""
from PyPowerStore import powerstore_conn
Expand Down
2 changes: 1 addition & 1 deletion ProgrammersGuideExamples/nas_server_examples.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
# Copyright: (c) 2020, Dell EMC
# Copyright: (c) 2020, Dell Technologies

""" NAS Server Operations"""
from PyPowerStore import powerstore_conn
Expand Down
2 changes: 1 addition & 1 deletion ProgrammersGuideExamples/network_examples.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
# Copyright: (c) 2021, Dell EMC
# Copyright: (c) 2021, Dell Technologies

""" Network Operations"""
from PyPowerStore import powerstore_conn
Expand Down
2 changes: 1 addition & 1 deletion ProgrammersGuideExamples/nfs_export_examples.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
# Copyright: (c) 2020, Dell EMC
# Copyright: (c) 2020, Dell Technologies

""" NFS Export Operations"""
from PyPowerStore import powerstore_conn
Expand Down
2 changes: 1 addition & 1 deletion ProgrammersGuideExamples/ntp_examples.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
# Copyright: (c) 2022, Dell EMC
# Copyright: (c) 2022, Dell Technologies

""" NTP operations"""

Expand Down
2 changes: 1 addition & 1 deletion ProgrammersGuideExamples/protection_examples.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
# Copyright: (c) 2019, Dell EMC
# Copyright: (c) 2019, Dell Technologies

""" Protection Policy Module Operations"""

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
# Copyright: (c) 2022, Dell EMC
# Copyright: (c) 2022, Dell Technologies

""" Remote Support Contact operations"""

Expand Down
2 changes: 1 addition & 1 deletion ProgrammersGuideExamples/remote_support_examples.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
# Copyright: (c) 2022, Dell EMC
# Copyright: (c) 2022, Dell Technologies

""" Remote Support operations"""

Expand Down
Loading

0 comments on commit c08b35f

Please sign in to comment.