Hi Robie, Sergio,

The concern about removing 'version_attributes' and 'discovery_auth_attributes'
can be addressed with this simple change/backport. 

What do you think?

Don't remove the 2 attributes / move elements into 'target_name_excloudes'.
Instead, add a new attribute / its element into 'target_name_excloudes'.

i.e., this (backport):

         version_attributes = set(["lio_version", "version"])
         discovery_auth_attributes = set(["discovery_auth"])

        +cpus_allowed_list_attributes = set(["cpus_allowed_list"])

        -target_names_excludes = version_attributes | discovery_auth_attributes
        +target_names_excludes = version_attributes | discovery_auth_attributes 
| cpus_allowed_list_attributes

instead of this (upstream):

        -version_attributes = set(["lio_version", "version"])
        -discovery_auth_attributes = set(["discovery_auth"])
        -target_names_excludes = version_attributes | discovery_auth_attributes

        +excludes_list = [
        +    # version_attributes
        +    "lio_version", "version",
        +    # discovery_auth_attributes
        +    "discovery_auth",
        +    # cpus_allowed_list_attributes
        +    "cpus_allowed_list",
        +]
        +target_names_excludes = set(excludes_list)

Python confirms the results are equivalent:

        $ python3 -q

        Backport:

        >>> version_attributes = set(["lio_version", "version"])
        >>> discovery_auth_attributes = set(["discovery_auth"])
        >>> cpus_allowed_list_attributes = set(["cpus_allowed_list"])
        >>> target_names_excludes = version_attributes | 
discovery_auth_attributes | cpus_allowed_list_attributes

        >>> target_names_excludes
        {'lio_version', 'cpus_allowed_list', 'discovery_auth', 'version'}
        >>> backport = target_names_excludes

        Upstream:

        >>> excludes_list = [
        ...     # version_attributes
        ...     "lio_version", "version",
        ...     # discovery_auth_attributes
        ...     "discovery_auth",
        ...     # cpus_allowed_list_attributes
        ...     "cpus_allowed_list",
        ... ]
        >>> target_names_excludes = set(excludes_list)

        >>> target_names_excludes
        {'lio_version', 'cpus_allowed_list', 'discovery_auth', 'version'}
        >>> upstream = target_names_excludes

        The 2 sets are identical, and not the same object:

        >>> backport == upstream
        True

        >>> backport is upstream
        False

[1] https://github.com/open-iscsi/rtslib-
fb/commit/8d2543c4da62e962661011fea5b19252b9660822

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1988366

Title:
  python-rtslib-fb needs to handle new attribute cpus_allowed_list

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/python-rtslib-fb/+bug/1988366/+subscriptions


-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to