Pure Storage - bump version numbers for 2024.1 (Caracal)

Pure uses the version number of the driver to identify which
customers are using which versions of OpenStack.

This will help granular analysis of which driver is being
used in each OpenStack version.

Additionally, change ``user_agent`` string to report
operating system name and version, rather than the kernel
version.

Change-Id: I26e01621d3de5eb4edc647f82f0582a4de6744dc
This commit is contained in:
Simon Dodsley 2023-12-21 10:42:13 -05:00
parent befc7277a1
commit 14026861ca
6 changed files with 17 additions and 9 deletions

View File

@ -737,11 +737,11 @@ class PureDriverTestCase(test.TestCase):
func, *args, **kwargs)
mock_func.side_effect = original_side_effect
@mock.patch('platform.platform')
def test_for_user_agent(self, mock_platform):
mock_platform.return_value = 'MyFavoritePlatform'
@mock.patch('distro.name')
def test_for_user_agent(self, mock_distro):
mock_distro.return_value = 'MyFavouriteDistro'
driver = pure.PureBaseVolumeDriver(configuration=self.mock_config)
expected_agent = "OpenStack Cinder %s/%s (MyFavoritePlatform)" % (
expected_agent = "OpenStack Cinder %s/%s (MyFavouriteDistro)" % (
driver.__class__.__name__,
driver.VERSION
)

View File

@ -20,10 +20,10 @@ This driver requires Purity version 4.0.0 or later.
import functools
import ipaddress
import math
import platform
import re
import uuid
import distro
from os_brick import constants as brick_constants
from oslo_config import cfg
from oslo_log import log as logging
@ -257,7 +257,7 @@ class PureBaseVolumeDriver(san.SanDriver):
'base': USER_AGENT_BASE,
'class': self.__class__.__name__,
'version': self.VERSION,
'platform': platform.platform()
'platform': distro.name(pretty=True)
}
@classmethod
@ -2895,7 +2895,7 @@ class PureISCSIDriver(PureBaseVolumeDriver, san.SanISCSIDriver):
the underlying storage connectivity with the FlashArray.
"""
VERSION = "17.0.iscsi"
VERSION = "18.0.iscsi"
def __init__(self, *args, **kwargs):
execute = kwargs.pop("execute", utils.execute)
@ -3120,7 +3120,7 @@ class PureFCDriver(PureBaseVolumeDriver, driver.FibreChannelDriver):
supports the Cinder Fibre Channel Zone Manager.
"""
VERSION = "17.0.fc"
VERSION = "18.0.fc"
def __init__(self, *args, **kwargs):
execute = kwargs.pop("execute", utils.execute)
@ -3318,7 +3318,7 @@ class PureNVMEDriver(PureBaseVolumeDriver, driver.BaseVD):
FlashArray.
"""
VERSION = "17.0.nvme"
VERSION = "18.0.nvme"
def __init__(self, *args, **kwargs):
execute = kwargs.pop("execute", utils.execute)

View File

@ -11,6 +11,7 @@ krest>=1.3.0 # Apache-2.0
# Pure Storage
purestorage>=1.17.0 # BSD
distro # Apache-2.0
# Dell EMC VMAX, IBM DS8K
pyOpenSSL>=1.0.0 # Apache-2.0

View File

@ -0,0 +1,5 @@
---
other:
- |
[Pure Storage] ``user_agent`` string changed from reporting kernel
version to operating system distro and version.

View File

@ -63,3 +63,4 @@ cryptography>=3.1 # BSD/Apache-2.0
cursive>=0.2.2 # Apache-2.0
zstd>=1.4.5.1 # BSD
boto3>=1.18.49 # Apache-2.0
distro>=1.8.0 # Apache-2.0

View File

@ -20,3 +20,4 @@ testtools>=2.4.0 # MIT
doc8>=0.8.1 # Apache-2.0
mypy>=1.2.0 # MIT
moto>=2.2.5 # Apache-2.0
distro>=1.8.0 # Apache-2.0