Skip to content

Commit bd47038

Browse files
Merge pull request #28 from trisha-dell/Victory_support
Adding support for PowerStore 4.0.0.0
2 parents 4c7bb63 + a948fdf commit bd47038

File tree

7 files changed

+45
-14
lines changed

7 files changed

+45
-14
lines changed

ChangeLog.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# PyPowerStore Change Log
22

3+
## Version 3.2.0.0 - released on 30/04/24
4+
- Added support for PowerStore 4.0.0.0 version(Victory release).
5+
36
## Version 3.1.0.0 - released on 29/02/24
47
- Added support for session management using cookie.
58

PyPowerStore/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33
"""__init__.py."""
44

55
__title__ = 'PyPowerStore'
6-
__version__ = '3.1.0.0'
6+
__version__ = '3.2.0.0'
77
__author__ = 'Dell Technologies or its subsidiaries'
88
__copyright__ = 'Copyright 2024 Dell Technologies'

PyPowerStore/provisioning.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# -*- coding: utf-8 -*-
2-
# Copyright: (c) 2019, Dell Technologies
2+
# Copyright: (c) 2024, Dell Technologies
33

44
"""Collection of provisioning related functions for PowerStore"""
55

@@ -642,7 +642,9 @@ def get_volume_details(self, volume_id):
642642
"""
643643
LOG.info("Getting volume details by ID: '%s'" % volume_id)
644644
querystring = constants.SELECT_ALL_VOLUME
645-
if helpers.is_foot_hill_prime_or_higher():
645+
if helpers.is_victory_or_higher():
646+
querystring = constants.VICTORY_VOLUME_DETAILS_QUERY
647+
elif helpers.is_foot_hill_prime_or_higher():
646648
querystring = constants.FHP_VOLUME_DETAILS_QUERY
647649
elif helpers.is_foot_hill_or_higher():
648650
querystring = constants.FHC_VOLUME_DETAILS_QUERY
@@ -668,7 +670,9 @@ def get_volume_by_name(self, volume_name):
668670
"""
669671
LOG.info("Getting volume details by name: '%s'" % volume_name)
670672
querystring = constants.SELECT_ALL_VOLUME
671-
if helpers.is_foot_hill_prime_or_higher():
673+
if helpers.is_victory_or_higher():
674+
querystring = constants.VICTORY_VOLUME_DETAILS_QUERY
675+
elif helpers.is_foot_hill_prime_or_higher():
672676
querystring = constants.FHP_VOLUME_DETAILS_QUERY
673677
elif helpers.is_foot_hill_or_higher():
674678
querystring = constants.FHC_VOLUME_DETAILS_QUERY

PyPowerStore/utils/constants.py

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,12 @@
2222
# max number of items limit in a response
2323
MAX_LIMIT = 2000
2424

25-
# Foot Hill Prime Plus Version
25+
# Platform Versions
26+
FOOTHILL_VERSION = '2.0.0.0'
27+
MALKA_VERSION = '2.1.0.0'
28+
FOOTHILL_PRIME_VERSION = '3.0.0.0'
2629
FOOTHILL_PRIME_PLUS_VERSION = '3.2.0.0'
30+
VICTORY_VERSION = '4.0.0.0'
2731

2832
# Query params
2933

@@ -64,6 +68,16 @@
6468
"migration_session_id"
6569
}
6670

71+
VICTORY_VOLUME_DETAILS_QUERY = {
72+
"select": "id,name,description,type,wwn,nsid,nguid,appliance_id,state,"
73+
"size,logical_used,node_affinity,creation_timestamp,"
74+
"protection_policy_id,performance_policy_id,qos_performance_policy_id,"
75+
"is_replication_destination,migration_session_id,metro_replication_session_id,"
76+
"is_host_access_available,protection_data,location_history,"
77+
"app_type,app_type_other,type_l10n,state_l10n,node_affinity_l10n,app_type_l10n,"
78+
"volume_groups(name,id), protection_policy(name,id)"
79+
}
80+
6781
# Host Query
6882
SELECT_ALL_HOST = {
6983
"select": "id,name,description,os_type,"

PyPowerStore/utils/helpers.py

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
# -*- coding: utf-8 -*-
2-
# Copyright: (c) 2019, Dell Technologies
2+
# Copyright: (c) 2024, Dell Technologies
33

44
"""Helper module for PowerStore"""
55
import logging
66
from pkg_resources import parse_version
7+
from PyPowerStore.utils import constants
78

89
provisioning_obj = None
910

@@ -52,10 +53,9 @@ def is_foot_hill_or_higher():
5253
:return: True if foot hill or higher
5354
:rtype: bool
5455
"""
55-
foot_hill_version = '2.0.0.0'
5656
array_version = provisioning_obj.get_array_version()
5757
if array_version and (
58-
parse_version(array_version[0:7]) >= parse_version(foot_hill_version)):
58+
parse_version(array_version[0:7]) >= parse_version(constants.FOOTHILL_VERSION)):
5959
return True
6060
return False
6161

@@ -65,10 +65,9 @@ def is_malka_or_higher():
6565
:return: True if array version is Malka or higher
6666
:rtype: bool
6767
"""
68-
malka_version = '2.1.0.0'
6968
array_version = provisioning_obj.get_array_version()
7069
if array_version and (
71-
parse_version(array_version[0:7]) >= parse_version(malka_version)):
70+
parse_version(array_version[0:7]) >= parse_version(constants.MALKA_VERSION)):
7271
return True
7372
return False
7473

@@ -78,10 +77,21 @@ def is_foot_hill_prime_or_higher():
7877
:return: True if foothill prime or higher
7978
:rtype: bool
8079
"""
81-
foot_hill_prime_version = '3.0.0.0'
8280
array_version = provisioning_obj.get_array_version()
8381
if array_version and (
84-
parse_version(array_version[0:7]) >= parse_version(foot_hill_prime_version)):
82+
parse_version(array_version[0:7]) >= parse_version(constants.FOOTHILL_PRIME_VERSION)):
83+
return True
84+
return False
85+
86+
def is_victory_or_higher():
87+
"""Returns true if the array version is victory or higher.
88+
89+
:return: True if victory or higher
90+
:rtype: bool
91+
"""
92+
array_version = provisioning_obj.get_array_version()
93+
if array_version and (
94+
parse_version(array_version[0:7]) >= parse_version(constants.VICTORY_VERSION)):
8595
return True
8696
return False
8797

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
author = 'Dell'
2626

2727
# The full version, including alpha/beta/rc tags
28-
release = '3.1.0.0'
28+
release = '3.2.0.0'
2929

3030

3131
# -- General configuration ---------------------------------------------------

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111

1212
setup(name='PyPowerStore',
13-
version='3.1.0.0',
13+
version='3.2.0.0',
1414
description='Python Library for Dell PowerStore',
1515
author='Ansible Team at Dell',
1616
author_email='ansible.team@dell.com',

0 commit comments

Comments
 (0)