Merge pull request #40910 from sjorge/mdata-relnotes

update oxygen release notes for grains deprecation
This commit is contained in:
Mike Place 2017-04-27 05:08:27 -06:00 committed by GitHub
commit cb7aa0856a
2 changed files with 10 additions and 0 deletions

View File

@ -62,3 +62,11 @@ The ``cmd`` state had the following changes:
The ``file`` state had the following changes:
- The ``show_diff`` option was removed. Please use ``show_changes`` instead.
Grain Deprecations
------------------
For ``smartos`` some grains have been deprecated. These grains will be removed in Neon.
- The ``hypervisor_uuid`` has been replaced with ``mdata:sdc:server_uuid`` grain.
- The ``datacenter`` has been replaced with ``mdata:sdc:datacenter_name`` grain.

View File

@ -128,6 +128,7 @@ def _sdc_mdata(mdata_list=None, mdata_get=None):
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']:
@ -158,6 +159,7 @@ 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