diff --git a/CHANGELOG.md b/CHANGELOG.md index da84c56a7a12..2b1fd7fcf2d9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,8 +13,11 @@ Versions are `MAJOR.PATCH`. - [#54943](https://github.com/saltstack/salt/pull/54943) - RAET transport method has been removed per the deprecation schedule - [@s0undt3ch](https://github.com/s0undt3ch) ### Deprecated + +- [#55609](https://github.com/saltstack/salt/pull/55609) - Remove smartos grains `hypervisor_uuid` and `datacenter` in favor of `mdata:sdc:server_uuid` and `mdata:sdc:datacenter_name`. - [#55539](https://github.com/saltstack/salt/pull/55539) - Deprecate salt.auth.Authorize class and the any_auth method + ### Changed - [SEP 14](https://github.com/saltstack/salt-enhancement-proposals/pull/20) - Changed to numeric versions. diff --git a/doc/topics/releases/neon.rst b/doc/topics/releases/neon.rst index 30f430693ec1..18aaeda73e41 100644 --- a/doc/topics/releases/neon.rst +++ b/doc/topics/releases/neon.rst @@ -118,8 +118,17 @@ Returner Removal to Slack, the :py:func:`slack ` returner may be a suitable replacement. +Grain Deprecations +------------------ + +For ``smartos`` some grains have been deprecated. These grains have been removed. + + - The ``hypervisor_uuid`` has been replaced with ``mdata:sdc:server_uuid`` grain. + - The ``datacenter`` has been replaced with ``mdata:sdc:datacenter_name`` grain. + salt.auth.Authorize Class Removal --------------------------------- - The salt.auth.Authorize Class inside of the `salt/auth/__init__.py` file has been removed and the `any_auth` method inside of the file `salt/utils/minions.py`. These method and classes were not being used inside of the salt code base. + diff --git a/salt/grains/mdata.py b/salt/grains/mdata.py index db207a1e52a9..4ba6465410cc 100644 --- a/salt/grains/mdata.py +++ b/salt/grains/mdata.py @@ -125,30 +125,6 @@ def _sdc_mdata(mdata_list=None, mdata_get=None): return grains -def _legacy_grains(grains): - ''' - Grains for backwards compatibility - Remove this function in Neon - ''' - # parse legacy sdc grains - if 'mdata' in grains and 'sdc' in grains['mdata']: - if 'server_uuid' not in grains['mdata']['sdc'] or 'FAILURE' in grains['mdata']['sdc']['server_uuid']: - grains['hypervisor_uuid'] = 'unknown' - else: - grains['hypervisor_uuid'] = grains['mdata']['sdc']['server_uuid'] - - if 'datacenter_name' not in grains['mdata']['sdc'] or 'FAILURE' in grains['mdata']['sdc']['datacenter_name']: - grains['datacenter'] = 'unknown' - else: - grains['datacenter'] = grains['mdata']['sdc']['datacenter_name'] - - # parse rules grains - if 'mdata' in grains and 'rules' in grains['mdata']: - grains['roles'] = grains['mdata']['roles'].split(',') - - return grains - - def mdata(): ''' Provide grains from the SmartOS metadata @@ -159,8 +135,6 @@ def mdata(): grains = salt.utils.dictupdate.update(grains, _user_mdata(mdata_list, mdata_get), merge_lists=True) grains = salt.utils.dictupdate.update(grains, _sdc_mdata(mdata_list, mdata_get), merge_lists=True) - ## remove _legacy_grains in Neon - grains = _legacy_grains(grains) return grains