mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 08:58:59 +00:00
Remove carbon deprecations from the virt runner
Several functions were removed as well as any references to the "hyper" kwarg. "host" should be used instead. Release notes were also updated with this information.
This commit is contained in:
parent
8f76d92b72
commit
a0dd435304
@ -369,7 +369,7 @@ 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
|
||||
- ``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.
|
||||
@ -390,3 +390,12 @@ Deprecations
|
||||
|
||||
- The ``always`` kwarg used in the ``built`` function of the ``pkgbuild`` state module
|
||||
was removed. Use ``force`` instead.
|
||||
|
||||
- ``virt`` runner module:
|
||||
|
||||
The ``hyper`` kwarg was removed from the ``init``, ``list``, and ``query`` functions.
|
||||
Use the ``host`` option instead.
|
||||
|
||||
The ``next_hyper`` function was removed. Use the ``next_host`` function instead.
|
||||
|
||||
The ``hyper_info`` function was removed. Use the ``host_info`` function instead.
|
||||
|
@ -56,20 +56,12 @@ def _find_vm(name, data, quiet=False):
|
||||
return {}
|
||||
|
||||
|
||||
def query(host=None, quiet=False, hyper=None):
|
||||
def query(host=None, quiet=False):
|
||||
'''
|
||||
Query the virtual machines. When called without options all hosts
|
||||
are detected and a full query is returned. A single host can be
|
||||
passed in to specify an individual host to query.
|
||||
'''
|
||||
if hyper is not None:
|
||||
salt.utils.warn_until(
|
||||
'Carbon',
|
||||
'Please use "host" instead of "hyper". The "hyper" argument will '
|
||||
'be removed in the Carbon release of Salt'
|
||||
)
|
||||
host = hyper
|
||||
|
||||
if quiet:
|
||||
log.warning("'quiet' is deprecated. Please migrate to --quiet")
|
||||
ret = {}
|
||||
@ -108,14 +100,6 @@ def list(host=None, quiet=False, hyper=None): # pylint: disable=redefined-built
|
||||
A single host can be passed in to specify an individual host
|
||||
to list.
|
||||
'''
|
||||
if hyper is not None:
|
||||
salt.utils.warn_until(
|
||||
'Carbon',
|
||||
'Please use "host" instead of "hyper". The "hyper" argument will '
|
||||
'be removed in the Carbon release of Salt'
|
||||
)
|
||||
host = hyper
|
||||
|
||||
if quiet:
|
||||
log.warning("'quiet' is deprecated. Please migrate to --quiet")
|
||||
ret = {}
|
||||
@ -162,20 +146,6 @@ def next_host():
|
||||
return host
|
||||
|
||||
|
||||
def next_hyper():
|
||||
'''
|
||||
Return the host to use for the next autodeployed VM. This queries
|
||||
the available host and executes some math the determine the most
|
||||
"available" next host.
|
||||
'''
|
||||
salt.utils.warn_until(
|
||||
'Carbon',
|
||||
'Please use "host" instead of "hyper". The "hyper" argument will '
|
||||
'be removed in the Carbon release of Salt'
|
||||
)
|
||||
return next_host()
|
||||
|
||||
|
||||
def host_info(host=None):
|
||||
'''
|
||||
Return information about the host connected to this master
|
||||
@ -188,24 +158,11 @@ def host_info(host=None):
|
||||
return data
|
||||
|
||||
|
||||
def hyper_info(hyper=None):
|
||||
'''
|
||||
Return information about the host connected to this master
|
||||
'''
|
||||
salt.utils.warn_until(
|
||||
'Carbon',
|
||||
'Please use "host" instead of "hyper". The "hyper" argument will '
|
||||
'be removed in the Carbon release of Salt'
|
||||
)
|
||||
return host_info(hyper)
|
||||
|
||||
|
||||
def init(
|
||||
name,
|
||||
cpu,
|
||||
mem,
|
||||
image,
|
||||
hyper=None,
|
||||
hypervisor='kvm',
|
||||
host=None,
|
||||
seed=True,
|
||||
@ -260,14 +217,6 @@ def init(
|
||||
saltenv
|
||||
The Salt environment to use
|
||||
'''
|
||||
if hyper is not None:
|
||||
salt.utils.warn_until(
|
||||
'Carbon',
|
||||
'Please use "host" instead of "hyper". The "hyper" argument will '
|
||||
'be removed in the Carbon release of Salt'
|
||||
)
|
||||
host = hyper
|
||||
|
||||
__jid_event__.fire_event({'message': 'Searching for hosts'}, 'progress')
|
||||
data = query(host, quiet=True)
|
||||
# Check if the name is already deployed
|
||||
|
Loading…
Reference in New Issue
Block a user