11# -*- coding: utf-8 -*-
2- # Copyright: (c) 2019 , Dell Technologies
2+ # Copyright: (c) 2024 , Dell Technologies
33
44"""Helper module for PowerStore"""
55import logging
66from pkg_resources import parse_version
7+ from PyPowerStore .utils import constants
78
89provisioning_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
0 commit comments