From c99c7969c307cdfe14d69514bcae135cf0c95be2 Mon Sep 17 00:00:00 2001 From: rallytime Date: Fri, 5 Aug 2016 14:26:46 -0600 Subject: [PATCH] Remove deprecated created, started, and cloned functions from lxc state Also updates the Carbon release notes to include these removals and includes which functions replace the deprecated functions --- doc/topics/releases/carbon.rst | 8 +++++ salt/states/lxc.py | 53 ---------------------------------- 2 files changed, 8 insertions(+), 53 deletions(-) diff --git a/doc/topics/releases/carbon.rst b/doc/topics/releases/carbon.rst index fc209867fc..a7b20e186c 100644 --- a/doc/topics/releases/carbon.rst +++ b/doc/topics/releases/carbon.rst @@ -369,6 +369,14 @@ Deprecations For additional information see the documentation for the ``reg`` execution and state modules. +- ``lxc`` state module The following functions were removed from the ``lxc`` state + module. Each function was replaced with ``present`` state: + + - created: replaced by the ``present`` state. + - started: replaced by the ``running`` state. + - cloned: replaced by the ``present`` state, with the ``clone_from`` argument set + to the name of the clone source. + - ``ip_in_subnet`` function in salt.utils.network.py has been removed. Use the ``in_subnet`` function instead. diff --git a/salt/states/lxc.py b/salt/states/lxc.py index 3418051116..dbb83ab539 100644 --- a/salt/states/lxc.py +++ b/salt/states/lxc.py @@ -634,59 +634,6 @@ def stopped(name, kill=False, path=None): return ret -# Deprecated states -def created(name, **kwargs): - ''' - .. deprecated:: 2015.5.0 - Use :mod:`lxc.present ` - ''' - salt.utils.warn_until( - 'Carbon', - 'The lxc.created state has been renamed to lxc.present, please use ' - 'lxc.present' - ) - return present(name, **kwargs) - - -def started(name, path=None, restart=False): - ''' - .. deprecated:: 2015.5.0 - Use :mod:`lxc.running ` - ''' - salt.utils.warn_until( - 'Carbon', - 'The lxc.started state has been renamed to lxc.running, please use ' - 'lxc.running' - ) - return running(name, restart=restart, path=path) - - -def cloned(name, - orig, - snapshot=True, - size=None, - vgname=None, - path=None, - profile=None): - ''' - .. deprecated:: 2015.5.0 - Use :mod:`lxc.present ` - ''' - salt.utils.warn_until( - 'Carbon', - 'The lxc.cloned state has been merged into the lxc.present state. ' - 'Please update your states to use lxc.present, with the ' - '\'clone_from\' argument set to the name of the clone source.' - ) - return present(name, - clone_from=orig, - snapshot=snapshot, - size=size, - vgname=vgname, - path=path, - profile=profile) - - def set_pass(name, **kwargs): # pylint: disable=W0613 ''' .. deprecated:: 2015.5.0