Change Sodium reference to 3001 (#57419)

* Change Sodium reference to 3001

* Update nacl.py

Change back name to libsodium, got changed to lib3001.

Co-authored-by: Daniel Wozniak <dwozniak@saltstack.com>
This commit is contained in:
Frode Gundersen 2020-05-22 09:26:32 -06:00 committed by GitHub
parent 51ce3946d3
commit 9536d322ac
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
57 changed files with 152 additions and 152 deletions

View file

@ -223,7 +223,7 @@ the minion also sends a similar event with an event tag like this:
``minion_start``. This duplication can cause a lot of clutter on the event bus
when there are many minions. Set ``enable_legacy_startup_events: False`` in the
minion config to ensure only the ``salt/minion/<minion_id>/start`` events are
sent. Beginning with the ``Sodium`` Salt release this option will default to
sent. Beginning with the ``3001`` Salt release this option will default to
``False``.
.. code-block:: yaml

View file

@ -997,7 +997,7 @@ if the gluster commands return a 0 ret value.
Creates
-------
.. versionadded:: Sodium
.. versionadded:: 3001
The ``creates`` requisite specifies that a state should only run when any of
the specified files do not already exist. Like ``unless``, ``creates`` requisite

View file

@ -12,7 +12,7 @@ Requirements
.. note::
Support ``winexe`` and ``impacket`` has been deprecated and will be removed in
Sodium. These dependencies are replaced by ``pypsexec`` and ``smbprotocol``
3001. These dependencies are replaced by ``pypsexec`` and ``smbprotocol``
respectivly. These are pure python alternatives that are compatible with all
supported python versions.

View file

@ -26,7 +26,7 @@ the Boron feature release.
A deprecation warning should be in place for at least two major releases before
the deprecated code and its accompanying deprecation warning are removed. More
time should be given for more complex changes. For example, if the current
release under development is ``Sodium``, the deprecated code and associated
release under development is ``3001``, the deprecated code and associated
warnings should remain in place and warn for at least ``Aluminum``.
To help in this deprecation task, salt provides

View file

@ -654,7 +654,7 @@ Returns:
``method_call``
---------------
.. versionadded:: Sodium
.. versionadded:: 3001
Returns a result of object's method call.

View file

@ -8,8 +8,8 @@ Python 2.7 Deprecation
======================
In light of Python 2.7 reaching its End of Life (EOL) on Jan 1st 2020,
Python 2 will be deprecated from SaltStack no earlier than the Sodium
release, that is either the Sodium release or a later release.
Python 2 will be deprecated from SaltStack no earlier than the 3001
release, that is either the 3001 release or a later release.
This decision is pending further community discussion.
Known Issues
@ -859,7 +859,7 @@ sent.
The new :conf_minion:`enable_legacy_startup_events` minion config option
defaults to ``True``, but will be set to default to ``False`` beginning with
the Sodium release of Salt.
the 3001 release of Salt.
The Salt Syndic currently sends an old style ``syndic_start`` event as well. The
syndic respects :conf_minion:`enable_legacy_startup_events` as well.

View file

@ -40,4 +40,4 @@ Calling runners, for example:
Will not work, and you will receive and empty reply from the salt master.
This will be addressed in the Sodium release of Salt set for mid-June 2020.
This will be addressed in the 3001 release of Salt set for mid-June 2020.

View file

@ -40,4 +40,4 @@ Calling runners, for example:
Will not work, and you will receive and empty reply from the salt master.
This will be addressed in the Sodium release of Salt set for mid-June 2020.
This will be addressed in the 3001 release of Salt set for mid-June 2020.

View file

@ -315,7 +315,7 @@ It is recommended that one modify this command a bit by removing the ``-l quiet`
Different Python Versions
=========================
The Sodium release removed python 2 support in Salt. Even though this python 2 support
The 3001 release removed python 2 support in Salt. Even though this python 2 support
is being dropped we have provided multiple ways to work around this with Salt-SSH. You
can use the following options:

View file

@ -65,10 +65,10 @@ The information which can be stored in a roster ``target`` is the following:
# commands. Will only run the first time when the thin dir
# does not exist, unless --pre-flight is passed to salt-ssh
# command or ssh_run_pre_flight is set to true in the config
# Added in Sodium Release.
# Added in 3001 Release.
set_path: # Set the path environment variable, to ensure the expected python
# binary is in the salt-ssh path, when running the command.
# Example: '$PATH:/usr/local/bin/'. Added in Sodium Release.
# Example: '$PATH:/usr/local/bin/'. Added in 3001 Release.
.. _ssh_pre_flight:
@ -76,7 +76,7 @@ The information which can be stored in a roster ``target`` is the following:
ssh_pre_flight
--------------
A Salt-SSH roster option `ssh_pre_flight` was added in the Sodium release. This enables
A Salt-SSH roster option `ssh_pre_flight` was added in the 3001 release. This enables
you to run a script before Salt-SSH tries to run any commands. You can set this option
in the roster for a specific minion or use the `roster_defaults` to set it for all minions.
This script will only run if the thin dir is not currently on the minion. This means it will

View file

@ -34,7 +34,7 @@ to below:
auto_detect
-----------
In the Sodium release the ``auto_detect`` feature was added for ``ssh_ext_alternatives``.
In the 3001 release the ``auto_detect`` feature was added for ``ssh_ext_alternatives``.
This allows salt-ssh to automatically detect the path to all of your dependencies and
does not require you to define them under ``dependencies``.

View file

@ -532,7 +532,7 @@ would only fetch branches and tags (the default).
Global Remotes
==============
.. versionadded:: 2018.3.0 for all_saltenvs, sodium for fallback
.. versionadded:: 2018.3.0 for all_saltenvs, 3001 for fallback
The ``all_saltenvs`` per-remote configuration parameter overrides the logic
Salt uses to map branches/tags to fileserver environments (i.e. saltenvs). This

View file

@ -346,7 +346,7 @@ VALID_OPTS = immutabletypes.freeze(
"log_rotate_backup_count": int,
# If an event is above this size, it will be trimmed before putting it on the event bus
"max_event_size": int,
# Enable old style events to be sent on minion_startup. Change default to False in Sodium release
# Enable old style events to be sent on minion_startup. Change default to False in 3001 release
"enable_legacy_startup_events": bool,
# Always execute states with test=True if this flag is set
"test": bool,

View file

@ -2368,7 +2368,7 @@ class Minion(MinionBase):
include_grains = True
# Send an event to the master that the minion is live
if self.opts["enable_legacy_startup_events"]:
# Old style event. Defaults to False in Sodium release.
# Old style event. Defaults to False in 3001 release.
self._fire_master(
"Minion {0} started at {1}".format(self.opts["id"], time.asctime()),
"minion_start",
@ -3190,7 +3190,7 @@ class Syndic(Minion):
def fire_master_syndic_start(self):
# Send an event to the master that the minion is live
if self.opts["enable_legacy_startup_events"]:
# Old style event. Defaults to false in Sodium release.
# Old style event. Defaults to false in 3001 release.
self._fire_master(
"Syndic {0} started at {1}".format(self.opts["id"], time.asctime()),
"syndic_start",

View file

@ -3,7 +3,7 @@
Baredoc walks the installed module and state directories and generates
dictionaries and lists of the function names and their arguments.
.. versionadded:: Sodium
.. versionadded:: 3001
"""
from __future__ import absolute_import, print_function, unicode_literals

View file

@ -448,7 +448,7 @@ def cql_query_with_prepare(
:param asynchronous: Run this query in asynchronous mode
:type asynchronous: bool
:param async: Run this query in asynchronous mode (an alias to 'asynchronous')
NOTE: currently it overrides 'asynchronous' and it will be dropped in version Sodium!
NOTE: currently it overrides 'asynchronous' and it will be dropped in version 3001!
:type async: bool
:param callback_errors: Function to call after query runs if there is an error
:type callback_errors: Function callable

View file

@ -188,7 +188,7 @@ def bootstrap(force=False, source=None):
- ftp://
- file:// - A local file on the system
.. versionadded:: Sodium
.. versionadded:: 3001
Returns:
str: The stdout of the Chocolatey installation script
@ -360,7 +360,7 @@ def unbootstrap():
"""
Uninstall chocolatey from the system by doing the following:
.. versionadded:: Sodium
.. versionadded:: 3001
- Delete the Chocolatey Directory
- Remove Chocolatey from the path

View file

@ -4141,7 +4141,7 @@ def set_selinux_context(
persist=False,
):
"""
.. versionchanged:: Sodium
.. versionchanged:: 3001
Added persist option
@ -4829,7 +4829,7 @@ def check_perms(
serange=None,
):
"""
.. versionchanged:: Sodium
.. versionchanged:: 3001
Added selinux options
@ -5254,7 +5254,7 @@ def check_managed_changes(
"""
Return a dictionary of what changes need to be made for a file
.. versionchanged:: Sodium
.. versionchanged:: 3001
selinux attributes added
@ -5393,22 +5393,22 @@ def check_file_meta(
seuser
selinux user attribute
.. versionadded:: Sodium
.. versionadded:: 3001
serole
selinux role attribute
.. versionadded:: Sodium
.. versionadded:: 3001
setype
selinux type attribute
.. versionadded:: Sodium
.. versionadded:: 3001
serange
selinux range attribute
.. versionadded:: Sodium
.. versionadded:: 3001
"""
changes = {}
if not source_sum:
@ -5771,22 +5771,22 @@ def manage_file(
seuser
selinux user attribute
.. versionadded:: Sodium
.. versionadded:: 3001
serange
selinux range attribute
.. versionadded:: Sodium
.. versionadded:: 3001
setype
selinux type attribute
.. versionadded:: Sodium
.. versionadded:: 3001
serange
selinux range attribute
.. versionadded:: Sodium
.. versionadded:: 3001
CLI Example:

View file

@ -1174,7 +1174,7 @@ def install_os(path=None, **kwargs):
When True (default), executes the software install on all Routing Engines of the Junos
device. When False, execute the software install only on the current Routing Engine.
.. versionadded:: Sodium
.. versionadded:: 3001
.. note::
Any additional keyword arguments specified are passed down to PyEZ sw.install() as is.
@ -1536,7 +1536,7 @@ def get_table(
table_args=None,
):
"""
.. versionadded:: Sodium
.. versionadded:: 3001
Retrieve data from a Junos device using Tables/Views

View file

@ -175,7 +175,7 @@ def auth(profile=None, **connection_args):
salt '*' keystone.auth
"""
__utils__["versions.warn_until"](
"Sodium",
"3001",
(
"The keystone module has been deprecated and will be removed in {version}. "
"Please update to using the keystoneng module"

View file

@ -218,7 +218,7 @@ def _setup_conn(**kwargs):
if not (kubeconfig and context):
if kwargs.get("api_url") or __salt__["config.option"]("kubernetes.api_url"):
salt.utils.versions.warn_until(
"Sodium",
"3001",
"Kubernetes configuration via url, certificate, username and password will be removed in Sodiom. "
"Use 'kubeconfig' and 'context' instead.",
)

View file

@ -599,7 +599,7 @@ def _fix_cask_namespace(name=None, pkgs=None):
and replace it by the new one.
This function also warns about the correct namespace for this packages
and it will stop working with the release of Sodium.
and it will stop working with the release of 3001.
:param name: The name of the package to check
:param pkgs: A list of packages to check
@ -627,7 +627,7 @@ def _fix_cask_namespace(name=None, pkgs=None):
if show_warning:
salt.utils.versions.warn_until(
"Sodium",
"3001",
"The 'caskroom/cask/' namespace for brew-cask packages "
"is deprecated. Use 'homebrew/cask/' instead.",
)
@ -639,7 +639,7 @@ def hold(name=None, pkgs=None, sources=None, **kwargs): # pylint: disable=W0613
"""
Set package in 'hold' state, meaning it will not be upgraded.
.. versionadded:: Sodium
.. versionadded:: 3001
name
The name of the package, e.g., 'tmux'
@ -717,7 +717,7 @@ def unhold(name=None, pkgs=None, sources=None, **kwargs): # pylint: disable=W06
Set package current in 'hold' state to install state,
meaning it will be upgraded.
.. versionadded:: Sodium
.. versionadded:: 3001
name
The name of the package, e.g., 'tmux'

View file

@ -220,9 +220,9 @@ def send(
result:
True
"""
if "async" in kwargs: # Remove this in Sodium
if "async" in kwargs: # Remove this in 3001
salt.utils.versions.warn_until(
"Sodium",
"3001",
'Parameter "async" is renamed to "asynchronous" '
"and will be removed in version {version}.",
)

View file

@ -1274,7 +1274,7 @@ def ip_addrs(interface=None, include_loopback=False, cidr=None, type=None):
which are within that subnet. If 'type' is 'public', then only public
addresses will be returned. Ditto for 'type'='private'.
.. versionchanged:: Sodium
.. versionchanged:: 3001
``interface`` can now be a single interface name or a list of
interfaces. Globbing is also supported.
@ -1309,7 +1309,7 @@ def ip_addrs6(interface=None, include_loopback=False, cidr=None):
Providing a CIDR via 'cidr="2000::/3"' will return only the addresses
which are within that subnet.
.. versionchanged:: Sodium
.. versionchanged:: 3001
``interface`` can now be a single interface name or a list of
interfaces. Globbing is also supported.
@ -2014,7 +2014,7 @@ def iphexval(ip):
def ip_networks(interface=None, include_loopback=False, verbose=False):
"""
.. versionadded:: Sodium
.. versionadded:: 3001
Returns a list of IPv4 networks to which the minion belongs.
@ -2039,7 +2039,7 @@ def ip_networks(interface=None, include_loopback=False, verbose=False):
def ip_networks6(interface=None, include_loopback=False, verbose=False):
"""
.. versionadded:: Sodium
.. versionadded:: 3001
Returns a list of IPv6 networks to which the minion belongs.

View file

@ -78,7 +78,7 @@ salt-call from the GuestShell environment as follows.
salt '*' nxos.get_user username=admin
For backwards compatibility, the following syntax will be supported
until the Sodium release.
until the 3001 release.
salt '*' nxos.cmd <function>
salt '*' nxos.cmd get_user username=admin

View file

@ -292,7 +292,7 @@ def version_clean(verstr):
def version_compare(ver1, oper, ver2, ignore_epoch=False):
"""
.. versionadded:: Sodium
.. versionadded:: 3001
Perform a version comparison, using (where available) platform-specific
version comparison tools to make the comparison.

View file

@ -348,7 +348,7 @@ def pgrep(pattern, user=None, full=False, pattern_is_regex=False):
This flag enables ps.pgrep to mirror the regex search functionality
found in the pgrep command line utility.
.. versionadded:: Sodium
.. versionadded:: 3001
**Examples:**

View file

@ -21,7 +21,7 @@ A simple example might be something like the following:
.. code-block:: jinja
{# a boolean check #}
{% set option_deprecated = salt['salt_version.less_than']("Sodium") %}
{% set option_deprecated = salt['salt_version.less_than']("3001") %}
{% if option_deprecated %}
<use old syntax>
@ -126,7 +126,7 @@ def greater_than(name):
.. code-block:: bash
salt '*' salt_version.greater_than 'Sodium'
salt '*' salt_version.greater_than '3001'
"""
if _check_release_cmp(name) == 1:
log.info("The minion's version code name is greater than '{}'.".format(name))
@ -147,7 +147,7 @@ def less_than(name):
.. code-block:: bash
salt '*' salt_version.less_than 'Sodium'
salt '*' salt_version.less_than '3001'
"""
if _check_release_cmp(name) == -1:
log.info("The minion's version code name is less than '{}'.".format(name))

View file

@ -803,7 +803,7 @@ def apply_(mods=None, **kwargs):
def test(*args, **kwargs):
"""
.. versionadded:: Sodium
.. versionadded:: 3001
Alias for `state.apply` with the kwarg `test` forced to `True`.

View file

@ -114,7 +114,7 @@ Functions to interact with Hashicorp Vault.
allow_minion_override: True
token_backend: disk
.. versionchanged:: Sodium
.. versionchanged:: 3001
policies
Policies that are assigned to minions when requesting a token. These can
@ -183,7 +183,7 @@ def read_secret(path, key=None, metadata=False, default=CommandExecutionError):
:param metadata: Optional - If using KV v2 backend, display full results, including metadata
.. versionadded:: Sodium
.. versionadded:: 3001
Jinja Example:
@ -315,7 +315,7 @@ def delete_secret(path):
def destroy_secret(path, *args):
"""
.. versionadded:: Sodium
.. versionadded:: 3001
Destory specified secret version at the path in vault. The vault policy
used must allow this. Only supported on Vault KV version 2

View file

@ -1703,12 +1703,12 @@ def init(
loader
The path to the UEFI binary loader to use.
.. versionadded:: sodium
.. versionadded:: 3001
nvram
The path to the UEFI data template. The file will be copied when creating the virtual machine.
.. versionadded:: sodium
.. versionadded:: 3001
efi
A boolean value.
@ -1757,7 +1757,7 @@ def init(
Path to the folder or name of the pool where disks should be created.
(Default: depends on hypervisor and the virt:storagepool configuration)
.. versionchanged:: sodium
.. versionchanged:: 3001
If the value contains no '/', it is considered a pool name where to create a volume.
Using volumes will be mandatory for some pools types like rdb, iscsi, etc.
@ -1778,7 +1778,7 @@ def init(
``True`` to create a QCOW2 disk image with ``image`` as backing file. If ``False``
the file pointed to by the ``image`` property will simply be copied. (Default: ``False``)
.. versionchanged:: sodium
.. versionchanged:: 3001
This property is only valid on path-based disks, not on volumes. To create a volume with a
backing store, set the ``backing_store_path`` and ``backing_store_format`` properties.
@ -1787,20 +1787,20 @@ def init(
Path to the backing store image to use. This can also be the name of a volume to use as
backing store within the same pool.
.. versionadded:: sodium
.. versionadded:: 3001
backing_store_format
Image format of the disk or volume to use as backing store. This property is mandatory when
using ``backing_store_path`` to avoid `problems <https://libvirt.org/kbase/backing_chains.html#troubleshooting>`_
.. versionadded:: sodium
.. versionadded:: 3001
source_file
Absolute path to the disk image to use. Not to be confused with ``image`` parameter. This
parameter is useful to use disk images that are created outside of this module. Can also
be ``None`` for devices that have no associated image like cdroms.
.. versionchanged:: sodium
.. versionchanged:: 3001
For volume disks, this can be the name of a volume already existing in the storage pool.
@ -2273,7 +2273,7 @@ def update(
:param test: run in dry-run mode if set to True
.. versionadded:: sodium
.. versionadded:: 3001
:return:
@ -3627,7 +3627,7 @@ def define_vol_xml_str(
storage pool name to define the volume in.
If defined, this parameter will override the configuration setting.
.. versionadded:: Sodium
.. versionadded:: 3001
:param connection: libvirt connection URI, overriding defaults
.. versionadded:: 2019.2.0
@ -3672,7 +3672,7 @@ def define_vol_xml_path(path, pool=None, **kwargs):
storage pool name to define the volume in.
If defined, this parameter will override the configuration setting.
.. versionadded:: Sodium
.. versionadded:: 3001
:param connection: libvirt connection URI, overriding defaults
.. versionadded:: 2019.2.0
@ -5018,7 +5018,7 @@ def all_capabilities(**kwargs):
"""
Return the host and domain capabilities in a single call.
.. versionadded:: Sodium
.. versionadded:: 3001
:param connection: libvirt connection URI, overriding defaults
:param username: username to connect with, overriding defaults
@ -6698,7 +6698,7 @@ def volume_define(
backing_store="{'path': '/path/to/base.img', 'format': 'raw'}" \
nocow=True
.. versionadded:: Sodium
.. versionadded:: 3001
"""
ret = False
try:
@ -6840,7 +6840,7 @@ def volume_upload(pool, volume, file, offset=0, length=0, sparse=False, **kwargs
salt '*' virt.volume_upload default myvm.qcow2 /path/to/disk.qcow2
.. versionadded:: Sodium
.. versionadded:: 3001
"""
conn = __get_conn(**kwargs)

View file

@ -1029,7 +1029,7 @@ def set_domain_workgroup(workgroup):
"""
Set the domain or workgroup the computer belongs to.
.. versionadded:: Sodium
.. versionadded:: 3001
Returns:
bool: ``True`` if successful, otherwise ``False``
@ -1485,7 +1485,7 @@ def get_pending_reboot_details():
Determine which check is signalling that the system is pending a reboot.
Useful in determining why your system is signalling that it needs a reboot.
.. versionadded:: Sodium
.. versionadded:: 3001
Returns:
dict: A dictionary of the results of each system that would indicate a
@ -1507,7 +1507,7 @@ def get_pending_windows_update():
This leverages the Windows Update System to determine if the system is
pending a reboot.
.. versionadded:: Sodium
.. versionadded:: 3001
Returns:
bool: ``True`` if the Windows Update system reports a pending update,

View file

@ -175,7 +175,7 @@ def available(
database. ``True`` will go online. ``False`` will use the local
update database as is. Default is ``True``
.. versionadded:: Sodium
.. versionadded:: 3001
Returns:
@ -285,7 +285,7 @@ def get(name, download=False, install=False, online=True):
database. ``True`` will go online. ``False`` will use the local
update database as is. Default is ``True``
.. versionadded:: Sodium
.. versionadded:: 3001
Returns:
@ -436,7 +436,7 @@ def list(
database. ``True`` will go online. ``False`` will use the local
update database as is. Default is ``True``
.. versionadded:: Sodium
.. versionadded:: 3001
Returns:
@ -527,7 +527,7 @@ def list(
def installed(summary=False, kbs_only=False):
"""
.. versionadded:: Sodium
.. versionadded:: 3001
Get a list of all updates that are currently installed on the system.

View file

@ -1404,13 +1404,13 @@ def create_certificate(path=None, text=False, overwrite=True, ca_server=None, **
Initial validity date for the certificate. This date must be specified
in the format '%Y-%m-%d %H:%M:%S'.
.. versionadded:: Sodium
.. versionadded:: 3001
not_after:
Final validity date for the certificate. This date must be specified in
the format '%Y-%m-%d %H:%M:%S'.
.. versionadded:: Sodium
.. versionadded:: 3001
CLI Example:

View file

@ -2456,7 +2456,7 @@ def group_list():
def group_info(name, expand=False, ignore_groups=None):
"""
.. versionadded:: 2014.1.0
.. versionchanged:: Sodium,2016.3.0,2015.8.4,2015.5.10
.. versionchanged:: 3001,2016.3.0,2015.8.4,2015.5.10
The return data has changed. A new key ``type`` has been added to
distinguish environment groups from package groups. Also, keys for the
group name and group ID have been added. The ``mandatory packages``,
@ -2482,7 +2482,7 @@ def group_info(name, expand=False, ignore_groups=None):
expanding subgroups. It is used during recursion in order to prevent
expanding the same group multiple times.
.. versionadded:: Sodium
.. versionadded:: 3001
CLI Example:

View file

@ -409,7 +409,7 @@ def mount(name=None, **kwargs):
.. warning::
Passing '-a' as name is deprecated and will be removed in Sodium.
Passing '-a' as name is deprecated and will be removed in 3001.
CLI Example:
@ -433,13 +433,13 @@ def mount(name=None, **kwargs):
if name in [None, "-a"]:
# NOTE: the new way to mount all filesystems is to have name
# set to ```None```. We still accept the old '-a' until
# Sodium. After Sodium we can update the if statement
# 3001. After 3001 we can update the if statement
# to ```if not name:```
if name == "-a":
salt.utils.versions.warn_until(
"Sodium",
"3001",
"Passing '-a' as name is deprecated as of Salt 2019.2.0. This "
"warning will be removed in Salt Sodium. Please pass name as "
"warning will be removed in Salt 3001. Please pass name as "
"'None' instead to mount all filesystems.",
)
flags.append("-a")
@ -474,7 +474,7 @@ def unmount(name, **kwargs):
.. warning::
Passing '-a' as name is deprecated and will be removed in Sodium.
Passing '-a' as name is deprecated and will be removed in 3001.
CLI Example:
@ -492,7 +492,7 @@ def unmount(name, **kwargs):
flags.append("-f")
if name in [None, "-a"]:
# NOTE: still accept '-a' as name for backwards compatibility
# until Salt Sodium this should just simplify
# until Salt 3001 this should just simplify
# this to just set '-a' if name is not set.
flags.append("-a")
name = None
@ -911,9 +911,9 @@ def hold(tag, *snapshot, **kwargs):
## warn about tag change
if "," in tag:
salt.utils.versions.warn_until(
"Sodium",
"3001",
"A comma-separated tag is no support as of Salt 2018.3.1 "
"This warning will be removed in Salt Sodium.",
"This warning will be removed in Salt 3001.",
)
## Configure command
@ -976,9 +976,9 @@ def release(tag, *snapshot, **kwargs):
## warn about tag change
if "," in tag:
salt.utils.versions.warn_until(
"Sodium",
"3001",
"A comma-separated tag is no support as of Salt 2018.3.1 "
"This warning will be removed in Salt Sodium.",
"This warning will be removed in Salt 3001.",
)
## Configure command

View file

@ -2,7 +2,7 @@
"""
Use Azure Blob as a Pillar source.
.. versionadded:: Sodium
.. versionadded:: 3001
:maintainer: <devops@eitr.tech>
:maturity: new
@ -167,7 +167,7 @@ def ext_pillar(
def _init(connection_string, container, multiple_env, environment, blob_cache_expire):
"""
.. versionadded:: Sodium
.. versionadded:: 3001
Connect to Blob Storage and download the metadata for each file in all containers specified and
cache the data to disk.
@ -219,7 +219,7 @@ def _init(connection_string, container, multiple_env, environment, blob_cache_ex
def _get_cache_dir():
"""
.. versionadded:: Sodium
.. versionadded:: 3001
Get pillar cache directory. Initialize it if it does not exist.
@ -235,7 +235,7 @@ def _get_cache_dir():
def _get_cached_file_name(container, saltenv, path):
"""
.. versionadded:: Sodium
.. versionadded:: 3001
Return the cached file name for a container path file.
@ -257,7 +257,7 @@ def _get_cached_file_name(container, saltenv, path):
def _get_containers_cache_filename(container):
"""
.. versionadded:: Sodium
.. versionadded:: 3001
Return the filename of the cache for container contents. Create the path if it does not exist.
@ -275,7 +275,7 @@ def _refresh_containers_cache_file(
connection_string, container, cache_file, multiple_env=False, environment="base"
):
"""
.. versionadded:: Sodium
.. versionadded:: 3001
Downloads the entire contents of an Azure storage container to the local filesystem.
@ -351,7 +351,7 @@ def _refresh_containers_cache_file(
def _read_containers_cache_file(cache_file):
"""
.. versionadded:: Sodium
.. versionadded:: 3001
Return the contents of the containers cache file.
@ -368,7 +368,7 @@ def _read_containers_cache_file(cache_file):
def _find_files(metadata):
"""
.. versionadded:: Sodium
.. versionadded:: 3001
Looks for all the files in the Azure Blob container cache metadata.
@ -391,7 +391,7 @@ def _find_files(metadata):
def _find_file_meta(metadata, container, saltenv, path):
"""
.. versionadded:: Sodium
.. versionadded:: 3001
Looks for a file's metadata in the Azure Blob Container cache file.
@ -417,7 +417,7 @@ def _get_file_from_blob(
connection_string, metadata, saltenv, container, path, cached_file_path
):
"""
.. versionadded:: Sodium
.. versionadded:: 3001
Downloads the entire contents of an Azure storage container to the local filesystem.

View file

@ -370,7 +370,7 @@ remotes. The update is handled within the global loop, hence
fallback
~~~~~~~~
.. versionadded:: sodium
.. versionadded:: 3001
Setting ``fallback`` per-remote or global configuration parameter will map non-existing environments to a default branch. Example:

View file

@ -46,7 +46,7 @@ def grains(tgt, tgt_type="glob", **kwargs):
.. versionchanged:: 2017.7.5,2018.3.0
The ``tgt`` argument is now required to display cached grains. If
not used, the function will not return grains. This optional
argument will become mandatory in the Salt ``Sodium`` release.
argument will become mandatory in the Salt ``3001`` release.
tgt_type
The type of targeting to use for matching, such as ``glob``, ``list``,

View file

@ -33,7 +33,7 @@ def update(branch=None, repo=None):
changes were fetched. ``False`` now is reserved only for instances in
which there were errors.
.. versionchanged:: Sodium
.. versionchanged:: 3001
The repo parameter also matches against the repo name.
Fetch one or all configured git_pillar remotes.

View file

@ -222,7 +222,7 @@ def up(
def _show_ip_migration(show_ip, show_ipv4):
if show_ipv4 is not None:
salt.utils.versions.warn_until(
"Sodium",
"3001",
"The 'show_ipv4' argument has been renamed to 'show_ip' as"
"it now also includes IPv6 addresses for IPv6-connected"
"minions.",

View file

@ -109,11 +109,11 @@ def salt_master():
# Message borrowed from pip's deprecation warning
warn_until(
"Sodium",
"3001",
"Python 2.7 will reach the end of its life on January 1st,"
" 2020. Please upgrade your Python as Python 2.7 won't be"
" maintained after that date. Salt will drop support for"
" Python 2.7 in the Sodium release or later.",
" Python 2.7 in the 3001 release or later.",
)
# END REMOVEME
master = salt.cli.daemons.Master()
@ -218,11 +218,11 @@ def salt_minion():
# Message borrowed from pip's deprecation warning
warn_until(
"Sodium",
"3001",
"Python 2.7 will reach the end of its life on January 1st,"
" 2020. Please upgrade your Python as Python 2.7 won't be"
" maintained after that date. Salt will drop support for"
" Python 2.7 in the Sodium release or later.",
" Python 2.7 in the 3001 release or later.",
)
# END REMOVEME

View file

@ -47,7 +47,7 @@ run if **any** of the files do not exist:
.. note::
The ``creates`` option was added to the cmd state in version 2014.7.0,
and made a global requisite in Sodium.
and made a global requisite in 3001.
Sometimes when running a command that starts up a daemon, the init script
doesn't return properly which causes Salt to wait indefinitely for a response.

View file

@ -4103,7 +4103,7 @@ def recurse(
- include_pat: E@hello :: regexp matches 'otherhello',
'hello01' ...
.. versionchanged:: Sodium
.. versionchanged:: 3001
List patterns are now supported
@ -4130,7 +4130,7 @@ def recurse(
- exclude_pat: E@(APPDATA)|(TEMPDATA) :: regexp matches APPDATA
or TEMPDATA for exclusion
.. versionchanged:: Sodium
.. versionchanged:: 3001
List patterns are now supported
@ -5213,7 +5213,7 @@ def keyvalue(
"""
Key/Value based editing of a file.
.. versionadded:: Sodium
.. versionadded:: 3001
This function differs from ``file.replace`` in that it is able to search for
keys, followed by a customizable separator, and replace the value with the

View file

@ -98,7 +98,7 @@ def present(name, ip, comment="", clean=False): # pylint: disable=C0103
comment
A comment to include for the host entry
.. versionadded:: Sodium
.. versionadded:: 3001
clean
Remove any entries which don't match those configured in the ``ip``

View file

@ -197,7 +197,7 @@ def rollback(name, id, **kwargs):
@resultdecorator
def diff(name, d_id=0, **kwargs):
"""
.. versionchanged:: Sodium
.. versionchanged:: 3001
Gets the difference between the candidate and the current configuration.
@ -551,7 +551,7 @@ def commit_check(name):
@resultdecorator
def get_table(name, table, table_file, **kwargs):
"""
.. versionadded:: Sodium
.. versionadded:: 3001
Retrieve data from a Junos device using Tables/Views

View file

@ -6,7 +6,7 @@ Execution of Salt modules from within states
.. note::
There are two styles of calling ``module.run``. **The legacy style will no
longer be available starting in the Sodium release.** To opt-in early to the
longer be available starting in the 3001 release.** To opt-in early to the
new style you must add the following to your ``/etc/salt/minion`` config
file:

View file

@ -216,7 +216,7 @@ def _fulfills_version_string(
set this option to ``True`` to ignore the epoch when comparing
versions.
.. versionchanged:: Sodium
.. versionchanged:: 3001
If no value for this argument is passed to the state that calls
this helper function, and ``version_conditions_string`` contains no
epoch or greater-than/less-than, then the epoch will be ignored.
@ -1391,7 +1391,7 @@ def installed(
.. versionadded:: 2015.8.9
.. versionchanged:: Sodium
.. versionchanged:: 3001
In prior releases, the default behavior was to strictly enforce
epochs unless this argument was set to ``True``.
@ -3055,7 +3055,7 @@ def removed(name, version=None, pkgs=None, normalize=True, ignore_epoch=None, **
.. versionadded:: 2015.8.9
.. versionchanged:: Sodium
.. versionchanged:: 3001
In prior releases, the default behavior was to strictly enforce
epochs unless this argument was set to ``True``.
@ -3147,7 +3147,7 @@ def purged(name, version=None, pkgs=None, normalize=True, ignore_epoch=None, **k
.. versionadded:: 2015.8.9
.. versionchanged:: Sodium
.. versionchanged:: 3001
In prior releases, the default behavior was to strictly enforce
epochs unless this argument was set to ``True``.

View file

@ -307,7 +307,7 @@ def present(
.. note::
Only supported on GNU/Linux distributions
.. versionadded:: Sodium
.. versionadded:: 3001
groups
A list of groups to assign the user to, pass a list object. If a group

View file

@ -298,7 +298,7 @@ def defined(
"""
Starts an existing guest, or defines and starts a new VM with specified arguments.
.. versionadded:: sodium
.. versionadded:: 3001
:param name: name of the virtual machine to run
:param cpu: number of CPUs for the virtual machine to create
@ -352,7 +352,7 @@ def defined(
:param update: set to ``False`` to prevent updating a defined domain. (Default: ``True``)
.. deprecated:: sodium
.. deprecated:: 3001
.. rubric:: Example States
@ -543,7 +543,7 @@ def running(
:param update: set to ``True`` to update a defined domain. (Default: ``False``)
.. versionadded:: 2019.2.0
.. deprecated:: sodium
.. deprecated:: 3001
:param connection: libvirt connection URI, overriding defaults
.. versionadded:: 2019.2.0
@ -895,7 +895,7 @@ def network_defined(
:param username: username to connect with, overriding defaults
:param password: password to connect with, overriding defaults
.. versionadded:: sodium
.. versionadded:: 3001
.. code-block:: yaml
@ -1112,7 +1112,7 @@ def pool_defined(
"""
Defines a new pool with specified arguments.
.. versionadded:: sodium
.. versionadded:: 3001
:param ptype: libvirt pool type
:param target: full path to the target device or folder. (Default: ``None``)
@ -1642,7 +1642,7 @@ def volume_defined(
format: raw
- nocow: True
.. versionadded:: Sodium
.. versionadded:: 3001
"""
ret = {"name": name, "changes": {}, "result": True, "comment": ""}

View file

@ -174,7 +174,7 @@ def hostname(name):
def workgroup(name):
"""
.. versionadded:: Sodium
.. versionadded:: 3001
Manage the workgroup of the computer

View file

@ -553,12 +553,12 @@ def certificate_managed(
Initial validity date for the certificate. This date must be specified
in the format '%Y-%m-%d %H:%M:%S'.
.. versionadded:: Sodium
.. versionadded:: 3001
not_after:
Final validity date for the certificate. This date must be specified in
the format '%Y-%m-%d %H:%M:%S'.
.. versionadded:: Sodium
.. versionadded:: 3001
Examples:

View file

@ -28,7 +28,7 @@ def gen_jid(opts=None):
"""
if opts is None:
salt.utils.versions.warn_until(
"Sodium",
"3001",
"The `opts` argument was not passed into salt.utils.jid.gen_jid(). "
"This will be required starting in {version}.",
)

View file

@ -645,7 +645,7 @@ class CkMinions(object):
"""
if include_localhost is not None:
salt.utils.versions.warn_until(
"Sodium",
"3001",
"The 'include_localhost' argument is no longer required; any"
"connected localhost minion will always be included.",
)

View file

@ -2,7 +2,7 @@
"""
Dot NET functions
.. versionadded:: Sodium
.. versionadded:: 3001
"""
# Import Python libs
from __future__ import absolute_import, print_function, unicode_literals

View file

@ -4,7 +4,7 @@ Win System Utils
Functions shared with salt.modules.win_system and salt.grains.pending_reboot
.. versionadded:: Sodium
.. versionadded:: 3001
"""
# NOTE: DO NOT USE RAW STRINGS IN THIS MODULE! UNICODE_LITERALS DOES NOT PLAY
# NICELY WITH RAW STRINGS CONTAINING \u or \U.
@ -61,7 +61,7 @@ def get_computer_name():
Get the Windows computer name. Uses the win32api to get the current computer
name.
.. versionadded:: Sodium
.. versionadded:: 3001
Returns:
str: Returns the computer name if found. Otherwise returns ``False``.
@ -85,7 +85,7 @@ def get_pending_computer_name():
retrieving the pending computer name, ``False`` will be returned, and an
error message will be logged to the minion log.
.. versionadded:: Sodium
.. versionadded:: 3001
Returns:
str:
@ -125,7 +125,7 @@ def get_pending_component_servicing():
``HKLM:\\\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Component Based Servicing\\RebootInProgress``
``HKLM:\\\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Component Based Servicing\\PackagesPending``
.. versionadded:: Sodium
.. versionadded:: 3001
Returns:
bool: ``True`` if there are pending Component Based Servicing tasks,
@ -172,7 +172,7 @@ def get_pending_domain_join():
``HKLM:\\\\SYSTEM\\CurrentControlSet\\Services\\Netlogon\\AvoidSpnSet``
``HKLM:\\\\SYSTEM\\CurrentControlSet\\Services\\Netlogon\\JoinDomain``
.. versionadded:: Sodium
.. versionadded:: 3001
Returns:
bool: ``True`` if there is a pending domain join action, otherwise
@ -215,7 +215,7 @@ def get_pending_file_rename():
``HKLM:\\\\SYSTEM\\CurrentControlSet\\Control\\Session Manager``
.. versionadded:: Sodium
.. versionadded:: 3001
Returns:
bool: ``True`` if there are pending file rename operations, otherwise
@ -248,7 +248,7 @@ def get_pending_servermanager():
``HKLM:\\\\SOFTWARE\\Microsoft\\ServerManager``
.. versionadded:: Sodium
.. versionadded:: 3001
Returns:
bool: ``True`` if there are pending Server Manager tasks, otherwise
@ -287,7 +287,7 @@ def get_pending_dvd_reboot():
``HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\RunOnce``
.. versionadded:: Sodium
.. versionadded:: 3001
Returns:
bool: ``True`` if the above condition is met, otherwise ``False``
@ -321,7 +321,7 @@ def get_pending_update():
``HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\WindowsUpdate\\Services\\Pending``
.. versionadded:: Sodium
.. versionadded:: 3001
Returns:
bool: ``True`` if any of the above conditions are met, otherwise
@ -375,7 +375,7 @@ def get_reboot_required_witnessed():
``HKLM:\\\\SYSTEM\\CurrentControlSet\\Services\\salt-minion\\Volatile-Data``
.. versionadded:: Sodium
.. versionadded:: 3001
Returns:
bool: ``True`` if the ``Requires reboot`` registry flag is set to ``1``,
@ -411,7 +411,7 @@ def set_reboot_required_witnessed():
completes with exit code 3010 and can be extended where appropriate in the
future.
.. versionadded:: Sodium
.. versionadded:: 3001
Returns:
bool: ``True`` if successful, otherwise ``False``
@ -440,7 +440,7 @@ def get_pending_update_exe_volatile():
Checks ``HKLM:\\Microsoft\\Updates``. If the ``UpdateExeVolatile`` value name
is anything other than 0 there is a reboot pending
.. versionadded:: Sodium
.. versionadded:: 3001
Returns:
bool: ``True`` if there is a volatile exe, otherwise ``False``
@ -472,7 +472,7 @@ def get_pending_windows_update():
This leverages the Windows Update System to determine if the system is
pending a reboot.
.. versionadded:: Sodium
.. versionadded:: 3001
Returns:
bool: ``True`` if the Windows Update system reports a pending update,
@ -492,7 +492,7 @@ def get_pending_reboot():
"""
Determine whether there is a reboot pending.
.. versionadded:: Sodium
.. versionadded:: 3001
Returns:
bool: ``True`` if the system is pending reboot, otherwise ``False``
@ -530,7 +530,7 @@ def get_pending_reboot_details():
Determine which check is signalling that the system is pending a reboot.
Useful in determining why your system is signalling that it needs a reboot.
.. versionadded:: Sodium
.. versionadded:: 3001
Returns:
dict: A dictionary of the results of each function that checks for a

View file

@ -301,7 +301,7 @@ class WindowsUpdateAgent(object):
update database. ``True`` will go online. ``False`` will use the
local update database as is. Default is ``True``
.. versionadded:: Sodium
.. versionadded:: 3001
Need to look at the possibility of loading this into ``__context__``
"""
@ -362,7 +362,7 @@ class WindowsUpdateAgent(object):
update database. ``True`` will go online. ``False`` will use the
local update database as is. Default is ``True``
.. versionadded:: Sodium
.. versionadded:: 3001
Code Example: