diff --git a/conf/proxy b/conf/proxy index 516d01ac2d..f81dc32b5c 100644 --- a/conf/proxy +++ b/conf/proxy @@ -28,27 +28,27 @@ # dictionary. Otherwise it is assumed that the module calls the grains # function in a custom way and returns the data elsewhere # -# Default to False for 2016.3 and 2016.11. Switch to True for Nitrogen. +# Default to False for 2016.3 and 2016.11. Switch to True for 2017.7.0. # proxy_merge_grains_in_module: True # If a proxymodule has a function called 'alive' returning a boolean # flag reflecting the state of the connection with the remove device, # when this option is set as True, a scheduled job on the proxy will # try restarting the connection. The polling frequency depends on the -# next option, 'proxy_keep_alive_interval'. Added in Nitrogen. +# next option, 'proxy_keep_alive_interval'. Added in 2017.7.0. # proxy_keep_alive: True # The polling interval (in minutes) to check if the underlying connection # with the remote device is still alive. This option requires # 'proxy_keep_alive' to be configured as True and the proxymodule to -# implement the 'alive' function. Added in Nitrogen. +# implement the 'alive' function. Added in 2017.7.0. # proxy_keep_alive_interval: 1 # By default, any proxy opens the connection with the remote device when # initialized. Some proxymodules allow through this option to open/close # the session per command. This requires the proxymodule to have this # capability. Please consult the documentation to see if the proxy type -# used can be that flexible. Added in Nitrogen. +# used can be that flexible. Added in 2017.7.0. # proxy_always_alive: True # If multiple masters are specified in the 'master' setting, the default behavior diff --git a/doc/ref/cli/salt-cp.rst b/doc/ref/cli/salt-cp.rst index 0540c154b8..3922163b32 100644 --- a/doc/ref/cli/salt-cp.rst +++ b/doc/ref/cli/salt-cp.rst @@ -33,7 +33,7 @@ specified target expression. minions. However, this requires the file to be located within one of the fileserver directories. -.. versionchanged:: 2016.3.7,2016.11.6,Nitrogen +.. versionchanged:: 2016.3.7,2016.11.6,2017.7.0 Compression support added, disable with ``-n``. Also, if the destination path ends in a path separator (i.e. ``/``, or ``\`` on Windows, the desitination will be assumed to be a directory. Finally, recursion is now @@ -60,7 +60,7 @@ Options Disable gzip compression. - .. versionadded:: 2016.3.7,2016.11.6,Nitrogen + .. versionadded:: 2016.3.7,2016.11.6,2017.7.0 See also ======== diff --git a/doc/ref/configuration/master.rst b/doc/ref/configuration/master.rst index 187212ca8a..d642be79a1 100644 --- a/doc/ref/configuration/master.rst +++ b/doc/ref/configuration/master.rst @@ -248,7 +248,7 @@ each of Salt's module types such as ``runners``, ``output``, ``wheel``, ``extmod_whitelist/extmod_blacklist`` ------------------------------------- -.. versionadded:: Nitrogen +.. versionadded:: 2017.7.0 By using this dictionary, the modules that are synced to the master's extmod cache using `saltutil.sync_*` can be limited. If nothing is set to a specific type, then all modules are accepted. To block all modules of a specific type, @@ -1742,9 +1742,9 @@ on a large number of minions. .. conf_master:: fileserver_verify_config ``fileserver_verify_config`` ------------------------------- +---------------------------- -.. versionadded:: Nitrogen +.. versionadded:: 2017.7.0 Default: ``True`` @@ -2259,7 +2259,7 @@ authenticate is protected by a passphrase. ``gitfs_refspecs`` ~~~~~~~~~~~~~~~~~~ -.. versionadded:: Nitrogen +.. versionadded:: 2017.7.0 Default: ``['+refs/heads/*:refs/remotes/origin/*', '+refs/tags/*:refs/tags/*']`` @@ -2813,7 +2813,7 @@ configuration is the same as :conf_master:`file_roots`: ``on_demand_ext_pillar`` ------------------------ -.. versionadded:: 2016.3.6,2016.11.3,Nitrogen +.. versionadded:: 2016.3.6,2016.11.3,2017.7.0 Default: ``['libvirt', 'virtkey']`` @@ -2841,7 +2841,7 @@ The external pillars permitted to be used on-demand using :py:func:`pillar.ext ``decrypt_pillar`` ------------------ -.. versionadded:: Nitrogen +.. versionadded:: 2017.7.0 Default: ``[]`` @@ -2863,7 +2863,7 @@ specified by :conf_master:`decrypt_pillar_default` will be used. ``decrypt_pillar_delimiter`` ---------------------------- -.. versionadded:: Nitrogen +.. versionadded:: 2017.7.0 Default: ``:`` @@ -2882,7 +2882,7 @@ The delimiter used to distinguish nested data structures in the ``decrypt_pillar_default`` -------------------------- -.. versionadded:: Nitrogen +.. versionadded:: 2017.7.0 Default: ``gpg`` @@ -2898,7 +2898,7 @@ pillar key in :conf_master:`decrypt_pillar`. ``decrypt_pillar_renderers`` ---------------------------- -.. versionadded:: Nitrogen +.. versionadded:: 2017.7.0 Default: ``['gpg']`` @@ -3222,7 +3222,7 @@ they were created by a different master. ``git_pillar_includes`` *********************** -.. versionadded:: Nitrogen +.. versionadded:: 2017.7.0 Default: ``True`` @@ -3353,7 +3353,7 @@ authenticate is protected by a passphrase. ``git_pillar_refspecs`` ~~~~~~~~~~~~~~~~~~~~~~~ -.. versionadded:: Nitrogen +.. versionadded:: 2017.7.0 Default: ``['+refs/heads/*:refs/remotes/origin/*', '+refs/tags/*:refs/tags/*']`` @@ -3376,7 +3376,7 @@ configured both globally and for individual remotes. ``git_pillar_verify_config`` ---------------------------- -.. versionadded:: Nitrogen +.. versionadded:: 2017.7.0 Default: ``True`` @@ -3734,9 +3734,9 @@ check in with their lists of expected minions before giving up. .. conf_master:: syndic_forward_all_events ``syndic_forward_all_events`` -------------------- +----------------------------- -.. versionadded:: Nitrogen +.. versionadded:: 2017.7.0 Default: ``False`` @@ -4363,7 +4363,7 @@ authenticate is protected by a passphrase. ``winrepo_refspecs`` ~~~~~~~~~~~~~~~~~~~~ -.. versionadded:: Nitrogen +.. versionadded:: 2017.7.0 Default: ``['+refs/heads/*:refs/remotes/origin/*', '+refs/tags/*:refs/tags/*']`` diff --git a/doc/ref/configuration/minion.rst b/doc/ref/configuration/minion.rst index 17fbbd62cc..9919e13662 100644 --- a/doc/ref/configuration/minion.rst +++ b/doc/ref/configuration/minion.rst @@ -1276,9 +1276,9 @@ below. service: systemd ``extmod_whitelist/extmod_blacklist`` --------------------- +------------------------------------- -.. versionadded:: Nitrogen +.. versionadded:: 2017.7.0 By using this dictionary, the modules that are synced to the minion's extmod cache using `saltutil.sync_*` can be limited. If nothing is set to a specific type, then all modules are accepted. To block all modules of a specific type, @@ -1747,7 +1747,7 @@ the pillar environments. ``on_demand_ext_pillar`` ------------------------ -.. versionadded:: 2016.3.6,2016.11.3,Nitrogen +.. versionadded:: 2016.3.6,2016.11.3,2017.7.0 Default: ``['libvirt', 'virtkey']`` @@ -1776,7 +1776,7 @@ external pillars are permitted to be used on-demand using :py:func:`pillar.ext ``decrypt_pillar`` ------------------ -.. versionadded:: Nitrogen +.. versionadded:: 2017.7.0 Default: ``[]`` @@ -1798,7 +1798,7 @@ specified by :conf_minion:`decrypt_pillar_default` will be used. ``decrypt_pillar_delimiter`` ---------------------------- -.. versionadded:: Nitrogen +.. versionadded:: 2017.7.0 Default: ``:`` @@ -1817,7 +1817,7 @@ The delimiter used to distinguish nested data structures in the ``decrypt_pillar_default`` -------------------------- -.. versionadded:: Nitrogen +.. versionadded:: 2017.7.0 Default: ``gpg`` @@ -1833,7 +1833,7 @@ pillar key in :conf_minion:`decrypt_pillar`. ``decrypt_pillar_renderers`` ---------------------------- -.. versionadded:: Nitrogen +.. versionadded:: 2017.7.0 Default: ``['gpg']`` @@ -1864,7 +1864,7 @@ the environment setting, but for pillar instead of states. ``pillarenv_from_saltenv`` -------------------------- -.. versionadded:: Nitrogen +.. versionadded:: 2017.7.0 Default: ``False`` diff --git a/doc/ref/configuration/proxy.rst b/doc/ref/configuration/proxy.rst index 82a05b1252..974e0af890 100644 --- a/doc/ref/configuration/proxy.rst +++ b/doc/ref/configuration/proxy.rst @@ -27,7 +27,7 @@ Proxy-specific Configuration Options .. conf_proxy:: add_proxymodule_to_opts ``add_proxymodule_to_opts`` --------------------------- +--------------------------- .. versionadded:: 2015.8.2 @@ -49,7 +49,7 @@ Add the proxymodule LazyLoader object to opts. .. versionadded:: 2016.3.0 -.. versionchanged:: Nitrogen +.. versionchanged:: 2017.7.0 Default: ``True`` @@ -68,7 +68,7 @@ function in a custom way and returns the data elsewhere. ``proxy_keep_alive`` -------------------- -.. versionadded:: Nitrogen +.. versionadded:: 2017.7.0 Default: ``True`` @@ -86,7 +86,7 @@ otherwise the connection is considered alive. ``proxy_keep_alive_interval`` ----------------------------- -.. versionadded:: Nitrogen +.. versionadded:: 2017.7.0 Default: ``1`` @@ -104,7 +104,7 @@ The frequency of keepalive checks, in minutes. It requires the ``proxy_always_alive`` ---------------------- -.. versionadded:: Nitrogen +.. versionadded:: 2017.7.0 Default: ``True`` diff --git a/doc/ref/peer.rst b/doc/ref/peer.rst index 03a3cc6aa1..83118d8b7b 100644 --- a/doc/ref/peer.rst +++ b/doc/ref/peer.rst @@ -126,4 +126,4 @@ To match minions using other matchers, use ``tgt_type``: # salt-call publish.publish 'webserv* and not G@os:Ubuntu' test.ping tgt_type='compound' .. note:: - In pre-Nitrogen releases, use ``expr_form`` instead of ``tgt_type``. + In pre-2017.7.0 releases, use ``expr_form`` instead of ``tgt_type``. diff --git a/doc/ref/states/parallel.rst b/doc/ref/states/parallel.rst index b00b54b439..8a69eba2df 100644 --- a/doc/ref/states/parallel.rst +++ b/doc/ref/states/parallel.rst @@ -2,8 +2,8 @@ Running States in Parallel ========================== -Introduced in Salt version Nitrogen it is now possible to run select states -in parallel. This is accomplished very easily by adding the `parallel: True` +Introduced in Salt version ``2017.7.0`` it is now possible to run select states +in parallel. This is accomplished very easily by adding the ``parallel: True`` option to your state declaration: .. code_block:: yaml @@ -12,7 +12,7 @@ option to your state declaration: service.running: - parallel: True -Now `nginx` will be started in a seperate process from the normal state run +Now ``nginx`` will be started in a seperate process from the normal state run and will therefore not block additional states. Parallel States and Requisites @@ -40,16 +40,16 @@ Given this example: cmd.run: - parallel: True -The `sleep 10` will be started first, then the state system will block on -starting nginx until the `sleep 10` completes. Once nginx has been ensured to -be running then the `sleep 5` will start. +The ``sleep 10`` will be started first, then the state system will block on +starting nginx until the ``sleep 10`` completes. Once nginx has been ensured to +be running then the ``sleep 5`` will start. This means that the order of evaluation of Salt States and requisites are -still honored, and given that in the above case, `parallel: True` does not +still honored, and given that in the above case, ``parallel: True`` does not actually speed things up. -To run the above state much faster make sure that the `sleep 5` is evaluated -before the `nginx` state +To run the above state much faster make sure that the ``sleep 5`` is evaluated +before the ``nginx`` state .. code_block:: yaml @@ -67,8 +67,8 @@ before the `nginx` state - require: - cmd: sleep 10 -Now both of the sleep calls will be started in parallel and `nginx` will still -wait for the state it requires, but while it waits the `sleep 5` state will +Now both of the sleep calls will be started in parallel and ``nginx`` will still +wait for the state it requires, but while it waits the ``sleep 5`` state will also complete. Things to be Careful of diff --git a/doc/ref/states/requisites.rst b/doc/ref/states/requisites.rst index 3d676e7679..6b00b3e856 100644 --- a/doc/ref/states/requisites.rst +++ b/doc/ref/states/requisites.rst @@ -517,7 +517,7 @@ inherit inherited options. runas ~~~~~ -.. versionadded:: Nitrogen +.. versionadded:: 2017.7.0 The ``runas`` global option is used to set the user which will be used to run the command in the ``cmd.run`` module. @@ -849,7 +849,7 @@ this one, include a ``mod_run_check_cmd`` in the states file for the state. Retrying States =============== -.. versionadded:: Nitrogen +.. versionadded:: 2017.7.0 The retry option in a state allows it to be executed multiple times until a desired result is obtained or the maximum number of attempts have been made. diff --git a/doc/topics/cloud/gce.rst b/doc/topics/cloud/gce.rst index e4b23f1969..e8670a4cfc 100644 --- a/doc/topics/cloud/gce.rst +++ b/doc/topics/cloud/gce.rst @@ -15,9 +15,10 @@ at https://cloud.google.com. Dependencies ============ + * LibCloud >= 1.0.0 -.. versionchanged:: Nitrogen +.. versionchanged:: 2017.7.0 * A Google Cloud Platform account with Compute Engine enabled * A registered Service Account for authorization @@ -226,7 +227,7 @@ Use this setting to define the subnetwork an instance will be created in. This requires that the network your instance is created under has a mode of 'custom' or 'auto'. Additionally, the subnetwork your instance is created under is associated with the location you provide. -.. versionadded:: Nitrogen +.. versionadded:: 2017.7.0 tags ---- @@ -526,7 +527,7 @@ not possible to add/remove existing instances to a network. salt-cloud -f create_network gce name=mynet cidr=10.10.10.0/24 salt-cloud -f create_network gce name=mynet mode=auto description=some optional info. -.. versionchanged:: Nitrogen +.. versionchanged:: 2017.7.0 Destroy network --------------- @@ -546,7 +547,8 @@ Specify the network name to view information about the network. salt-cloud -f show_network gce name=mynet Create subnetwork --------------- +----------------- + New subnetworks require a name, region, and CIDR range. Optionally, 'description' can be provided to add an extra note to your subnetwork. New instances can be created and added to this subnetwork by setting the subnetwork name during create. It is @@ -557,10 +559,11 @@ not possible to add/remove existing instances to a subnetwork. salt-cloud -f create_subnetwork gce name=mynet network=mynet region=us-central1 cidr=10.0.10.0/24 salt-cloud -f create_subnetwork gce name=mynet network=mynet region=us-central1 cidr=10.10.10.0/24 description=some info about my subnet. -.. versionadded:: Nitrogen +.. versionadded:: 2017.7.0 Destroy subnetwork ---------------- +------------------ + Destroy a subnetwork by specifying the name and region. If a resource is currently using the target subnetwork an exception will be raised. @@ -568,17 +571,18 @@ the target subnetwork an exception will be raised. salt-cloud -f delete_subnetwork gce name=mynet region=us-central1 -.. versionadded:: Nitrogen +.. versionadded:: 2017.7.0 Show subnetwork ------------- +--------------- + Specify the subnetwork name to view information about the subnetwork. .. code-block:: bash salt-cloud -f show_subnetwork gce name=mynet -.. versionadded:: Nitrogen +.. versionadded:: 2017.7.0 Create address -------------- diff --git a/doc/topics/cloud/map.rst b/doc/topics/cloud/map.rst index ea897cbbbb..6dba33440c 100644 --- a/doc/topics/cloud/map.rst +++ b/doc/topics/cloud/map.rst @@ -92,7 +92,7 @@ Any top level data element from your profile may be overridden in the map file: - web2: size: t2.nano -As of Salt Nitrogen, nested elements are merged, and can can be specified +As of Salt 2017.7.0, nested elements are merged, and can can be specified individually without having to repeat the complete definition for each top level data element. In this example a separate MAC is assigned to each VMware instance while inheriting device parameters for for disk and network diff --git a/doc/topics/event/master_events.rst b/doc/topics/event/master_events.rst index eaff57d118..daa51c0818 100644 --- a/doc/topics/event/master_events.rst +++ b/doc/topics/event/master_events.rst @@ -136,7 +136,7 @@ Runner Events ``state`` and ``function`` types, also includes a ``tgt_type`` value which shows what kind of match (``glob``, ``pcre``, etc.) was used. This value was named ``expr_form`` in the 2016.11 release cycle but has - been renamed to ``tgt_type`` in Nitrogen for consistency with other + been renamed to ``tgt_type`` in 2017.7.0 for consistency with other events. .. _event-master_presence: diff --git a/doc/topics/jinja/index.rst b/doc/topics/jinja/index.rst index a0f91a51c6..5548b29646 100644 --- a/doc/topics/jinja/index.rst +++ b/doc/topics/jinja/index.rst @@ -261,7 +261,7 @@ use ``yaml_encode`` or ``yaml_dquote``). ``to_bool`` ----------- -.. versionadded:: Nitrogen +.. versionadded:: 2017.7.0 Returns the logical value of an element. @@ -289,7 +289,7 @@ Will be rendered as: ``exactly_n_true`` ------------------ -.. versionadded:: Nitrogen +.. versionadded:: 2017.7.0 Tests that exactly N items in an iterable are "truthy" (neither None, False, nor 0). @@ -309,9 +309,9 @@ Returns: .. jinja_ref:: exactly_one_true ``exactly_one_true`` ------------------- +-------------------- -.. versionadded:: Nitrogen +.. versionadded:: 2017.7.0 Tests that exactly one item in an iterable is "truthy" (neither None, False, nor 0). @@ -333,7 +333,7 @@ Returns: ``quote`` --------- -.. versionadded:: Nitrogen +.. versionadded:: 2017.7.0 Wraps a text around quoutes. @@ -343,7 +343,7 @@ Wraps a text around quoutes. ``regex_search`` ---------------- -.. versionadded:: Nitrogen +.. versionadded:: 2017.7.0 Scan through string looking for a location where this regular expression produces a match. Returns ``None`` in case there were no matches found @@ -364,9 +364,9 @@ Returns: .. jinja_ref:: regex_match ``regex_match`` ----------------- +--------------- -.. versionadded:: Nitrogen +.. versionadded:: 2017.7.0 If zero or more characters at the beginning of string match this regular expression, otherwise returns ``None``. @@ -389,7 +389,7 @@ Returns: ``uuid`` -------- -.. versionadded:: Nitrogen +.. versionadded:: 2017.7.0 Return a UUID. @@ -411,7 +411,7 @@ Returns: ``is_list`` ----------- -.. versionadded:: Nitrogen +.. versionadded:: 2017.7.0 Return if an object is list. @@ -433,7 +433,7 @@ Returns: ``is_iter`` ----------- -.. versionadded:: Nitrogen +.. versionadded:: 2017.7.0 Return if an object is iterable. @@ -455,7 +455,7 @@ Returns: ``min`` ------- -.. versionadded:: Nitrogen +.. versionadded:: 2017.7.0 Return the minimum value from a list. @@ -477,7 +477,7 @@ Returns: ``max`` ------- -.. versionadded:: Nitrogen +.. versionadded:: 2017.7.0 Returns the maximum value from a list. @@ -499,7 +499,7 @@ Returns: ``avg`` ------- -.. versionadded:: Nitrogen +.. versionadded:: 2017.7.0 Returns the average value of the elements of a list @@ -521,7 +521,7 @@ Returns: ``union`` --------- -.. versionadded:: Nitrogen +.. versionadded:: 2017.7.0 Return the union of two lists. @@ -543,7 +543,7 @@ Returns: ``intersect`` ------------- -.. versionadded:: Nitrogen +.. versionadded:: 2017.7.0 Return the intersection of two lists. @@ -565,7 +565,7 @@ Returns: ``difference`` -------------- -.. versionadded:: Nitrogen +.. versionadded:: 2017.7.0 Return the difference of two lists. @@ -588,7 +588,7 @@ Returns: ``symmetric_difference`` ------------------------ -.. versionadded:: Nitrogen +.. versionadded:: 2017.7.0 Return the symmetric difference of two lists. @@ -610,7 +610,7 @@ Returns: ``is_sorted`` ------------- -.. versionadded:: Nitrogen +.. versionadded:: 2017.7.0 Return is an iterable object is already sorted. @@ -632,7 +632,7 @@ Returns: ``compare_lists`` ----------------- -.. versionadded:: Nitrogen +.. versionadded:: 2017.7.0 Compare two lists and return a dictionary with the changes. @@ -654,7 +654,7 @@ Returns: ``compare_dicts`` ----------------- -.. versionadded:: Nitrogen +.. versionadded:: 2017.7.0 Compare two dictionaries and return a dictionary with the changes. @@ -676,7 +676,7 @@ Returns: ``is_hex`` ---------- -.. versionadded:: Nitrogen +.. versionadded:: 2017.7.0 Return True if the value is hexazecimal. @@ -700,7 +700,7 @@ Returns: ``contains_whitespace`` ----------------------- -.. versionadded:: Nitrogen +.. versionadded:: 2017.7.0 Return True if a text contains whitespaces. @@ -724,7 +724,7 @@ Returns: ``substring_in_list`` --------------------- -.. versionadded:: Nitrogen +.. versionadded:: 2017.7.0 Return is a substring is found in a list of string values. @@ -746,7 +746,7 @@ Returns: ``check_whitelist_blacklist`` ----------------------------- -.. versionadded:: Nitrogen +.. versionadded:: 2017.7.0 Check a whitelist and/or blacklist to see if the value matches it. @@ -769,7 +769,7 @@ Returns: ``date_format`` --------------- -.. versionadded:: Nitrogen +.. versionadded:: 2017.7.0 Converts unix timestamp into human-readable string. @@ -793,7 +793,7 @@ Returns: ``str_to_num`` -------------- -.. versionadded:: Nitrogen +.. versionadded:: 2017.7.0 Converts a string to its numerical value. @@ -815,7 +815,7 @@ Returns: ``to_bytes`` ------------ -.. versionadded:: Nitrogen +.. versionadded:: 2017.7.0 Converts string-type object to bytes. @@ -831,7 +831,7 @@ Example: ``json_decode_list`` -------------------- -.. versionadded:: Nitrogen +.. versionadded:: 2017.7.0 JSON decodes as unicode, Jinja needs bytes. @@ -853,7 +853,7 @@ Returns: ``json_decode_dict`` -------------------- -.. versionadded:: Nitrogen +.. versionadded:: 2017.7.0 JSON decodes as unicode, Jinja needs bytes. @@ -875,7 +875,7 @@ Returns: ``rand_str`` ------------ -.. versionadded:: Nitrogen +.. versionadded:: 2017.7.0 Generate a random string and applies a hash. Default hashing: md5. @@ -900,7 +900,7 @@ Returns: ``md5`` ------- -.. versionadded:: Nitrogen +.. versionadded:: 2017.7.0 Return the md5 digest of a string. @@ -922,7 +922,7 @@ Returns: ``sha256`` ---------- -.. versionadded:: Nitrogen +.. versionadded:: 2017.7.0 Return the sha256 digest of a string. @@ -944,7 +944,7 @@ Returns: ``sha512`` ---------- -.. versionadded:: Nitrogen +.. versionadded:: 2017.7.0 Return the sha512 digest of a string. @@ -966,7 +966,7 @@ Returns: ``base64_encode`` ----------------- -.. versionadded:: Nitrogen +.. versionadded:: 2017.7.0 Encode a string as base64. @@ -988,7 +988,7 @@ Returns: ``base64_decode`` ----------------- -.. versionadded:: Nitrogen +.. versionadded:: 2017.7.0 Decode a base64-encoded string. @@ -1008,7 +1008,7 @@ Returns: ``hmac`` -------- -.. versionadded:: Nitrogen +.. versionadded:: 2017.7.0 Verify a challenging hmac signature against a string / shared-secret. Returns a boolean value. @@ -1031,7 +1031,7 @@ Returns: ``http_query`` -------------- -.. versionadded:: Nitrogen +.. versionadded:: 2017.7.0 Return the HTTP reply object from a URL. @@ -1068,7 +1068,7 @@ The following networking-related filters are supported: ``is_ip`` --------- -.. versionadded:: Nitrogen +.. versionadded:: 2017.7.0 Return if a string is a valid IP Address. @@ -1101,7 +1101,7 @@ Example - test if a string is a valid loopback IP address. ``is_ipv4`` ----------- -.. versionadded:: Nitrogen +.. versionadded:: 2017.7.0 Returns if a string is a valid IPv4 address. Supports the same options as ``is_ip``. @@ -1116,7 +1116,7 @@ as ``is_ip``. ``is_ipv6`` ----------- -.. versionadded:: Nitrogen +.. versionadded:: 2017.7.0 Returns if a string is a valid IPv6 address. Supports the same options as ``is_ip``. @@ -1131,7 +1131,7 @@ as ``is_ip``. ``ipaddr`` ---------- -.. versionadded:: Nitrogen +.. versionadded:: 2017.7.0 From a list, returns only valid IP entries. Supports the same options as ``is_ip``. The list can contains also IP interfaces/networks. @@ -1154,7 +1154,7 @@ Returns: ``ipv4`` -------- -.. versionadded:: Nitrogen +.. versionadded:: 2017.7.0 From a list, returns only valid IPv4 entries. Supports the same options as ``is_ip``. The list can contains also IP interfaces/networks. @@ -1177,7 +1177,7 @@ Returns: ``ipv6`` -------- -.. versionadded:: Nitrogen +.. versionadded:: 2017.7.0 From a list, returns only valid IPv6 entries. Supports the same options as ``is_ip``. The list can contains also IP interfaces/networks. @@ -1200,7 +1200,7 @@ Returns: ``network_hosts`` ----------------- -.. versionadded:: Nitrogen +.. versionadded:: 2017.7.0 Return the list of hosts within a networks. @@ -1222,7 +1222,7 @@ Returns: ``network_size`` ---------------- -.. versionadded:: Nitrogen +.. versionadded:: 2017.7.0 Return the size of the network. @@ -1244,7 +1244,7 @@ Returns: ``gen_mac`` ----------- -.. versionadded:: Nitrogen +.. versionadded:: 2017.7.0 Generates a MAC address with the defined OUI prefix. @@ -1274,7 +1274,7 @@ Returns: ``mac_str_to_bytes`` -------------------- -.. versionadded:: Nitrogen +.. versionadded:: 2017.7.0 Converts a string representing a valid MAC address to bytes. @@ -1290,7 +1290,7 @@ Example: ``dns_check`` ------------- -.. versionadded:: Nitrogen +.. versionadded:: 2017.7.0 Return the ip resolved by dns, but do not exit on failure, only raise an exception. Obeys system preference for IPv4/6 address resolution. @@ -1313,9 +1313,9 @@ File filters .. jinja_ref:: is_text_file ``is_text_file`` ---------------- +---------------- -.. versionadded:: Nitrogen +.. versionadded:: 2017.7.0 Return if a file is text. @@ -1342,7 +1342,7 @@ Returns: ``is_binary_file`` ------------------ -.. versionadded:: Nitrogen +.. versionadded:: 2017.7.0 Return if a file is binary. @@ -1367,7 +1367,7 @@ Returns: ``is_empty_file`` ----------------- -.. versionadded:: Nitrogen +.. versionadded:: 2017.7.0 Return if a file is empty. @@ -1389,7 +1389,7 @@ Returns: ``file_hashsum`` ---------------- -.. versionadded:: Nitrogen +.. versionadded:: 2017.7.0 Return the hashsum of a file. @@ -1411,7 +1411,7 @@ Returns: ``list_files`` -------------- -.. versionadded:: Nitrogen +.. versionadded:: 2017.7.0 Return a recursive list of files under a specific path. @@ -1437,7 +1437,7 @@ Returns: ``path_join`` ------------- -.. versionadded:: Nitrogen +.. versionadded:: 2017.7.0 Joins absolute paths. @@ -1459,7 +1459,7 @@ Returns: ``which`` --------- -.. versionadded:: Nitrogen +.. versionadded:: 2017.7.0 Python clone of /usr/bin/which. @@ -1599,7 +1599,7 @@ in the current Jinja context. Logs ---- -.. versionadded:: Nitrogen +.. versionadded:: 2017.7.0 Yes, in Salt, one is able to debug a complex Jinja template using the logs. For example, making the call: diff --git a/doc/topics/mine/index.rst b/doc/topics/mine/index.rst index 9d9c2a511b..62bdd55dbe 100644 --- a/doc/topics/mine/index.rst +++ b/doc/topics/mine/index.rst @@ -225,5 +225,5 @@ Create the Jinja template in :file:`/srv/salt/haproxy_config`: In the above example, ``server`` will be expanded to the ``minion_id``. .. note:: - The expr_form argument will be renamed to ``tgt_type`` in the Nitrogen + The expr_form argument will be renamed to ``tgt_type`` in the 2017.7.0 release of Salt. diff --git a/doc/topics/pillar/index.rst b/doc/topics/pillar/index.rst index 08188b1b5e..b76e698ca5 100644 --- a/doc/topics/pillar/index.rst +++ b/doc/topics/pillar/index.rst @@ -376,7 +376,7 @@ the ``testing`` environment, without modifying the in-memory pillar data. this case would still restrict the states' pillar data to just that of the ``testing`` pillar environment. -Starting in the Nitrogen release, it is possible to pin the pillarenv to the +Starting in the 2017.7.0 release, it is possible to pin the pillarenv to the effective saltenv, using the :conf_minion:`pillarenv_from_saltenv` minion config option. When this is set to ``True``, if a specific saltenv is specified when running states, the ``pillarenv`` will be the same. This essentially makes @@ -497,7 +497,7 @@ compilation. Encrypted Pillar SLS -------------------- -.. versionadded:: Nitrogen +.. versionadded:: 2017.7.0 Consider the following pillar SLS file: diff --git a/doc/topics/proxyminion/index.rst b/doc/topics/proxyminion/index.rst index da7708590e..80806c646a 100644 --- a/doc/topics/proxyminion/index.rst +++ b/doc/topics/proxyminion/index.rst @@ -36,7 +36,7 @@ or more minions. See :ref:`Proxyminion Beacon ` to help with easy configuration and management of ``salt-proxy`` processes. -New in Nitrogen +New in 2017.7.0 --------------- The :conf_proxy:`proxy_merge_grains_in_module` configuration variable @@ -128,7 +128,7 @@ will be executed on proxy-minion startup and its contents will be merged with the rest of the proxy's grains. Since older proxy-minions might have used other methods to call such a function and add its results to grains, this is config-gated by a new proxy configuration option called ``proxy_merge_grains_in_module``. This -defaults to ``True`` in the **Nitrogen** release. +defaults to ``True`` in the **2017.7.0** release. New in 2015.8.2 @@ -377,7 +377,7 @@ the ``proxy_keep_alive_interval`` option, in minutes. the standard install directories for grains, grains can be computed and returned by this function. This function will be called automatically if ``proxy_merge_grains_in_module`` is set to ``True`` in /etc/salt/proxy. -This variable defaults to ``True`` in the release code-named *Nitrogen*. +This variable defaults to ``True`` in the release code-named *2017.7.0*. Pre 2015.8 the proxymodule also must have an ``id()`` function. 2015.8 and following don't use this function because the proxy's id is required on the command line. @@ -621,7 +621,7 @@ the proxy and grains directories. This function will only be called automatically if the configuration variable ``proxy_merge_grains_in_module`` is set to True in the proxy configuration file (default ``/etc/salt/proxy``). This -variable defaults to ``True`` in the release code-named *Nitrogen*. +variable defaults to ``True`` in the release code-named *2017.7.0*. .. code: python:: diff --git a/doc/topics/reactor/index.rst b/doc/topics/reactor/index.rst index edc1cb863d..2586245a1a 100644 --- a/doc/topics/reactor/index.rst +++ b/doc/topics/reactor/index.rst @@ -396,7 +396,7 @@ Use the ``tgt_type`` argument to specify a matcher: .. note:: The ``tgt_type`` argument was named ``expr_form`` in releases prior to - Nitrogen (2016.11.x and earlier). + 2017.7.0 (2016.11.x and earlier). Any other parameters in the :py:meth:`LocalClient().cmd() ` method can be specified as well. diff --git a/doc/topics/releases/2015.8.0.rst b/doc/topics/releases/2015.8.0.rst index b587ea614b..ac9b03ff11 100644 --- a/doc/topics/releases/2015.8.0.rst +++ b/doc/topics/releases/2015.8.0.rst @@ -231,7 +231,7 @@ Deprecations - The use of ``provider`` in Salt Cloud provider files to define cloud drivers has been deprecated in favor of using ``driver``. Both terms will work until - the Nitrogen release of Salt. Example provider file: + the 2017.7.0 release of Salt. Example provider file: .. code-block:: yaml diff --git a/doc/topics/releases/2016.11.0.rst b/doc/topics/releases/2016.11.0.rst index 05bc8fabf5..a432adc506 100644 --- a/doc/topics/releases/2016.11.0.rst +++ b/doc/topics/releases/2016.11.0.rst @@ -561,7 +561,7 @@ General Deprecations - If ``env`` (or ``__env__``) is supplied as a keyword argument to a function that also accepts arbitrary keyword arguments, then a new warning informs the user that ``env`` is no longer used if it is found. This new warning will be - removed in Salt Nitrogen. + removed in Salt 2017.7.0. .. code-block:: python diff --git a/doc/topics/releases/2016.3.0.rst b/doc/topics/releases/2016.3.0.rst index d7ee082aea..01e1a5751c 100644 --- a/doc/topics/releases/2016.3.0.rst +++ b/doc/topics/releases/2016.3.0.rst @@ -274,7 +274,7 @@ Module Changes :mod:`apache_site state module `: the ``enable`` and ``disable`` functions were renamed to ``enabled`` and ``disabled``, respectively. In :pull:`33562`, these functions were readded and properly - deprecated and will be removed in Salt Nitrogen. This fix will be available + deprecated and will be removed in Salt 2017.7.0. This fix will be available in 2016.3.1. As a workaround, try .. code-block:: sls diff --git a/doc/topics/releases/nitrogen.rst b/doc/topics/releases/2017.7.0.rst similarity index 98% rename from doc/topics/releases/nitrogen.rst rename to doc/topics/releases/2017.7.0.rst index bc9176efc2..05967d468d 100644 --- a/doc/topics/releases/nitrogen.rst +++ b/doc/topics/releases/2017.7.0.rst @@ -1,8 +1,8 @@ -:orphan: +.. _release-2017-7-0: -====================================== -Salt Release Notes - Codename Nitrogen -====================================== +=============================================== +Salt 2017.7.0 Release Notes - Codename Nitrogen +=============================================== States Added for Management of systemd Unit Masking =================================================== @@ -272,7 +272,7 @@ Jinja Filters ------- -New filters in Nitrogen: +New filters in 2017.7.0: - :jinja_ref:`to_bool` - :jinja_ref:`exactly_n_true` @@ -365,7 +365,7 @@ have been improved, enhanced and widenened in scope: - Proxy keepalive: due to external factors, the connection with the remote device can be dropped, e.g.: packet loss, idle time (no commands issued within a couple of minutes or seconds), or simply the device decides to kill - the process. In Nitrogen we have introduced the functionality to re-establish + the process. In 2017.7.0 we have introduced the functionality to re-establish the connection. One can disable this feature through the :conf_proxy:`proxy_keep_alive` option and adjust the polling frequency speciying a custom value for :conf_proxy:`proxy_keep_alive_interval`, @@ -520,7 +520,7 @@ documentation for :ref:`skip_translate .. note:: When running the :py:func:`docker_container.running ` state for the first time after - upgrading to Nitrogen, your container(s) may be replaced. The changes may + upgrading to 2017.7.0, your container(s) may be replaced. The changes may show diffs for certain parameters which say that the old value was an empty string, and the new value is ``None``. This is due to the fact that in prior releases Salt was passing empty strings for these values when @@ -748,7 +748,7 @@ The ``htpasswd`` execution module had the following function removed: - ``useradd_all``: Please use ``useradd`` instead. The ``img`` execution module has been removed. All of its associated functions -were marked for removal in the Nitrogen release. The functions removed in this +were marked for removal in the 2017.7.0 release. The functions removed in this module are mapped as follows: - ``mount_image``/``mnt_image``: Please use ``mount.mount`` instead. diff --git a/doc/topics/releases/index.rst b/doc/topics/releases/index.rst index 23221375a3..694f1bf2aa 100644 --- a/doc/topics/releases/index.rst +++ b/doc/topics/releases/index.rst @@ -20,6 +20,7 @@ Previous Releases :maxdepth: 1 :glob: + 2017.7.* 2016.11.* 2016.3.* 2015.8.* diff --git a/doc/topics/releases/version_numbers.rst b/doc/topics/releases/version_numbers.rst index feca784f49..0e98393ae1 100644 --- a/doc/topics/releases/version_numbers.rst +++ b/doc/topics/releases/version_numbers.rst @@ -11,9 +11,11 @@ format ``YYYY.MM.R``. The year (``YYYY``) and month (``MM``) reflect when the release was created. The bugfix release number (``R``) increments within that feature release. -.. note:: Prior to the ``2014.1.0`` release, the typical semantic versioning was - still being used. Because of the rolling nature of the project, this did not - make sense. The ``0.17`` release was the last of that style. +.. note:: + + Prior to the ``2014.1.0`` release, the typical semantic versioning was + still being used. Because of the rolling nature of the project, this did not + make sense. The ``0.17`` release was the last of that style. Code Names ---------- @@ -31,8 +33,9 @@ Assigned codenames: - Beryllium: ``2015.8.0`` - Boron: ``2016.3.0`` - Carbon: ``2016.11.0`` -- Nitrogen: ``TBD`` +- Nitrogen: ``2017.7.0`` - Oxygen: ``TBD`` +- Fluorine: ``TBD`` Example ------- @@ -49,10 +52,12 @@ code name and the process repeats itself. Version numbers, Git and salt --version -------- +--------------------------------------- + The salt version, for programmers, is based on `git describe` and presented to end-users with `salt --version`. -Example arguments for `git checkout` +Example arguments for `git checkout`: + +------------+----------------------------------------------------------------------------+ | Argument | Comment | +============+============================================================================+ @@ -68,7 +73,8 @@ Example arguments for `git checkout` Further reading on `release branch and develop branch `_. -Influence of the `git checkout` argument on `git describe` +Influence of the `git checkout` argument on `git describe`: + +------------+----------------------------+-----------------------------------------------+ | Checkout | Describe | Comment | +============+============================+===============================================+ @@ -80,10 +86,9 @@ Influence of the `git checkout` argument on `git describe` +------------+----------------------------+-----------------------------------------------+ | develop | v2016.11.1-1741-g10d5dec | Commit of most recent tag in develop | +------------+----------------------------+-----------------------------------------------+ - - -Some details of v2016.11.1-220-g9a1550d (from `git describe` after `git checkout 2016.11`) +Some details of v2016.11.1-220-g9a1550d (from `git describe` after `git checkout 2016.11`): + +---------------+-------------------------------------------------------------------------+ | Part | Comment | +===============+=========================================================================+ diff --git a/doc/topics/ssh/index.rst b/doc/topics/ssh/index.rst index 1f8c70fa70..8920e9e648 100644 --- a/doc/topics/ssh/index.rst +++ b/doc/topics/ssh/index.rst @@ -112,7 +112,7 @@ Calling Salt SSH .. note:: ``salt-ssh`` on systems with Python 3.x - Salt, before the Nitrogen release, does not support Python 3.x which is the + Salt, before the 2017.7.0 release, does not support Python 3.x which is the default on for example the popular 16.04 LTS release of Ubuntu. An easy workaround for this scenario is to use the ``-r`` option similar to the example above: diff --git a/doc/topics/targeting/nodegroups.rst b/doc/topics/targeting/nodegroups.rst index 914e30b901..6043d959af 100644 --- a/doc/topics/targeting/nodegroups.rst +++ b/doc/topics/targeting/nodegroups.rst @@ -28,7 +28,7 @@ nodegroups. Here's an example nodegroup configuration within group2 is matching specific grains. See the :ref:`compound matchers ` documentation for more details. - As of the Nitrogen release of Salt, group names can also be prepended with + As of the 2017.7.0 release of Salt, group names can also be prepended with a dash. This brings the usage in line with many other areas of Salt. For example: diff --git a/doc/topics/tutorials/gitfs.rst b/doc/topics/tutorials/gitfs.rst index e951023cd3..fb23173dfb 100644 --- a/doc/topics/tutorials/gitfs.rst +++ b/doc/topics/tutorials/gitfs.rst @@ -329,7 +329,7 @@ configured gitfs remotes): * :conf_master:`gitfs_pubkey` (**pygit2 only**, new in 2014.7.0) * :conf_master:`gitfs_privkey` (**pygit2 only**, new in 2014.7.0) * :conf_master:`gitfs_passphrase` (**pygit2 only**, new in 2014.7.0) -* :conf_master:`gitfs_refspecs` (new in Nitrogen) +* :conf_master:`gitfs_refspecs` (new in 2017.7.0) .. note:: pygit2 only supports disabling SSL verification in versions 0.23.2 and @@ -471,7 +471,7 @@ Given the above configuration, the following is true: Custom Refspecs =============== -.. versionadded:: Nitrogen +.. versionadded:: 2017.7.0 GitFS will by default fetch remote branches and tags. However, sometimes it can be useful to fetch custom refs (such as those created for `GitHub pull diff --git a/pkg/windows/buildenv/salt-call.bat b/pkg/windows/buildenv/salt-call.bat index 144a1ef312..095f51e4c1 100644 --- a/pkg/windows/buildenv/salt-call.bat +++ b/pkg/windows/buildenv/salt-call.bat @@ -8,4 +8,6 @@ Set SaltDir=%SaltDir:~0,-1% Set Python=%SaltDir%\bin\python.exe Set Script=%SaltDir%\bin\Scripts\salt-call +:: Launch Script "%Python%" "%Script%" %* + diff --git a/pkg/windows/buildenv/salt-cp.bat b/pkg/windows/buildenv/salt-cp.bat index 41d9182cac..29274320b1 100644 --- a/pkg/windows/buildenv/salt-cp.bat +++ b/pkg/windows/buildenv/salt-cp.bat @@ -8,4 +8,6 @@ Set SaltDir=%SaltDir:~0,-1% Set Python=%SaltDir%\bin\python.exe Set Script=%SaltDir%\bin\Scripts\salt-cp +:: Launch Script "%Python%" "%Script%" %* + diff --git a/pkg/windows/buildenv/salt-key.bat b/pkg/windows/buildenv/salt-key.bat new file mode 100644 index 0000000000..471e3626b2 --- /dev/null +++ b/pkg/windows/buildenv/salt-key.bat @@ -0,0 +1,13 @@ +@ echo off +:: Script for invoking salt-key +:: Accepts all parameters that salt-key accepts + +:: Define Variables +Set SaltDir=%~dp0 +Set SaltDir=%SaltDir:~0,-1% +Set Python=%SaltDir%\bin\python.exe +Set Script=%SaltDir%\bin\Scripts\salt-key + +:: Launch Script +"%Python%" "%Script%" %* + diff --git a/pkg/windows/buildenv/salt-master.bat b/pkg/windows/buildenv/salt-master.bat new file mode 100644 index 0000000000..9a124ffd46 --- /dev/null +++ b/pkg/windows/buildenv/salt-master.bat @@ -0,0 +1,13 @@ +@ echo off +:: Script for starting the Salt-Master +:: Accepts all parameters that Salt-Master accepts + +:: Define Variables +Set SaltDir=%~dp0 +Set SaltDir=%SaltDir:~0,-1% +Set Python=%SaltDir%\bin\python.exe +Set Script=%SaltDir%\bin\Scripts\salt-master + +:: Launch Script +"%Python%" "%Script%" %* + diff --git a/pkg/windows/buildenv/salt-minion-debug.bat b/pkg/windows/buildenv/salt-minion-debug.bat index ac57d505d1..ad0ebafee0 100644 --- a/pkg/windows/buildenv/salt-minion-debug.bat +++ b/pkg/windows/buildenv/salt-minion-debug.bat @@ -8,6 +8,9 @@ Set SaltDir=%SaltDir:~0,-1% Set Python=%SaltDir%\bin\python.exe Set Script=%SaltDir%\bin\Scripts\salt-minion +:: Stop the Salt Minion service net stop salt-minion +:: Launch Script "%Python%" "%Script%" -l debug + diff --git a/pkg/windows/buildenv/salt-minion-start-service.bat b/pkg/windows/buildenv/salt-minion-start-service.bat index 179a702ed1..cf79c60f25 100644 --- a/pkg/windows/buildenv/salt-minion-start-service.bat +++ b/pkg/windows/buildenv/salt-minion-start-service.bat @@ -1 +1,2 @@ -net start salt-minion \ No newline at end of file +:: Start the Salt Minion service +net start salt-minion diff --git a/pkg/windows/buildenv/salt-minion.bat b/pkg/windows/buildenv/salt-minion.bat index 3b7ac93f83..0a1aafa0c0 100644 --- a/pkg/windows/buildenv/salt-minion.bat +++ b/pkg/windows/buildenv/salt-minion.bat @@ -8,4 +8,6 @@ Set SaltDir=%SaltDir:~0,-1% Set Python=%SaltDir%\bin\python.exe Set Script=%SaltDir%\bin\Scripts\salt-minion +:: Launch Script "%Python%" "%Script%" %* + diff --git a/pkg/windows/buildenv/salt-run.bat b/pkg/windows/buildenv/salt-run.bat new file mode 100644 index 0000000000..5d62775d5e --- /dev/null +++ b/pkg/windows/buildenv/salt-run.bat @@ -0,0 +1,13 @@ +@ echo off +:: Script for invoking salt-run +:: Accepts all parameters that salt-run accepts + +:: Define Variables +Set SaltDir=%~dp0 +Set SaltDir=%SaltDir:~0,-1% +Set Python=%SaltDir%\bin\python.exe +Set Script=%SaltDir%\bin\Scripts\salt-run + +:: Launch Script +"%Python%" "%Script%" %* + diff --git a/salt/beacons/log.py b/salt/beacons/log.py index 28931deb3d..4d063092f9 100644 --- a/salt/beacons/log.py +++ b/salt/beacons/log.py @@ -2,7 +2,7 @@ ''' Beacon to fire events at specific log messages. -.. versionadded:: Nitrogen +.. versionadded:: 2017.7.0 ''' diff --git a/salt/cache/redis_cache.py b/salt/cache/redis_cache.py index 6678787efd..fba83e9792 100644 --- a/salt/cache/redis_cache.py +++ b/salt/cache/redis_cache.py @@ -5,7 +5,7 @@ Redis Redis plugin for the Salt caching subsystem. -.. versionadded:: Nitrogen +.. versionadded:: 2017.7.0 As Redis provides a simple mechanism for very fast key-value store, in order to privde the necessary features for the Salt diff --git a/salt/client/__init__.py b/salt/client/__init__.py index 834e57270b..e7821a5660 100644 --- a/salt/client/__init__.py +++ b/salt/client/__init__.py @@ -674,7 +674,7 @@ class LocalClient(object): * ``compound`` - Pass a compound match string * ``ipcidr`` - Match based on Subnet (CIDR notation) or IPv4 address. - .. versionchanged:: Nitrogen + .. versionchanged:: 2017.7.0 Renamed from ``expr_form`` to ``tgt_type`` :param ret: The returner to use. The value passed can be single diff --git a/salt/client/ssh/client.py b/salt/client/ssh/client.py index 87889268f4..46ad336e44 100644 --- a/salt/client/ssh/client.py +++ b/salt/client/ssh/client.py @@ -224,7 +224,7 @@ class SSHClient(object): >>> sshclient.cmd_subset('*', 'test.ping', sub=1) {'jerry': True} - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 ''' if 'expr_form' in kwargs: salt.utils.warn_until( diff --git a/salt/client/ssh/wrapper/publish.py b/salt/client/ssh/wrapper/publish.py index f05ae74799..62a803e9ea 100644 --- a/salt/client/ssh/wrapper/publish.py +++ b/salt/client/ssh/wrapper/publish.py @@ -131,7 +131,7 @@ def publish(tgt, - glob - pcre - .. versionchanged:: Nitrogen + .. versionchanged:: 2017.7.0 The ``expr_form`` argument has been renamed to ``tgt_type``, earlier releases must use ``expr_form``. diff --git a/salt/cloud/clouds/cloudstack.py b/salt/cloud/clouds/cloudstack.py index 3ea004892b..2f3af25869 100644 --- a/salt/cloud/clouds/cloudstack.py +++ b/salt/cloud/clouds/cloudstack.py @@ -33,14 +33,20 @@ import salt.config as config from salt.cloud.libcloudfuncs import * # pylint: disable=redefined-builtin,wildcard-import,unused-wildcard-import from salt.utils import namespaced_function from salt.exceptions import SaltCloudSystemExit +from salt.utils.versions import LooseVersion as _LooseVersion # CloudStackNetwork will be needed during creation of a new node # pylint: disable=import-error try: from libcloud.compute.drivers.cloudstack import CloudStackNetwork - # See https://github.com/saltstack/salt/issues/32743 - import libcloud.security - libcloud.security.CA_CERTS_PATH.append('/etc/ssl/certs/YaST-CA.pem') + # This work-around for Issue #32743 is no longer needed for libcloud >= 1.4.0. + # However, older versions of libcloud must still be supported with this work-around. + # This work-around can be removed when the required minimum version of libcloud is + # 2.0.0 (See PR #40837 - which is implemented in Salt Oxygen). + if _LooseVersion(libcloud.__version__) < _LooseVersion('1.4.0'): + # See https://github.com/saltstack/salt/issues/32743 + import libcloud.security + libcloud.security.CA_CERTS_PATH.append('/etc/ssl/certs/YaST-CA.pem') HAS_LIBS = True except ImportError: HAS_LIBS = False diff --git a/salt/cloud/clouds/dimensiondata.py b/salt/cloud/clouds/dimensiondata.py index 9732c7a50b..d022c5719f 100644 --- a/salt/cloud/clouds/dimensiondata.py +++ b/salt/cloud/clouds/dimensiondata.py @@ -27,9 +27,11 @@ from __future__ import absolute_import import logging import socket import pprint +from salt.utils.versions import LooseVersion as _LooseVersion # Import libcloud try: + import libcloud from libcloud.compute.base import NodeState from libcloud.compute.base import NodeAuthPassword from libcloud.compute.types import Provider @@ -37,9 +39,15 @@ try: from libcloud.loadbalancer.base import Member from libcloud.loadbalancer.types import Provider as Provider_lb from libcloud.loadbalancer.providers import get_driver as get_driver_lb - # See https://github.com/saltstack/salt/issues/32743 - import libcloud.security - libcloud.security.CA_CERTS_PATH.append('/etc/ssl/certs/YaST-CA.pem') + + # This work-around for Issue #32743 is no longer needed for libcloud >= 1.4.0. + # However, older versions of libcloud must still be supported with this work-around. + # This work-around can be removed when the required minimum version of libcloud is + # 2.0.0 (See PR #40837 - which is implemented in Salt Oxygen). + if _LooseVersion(libcloud.__version__) < _LooseVersion('1.4.0'): + # See https://github.com/saltstack/salt/issues/32743 + import libcloud.security + libcloud.security.CA_CERTS_PATH.append('/etc/ssl/certs/YaST-CA.pem') HAS_LIBCLOUD = True except ImportError: HAS_LIBCLOUD = False diff --git a/salt/cloud/clouds/ec2.py b/salt/cloud/clouds/ec2.py index 3ddd46c885..afca0f904d 100644 --- a/salt/cloud/clouds/ec2.py +++ b/salt/cloud/clouds/ec2.py @@ -4020,7 +4020,46 @@ def volume_create(**kwargs): def create_volume(kwargs=None, call=None, wait_to_finish=False): ''' - Create a volume + Create a volume. + + zone + The availability zone used to create the volume. Required. String. + + size + The size of the volume, in GiBs. Defaults to ``10``. Integer. + + snapshot + The snapshot-id from which to create the volume. Integer. + + type + The volume type. This can be gp2 for General Purpose SSD, io1 for Provisioned + IOPS SSD, st1 for Throughput Optimized HDD, sc1 for Cold HDD, or standard for + Magnetic volumes. String. + + iops + The number of I/O operations per second (IOPS) to provision for the volume, + with a maximum ratio of 50 IOPS/GiB. Only valid for Provisioned IOPS SSD + volumes. Integer. + + This option will only be set if ``type`` is also specified as ``io1``. + + encrypted + Specifies whether the volume will be encrypted. Boolean. + + If ``snapshot`` is also given in the list of kwargs, then this value is ignored + since volumes that are created from encrypted snapshots are also automatically + encrypted. + + tags + The tags to apply to the volume during creation. Dictionary. + + call + The ``create_volume`` function must be called with ``-f`` or ``--function``. + String. + + wait_to_finish + Whether or not to wait for the volume to be available. Boolean. Defaults to + ``False``. CLI Examples: diff --git a/salt/cloud/clouds/gce.py b/salt/cloud/clouds/gce.py index e00f9baa07..950fa533e6 100644 --- a/salt/cloud/clouds/gce.py +++ b/salt/cloud/clouds/gce.py @@ -54,10 +54,12 @@ import pprint import logging import msgpack from ast import literal_eval +from salt.utils.versions import LooseVersion as _LooseVersion # Import 3rd-party libs # pylint: disable=import-error try: + import libcloud from libcloud.compute.types import Provider from libcloud.compute.providers import get_driver from libcloud.loadbalancer.types import Provider as Provider_lb @@ -66,9 +68,14 @@ try: ResourceInUseError, ResourceNotFoundError, ) - # See https://github.com/saltstack/salt/issues/32743 - import libcloud.security - libcloud.security.CA_CERTS_PATH.append('/etc/ssl/certs/YaST-CA.pem') + # This work-around for Issue #32743 is no longer needed for libcloud >= 1.4.0. + # However, older versions of libcloud must still be supported with this work-around. + # This work-around can be removed when the required minimum version of libcloud is + # 2.0.0 (See PR #40837 - which is implemented in Salt Oxygen). + if _LooseVersion(libcloud.__version__) < _LooseVersion('1.4.0'): + # See https://github.com/saltstack/salt/issues/32743 + import libcloud.security + libcloud.security.CA_CERTS_PATH.append('/etc/ssl/certs/YaST-CA.pem') HAS_LIBCLOUD = True except ImportError: HAS_LIBCLOUD = False @@ -555,7 +562,7 @@ def __get_ssh_credentials(vm_): def create_network(kwargs=None, call=None): ''' - ... versionchanged:: Nitrogen + ... versionchanged:: 2017.7.0 Create a GCE network. Must specify name and cidr. CLI Example: @@ -706,7 +713,7 @@ def show_network(kwargs=None, call=None): def create_subnetwork(kwargs=None, call=None): ''' - ... versionadded:: Nitrogen + ... versionadded:: 2017.7.0 Create a GCE Subnetwork. Must specify name, cidr, network, and region. CLI Example: @@ -788,7 +795,7 @@ def create_subnetwork(kwargs=None, call=None): def delete_subnetwork(kwargs=None, call=None): ''' - ... versionadded:: Nitrogen + ... versionadded:: 2017.7.0 Delete a GCE Subnetwork. Must specify name and region. CLI Example: @@ -856,7 +863,7 @@ def delete_subnetwork(kwargs=None, call=None): def show_subnetwork(kwargs=None, call=None): ''' - ... versionadded:: Nitrogen + ... versionadded:: 2017.7.0 Show details of an existing GCE Subnetwork. Must specify name and region. CLI Example: @@ -2165,7 +2172,7 @@ def start(vm_name, call=None): ''' Call GCE 'start on the instance. - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 CLI Example: @@ -2209,7 +2216,7 @@ def stop(vm_name, call=None): ''' Call GCE 'stop' on the instance. - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 CLI Example: @@ -2385,7 +2392,7 @@ def create_attach_volumes(name, kwargs, call=None): Volumes are attached in the order in which they are given, thus on a new node the first volume will be /dev/sdb, the second /dev/sdc, and so on. - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 ''' if call != 'action': raise SaltCloudSystemExit( @@ -2418,7 +2425,7 @@ def request_instance(vm_): ''' Request a single GCE instance from a data dict. - .. versionchanged: Nitrogen + .. versionchanged: 2017.7.0 ''' if not GCE_VM_NAME_REGEX.match(vm_['name']): raise SaltCloudSystemExit( diff --git a/salt/cloud/clouds/nova.py b/salt/cloud/clouds/nova.py index 4bcba743f5..6cf43eb0af 100644 --- a/salt/cloud/clouds/nova.py +++ b/salt/cloud/clouds/nova.py @@ -711,14 +711,29 @@ def request_instance(vm_=None, call=None): search_global=False, default={}) if floating_ip_conf.get('auto_assign', False): - pool = floating_ip_conf.get('pool', 'public') floating_ip = None - for fl_ip, opts in six.iteritems(conn.floating_ip_list()): - if opts['fixed_ip'] is None and opts['pool'] == pool: - floating_ip = fl_ip - break - if floating_ip is None: - floating_ip = conn.floating_ip_create(pool)['ip'] + if floating_ip_conf.get('ip_address', None) is not None: + ip_address = floating_ip_conf.get('ip_address', None) + try: + fl_ip_dict = conn.floating_ip_show(ip_address) + floating_ip = fl_ip_dict['ip'] + except Exception as err: + raise SaltCloudSystemExit( + 'Error assigning floating_ip for {0} on Nova\n\n' + 'The following exception was thrown by libcloud when trying to ' + 'assign a floating ip: {1}\n'.format( + vm_['name'], err + ) + ) + + else: + pool = floating_ip_conf.get('pool', 'public') + for fl_ip, opts in six.iteritems(conn.floating_ip_list()): + if opts['fixed_ip'] is None and opts['pool'] == pool: + floating_ip = fl_ip + break + if floating_ip is None: + floating_ip = conn.floating_ip_create(pool)['ip'] def __query_node_data(vm_): try: @@ -765,7 +780,7 @@ def request_instance(vm_=None, call=None): raise SaltCloudSystemExit( 'Error assigning floating_ip for {0} on Nova\n\n' 'The following exception was thrown by libcloud when trying to ' - 'assing a floating ip: {1}\n'.format( + 'assign a floating ip: {1}\n'.format( vm_['name'], exc ) ) diff --git a/salt/cloud/clouds/openstack.py b/salt/cloud/clouds/openstack.py index 1652ba36d3..96c1902cfb 100644 --- a/salt/cloud/clouds/openstack.py +++ b/salt/cloud/clouds/openstack.py @@ -143,9 +143,11 @@ import os import logging import socket import pprint +from salt.utils.versions import LooseVersion as _LooseVersion # Import libcloud try: + import libcloud from libcloud.compute.base import NodeState HAS_LIBCLOUD = True except ImportError: @@ -156,9 +158,14 @@ HAS014 = False try: from libcloud.compute.drivers.openstack import OpenStackNetwork from libcloud.compute.drivers.openstack import OpenStack_1_1_FloatingIpPool - # See https://github.com/saltstack/salt/issues/32743 - import libcloud.security - libcloud.security.CA_CERTS_PATH.append('/etc/ssl/certs/YaST-CA.pem') + # This work-around for Issue #32743 is no longer needed for libcloud >= 1.4.0. + # However, older versions of libcloud must still be supported with this work-around. + # This work-around can be removed when the required minimum version of libcloud is + # 2.0.0 (See PR #40837 - which is implemented in Salt Oxygen). + if _LooseVersion(libcloud.__version__) < _LooseVersion('1.4.0'): + # See https://github.com/saltstack/salt/issues/32743 + import libcloud.security + libcloud.security.CA_CERTS_PATH.append('/etc/ssl/certs/YaST-CA.pem') HAS014 = True except Exception: pass diff --git a/salt/config/__init__.py b/salt/config/__init__.py index 2d1f65885e..78fcf6eb72 100644 --- a/salt/config/__init__.py +++ b/salt/config/__init__.py @@ -971,7 +971,7 @@ VALID_OPTS = { # dictionary. Otherwise it is assumed that the module calls the grains # function in a custom way and returns the data elsewhere # - # Default to False for 2016.3 and 2016.11. Switch to True for Nitrogen + # Default to False for 2016.3 and 2016.11. Switch to True for 2017.7.0 'proxy_merge_grains_in_module': bool, # Command to use to restart salt-minion diff --git a/salt/engines/hipchat.py b/salt/engines/hipchat.py index c32c883ac3..a069a4f748 100644 --- a/salt/engines/hipchat.py +++ b/salt/engines/hipchat.py @@ -219,7 +219,7 @@ def start(token, api_url: ``https://api.hipchat.com`` The URL to the HipChat API. - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 max_rooms: ``1000`` Maximum number of rooms allowed to fetch. If set to 0, @@ -237,13 +237,13 @@ def start(token, This can be overriden when executing a command, using the ``--out-type`` argument. - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 outputter: ``nested`` The format to display the data, using the outputters available on the CLI. This argument can also be overriden when executing a command, using the ``--out`` option. - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 HipChat Example: diff --git a/salt/engines/ircbot.py b/salt/engines/ircbot.py index f353fbe754..1963ccb855 100644 --- a/salt/engines/ircbot.py +++ b/salt/engines/ircbot.py @@ -2,7 +2,7 @@ ''' IRC Bot engine -.. versionadded:: Nitrogen +.. versionadded:: 2017.7.0 Example Configuration diff --git a/salt/engines/junos_syslog.py b/salt/engines/junos_syslog.py index 168096bc87..1f8b57f15e 100644 --- a/salt/engines/junos_syslog.py +++ b/salt/engines/junos_syslog.py @@ -3,7 +3,7 @@ Junos Syslog Engine ========================== -.. versionadded:: Nitrogen +.. versionadded:: 2017.7.0 :depends: pyparsing, twisted diff --git a/salt/engines/napalm_syslog.py b/salt/engines/napalm_syslog.py index bf43b37ca1..36bb7c891b 100644 --- a/salt/engines/napalm_syslog.py +++ b/salt/engines/napalm_syslog.py @@ -3,7 +3,7 @@ NAPALM syslog engine ==================== -.. versionadded:: Nitrogen +.. versionadded:: 2017.7.0 An engine that takes syslog messages structured in OpenConfig_ or IETF format diff --git a/salt/engines/slack.py b/salt/engines/slack.py index 43c86a7fb8..0a3490a4c8 100644 --- a/salt/engines/slack.py +++ b/salt/engines/slack.py @@ -56,7 +56,7 @@ the saltmaster's minion pillar. :configuration: Example configuration using the "default" group and a non-default group and a pillar that will be merged in If the user is '*' (without the quotes) then the group's users or commands will match all users as appropriate - .. versionadded: Nitrogen + .. versionadded: 2017.7.0 engines: slack: diff --git a/salt/engines/stalekey.py b/salt/engines/stalekey.py index c30b8f5ccd..0804206dd8 100644 --- a/salt/engines/stalekey.py +++ b/salt/engines/stalekey.py @@ -6,7 +6,7 @@ connected for a certain period of time. Requires that the minion_data_cache option be enabled. -.. versionadded: Nitrogen +.. versionadded: 2017.7.0 :configuration: diff --git a/salt/grains/core.py b/salt/grains/core.py index 9a4f5480e4..19d489d00d 100644 --- a/salt/grains/core.py +++ b/salt/grains/core.py @@ -517,7 +517,7 @@ def _virtual(osdata): '\'virtual\' grain.' ) # Check if enable_lspci is True or False - if __opts__.get('enable_lspci', True) is False: + if __opts__.get('enable_lspci', True) is True: # /proc/bus/pci does not exists, lspci will fail if os.path.exists('/proc/bus/pci'): _cmds += ['lspci'] diff --git a/salt/grains/metadata.py b/salt/grains/metadata.py index 727df888ff..2372aac6c7 100644 --- a/salt/grains/metadata.py +++ b/salt/grains/metadata.py @@ -2,7 +2,7 @@ ''' Grains from cloud metadata servers at 169.254.169.254 -.. versionadded:: Nitrogen +.. versionadded:: 2017.7.0 :depends: requests diff --git a/salt/grains/napalm.py b/salt/grains/napalm.py index 7ac6ed27e7..6ac52464c8 100644 --- a/salt/grains/napalm.py +++ b/salt/grains/napalm.py @@ -266,7 +266,7 @@ def username(proxy=None): ''' Return the username. - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 CLI Example - select all devices using `foobar` as username for connection: @@ -331,7 +331,7 @@ def host(proxy=None): while ``hostname`` provides the hostname as configured on the device. They are not necessarily the same. - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 CLI Example: @@ -374,7 +374,7 @@ def host_dns(proxy=None): napalm_host_dns_grain: true - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 CLI Example: @@ -430,7 +430,7 @@ def optional_args(proxy=None): Sensible data will not be returned. - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 CLI Example - select all devices connecting via port 1234: diff --git a/salt/modules/apk.py b/salt/modules/apk.py index 4c0efe08b9..2674158bd6 100644 --- a/salt/modules/apk.py +++ b/salt/modules/apk.py @@ -8,7 +8,7 @@ Support for apk *'pkg.install' is not available*), see :ref:`here `. -.. versionadded: Nitrogen +.. versionadded: 2017.7.0 ''' from __future__ import absolute_import diff --git a/salt/modules/aptpkg.py b/salt/modules/aptpkg.py index 48a420a135..d93325360b 100644 --- a/salt/modules/aptpkg.py +++ b/salt/modules/aptpkg.py @@ -1597,7 +1597,7 @@ def _consolidate_repo_sources(sources): def list_repo_pkgs(*args, **kwargs): # pylint: disable=unused-import ''' - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 Returns all available packages. Optionally, package names (and name globs) can be passed and the results will be filtered to packages matching those @@ -1878,7 +1878,7 @@ def del_repo(repo, **kwargs): def _convert_if_int(value): ''' - .. versionadded:: nitrogen + .. versionadded:: 2017.7.0 Convert to an int if necessary. @@ -1896,7 +1896,7 @@ def _convert_if_int(value): def get_repo_keys(): ''' - .. versionadded:: nitrogen + .. versionadded:: 2017.7.0 List known repo key details. @@ -1968,7 +1968,7 @@ def get_repo_keys(): def add_repo_key(path=None, text=None, keyserver=None, keyid=None, saltenv='base'): ''' - .. versionadded:: nitrogen + .. versionadded:: 2017.7.0 Add a repo key using ``apt-key add``. diff --git a/salt/modules/archive.py b/salt/modules/archive.py index df00532488..68180fef15 100644 --- a/salt/modules/archive.py +++ b/salt/modules/archive.py @@ -481,7 +481,7 @@ def tar(options, tarfile, sources=None, dest=None, Comma delimited list of files to **pack** into the tarfile. Can also be passed as a Python list. - .. versionchanged:: Nitrogen + .. versionchanged:: 2017.7.0 Globbing is now supported for this argument dest @@ -506,7 +506,7 @@ def tar(options, tarfile, sources=None, dest=None, # Create a tarfile salt '*' archive.tar -cjvf /tmp/tarfile.tar.bz2 /tmp/file_1,/tmp/file_2 - # Create a tarfile using globbing (Nitrogen and later) + # Create a tarfile using globbing (2017.7.0 and later) salt '*' archive.tar -cjvf /tmp/tarfile.tar.bz2 '/tmp/file_*' # Unpack a tarfile salt '*' archive.tar xf foo.tar dest=/target/directory @@ -632,7 +632,7 @@ def cmd_zip(zip_file, sources, template=None, cwd=None, runas=None): Comma-separated list of sources to include in the zip file. Sources can also be passed in a Python list. - .. versionchanged:: Nitrogen + .. versionchanged:: 2017.7.0 Globbing is now supported for this argument template : None @@ -669,7 +669,7 @@ def cmd_zip(zip_file, sources, template=None, cwd=None, runas=None): .. code-block:: bash salt '*' archive.cmd_zip /tmp/zipfile.zip /tmp/sourcefile1,/tmp/sourcefile2 - # Globbing for sources (Nitrogen and later) + # Globbing for sources (2017.7.0 and later) salt '*' archive.cmd_zip /tmp/zipfile.zip '/tmp/sourcefile*' ''' cmd = ['zip', '-r'] @@ -701,7 +701,7 @@ def zip_(zip_file, sources, template=None, cwd=None, runas=None): Comma-separated list of sources to include in the zip file. Sources can also be passed in a Python list. - .. versionchanged:: Nitrogen + .. versionchanged:: 2017.7.0 Globbing is now supported for this argument template : None @@ -734,7 +734,7 @@ def zip_(zip_file, sources, template=None, cwd=None, runas=None): .. code-block:: bash salt '*' archive.zip /tmp/zipfile.zip /tmp/sourcefile1,/tmp/sourcefile2 - # Globbing for sources (Nitrogen and later) + # Globbing for sources (2017.7.0 and later) salt '*' archive.zip /tmp/zipfile.zip '/tmp/sourcefile*' ''' if runas: @@ -1163,7 +1163,7 @@ def rar(rarfile, sources, template=None, cwd=None, runas=None): Comma-separated list of sources to include in the rar file. Sources can also be passed in a Python list. - .. versionchanged:: Nitrogen + .. versionchanged:: 2017.7.0 Globbing is now supported for this argument cwd : None @@ -1188,7 +1188,7 @@ def rar(rarfile, sources, template=None, cwd=None, runas=None): .. code-block:: bash salt '*' archive.rar /tmp/rarfile.rar /tmp/sourcefile1,/tmp/sourcefile2 - # Globbing for sources (Nitrogen and later) + # Globbing for sources (2017.7.0 and later) salt '*' archive.rar /tmp/rarfile.rar '/tmp/sourcefile*' ''' cmd = ['rar', 'a', '-idp', '{0}'.format(rarfile)] diff --git a/salt/modules/at.py b/salt/modules/at.py index e7c12bb68c..5a27e5b5ee 100644 --- a/salt/modules/at.py +++ b/salt/modules/at.py @@ -7,7 +7,7 @@ easily tag jobs. :platform: linux,openbsd,freebsd -.. versionchanged:: nitrogen +.. versionchanged:: 2017.7.0 ''' from __future__ import absolute_import diff --git a/salt/modules/at_solaris.py b/salt/modules/at_solaris.py index 15c6e88d1a..27cd878024 100644 --- a/salt/modules/at_solaris.py +++ b/salt/modules/at_solaris.py @@ -10,7 +10,7 @@ Wrapper for at(1) on Solaris-like systems :maturity: new :platform: solaris,illumos,smartso -.. versionadded:: nitrogen +.. versionadded:: 2017.7.0 ''' from __future__ import absolute_import diff --git a/salt/modules/boto3_elasticache.py b/salt/modules/boto3_elasticache.py index effeda7c81..a8cbd62f09 100644 --- a/salt/modules/boto3_elasticache.py +++ b/salt/modules/boto3_elasticache.py @@ -3,7 +3,7 @@ Execution module for Amazon Elasticache using boto3 =================================================== -.. versionadded:: Nitrogen +.. versionadded:: 2017.7.0 :configuration: This module accepts explicit elasticache credentials but can also utilize IAM roles assigned to the instance through Instance Profiles. diff --git a/salt/modules/boto3_route53.py b/salt/modules/boto3_route53.py index 6af2b44080..749655af76 100644 --- a/salt/modules/boto3_route53.py +++ b/salt/modules/boto3_route53.py @@ -2,7 +2,7 @@ ''' Execution module for Amazon Route53 written against Boto 3 -.. versionadded:: Nitrogen +.. versionadded:: 2017.7.0 :configuration: This module accepts explicit route53 credentials but can also utilize IAM roles assigned to the instance through Instance Profiles. diff --git a/salt/modules/boto_apigateway.py b/salt/modules/boto_apigateway.py index 46b10abb82..701a217ee2 100644 --- a/salt/modules/boto_apigateway.py +++ b/salt/modules/boto_apigateway.py @@ -1408,7 +1408,7 @@ def describe_usage_plans(name=None, plan_id=None, region=None, key=None, keyid=N ''' Returns a list of existing usage plans, optionally filtered to match a given plan name - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 CLI Example: @@ -1460,7 +1460,7 @@ def create_usage_plan(name, description=None, throttle=None, quota=None, region= ''' Creates a new usage plan with throttling and quotas optionally applied - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 name Name of the usage plan @@ -1518,7 +1518,7 @@ def update_usage_plan(plan_id, throttle=None, quota=None, region=None, key=None, ''' Updates an existing usage plan with throttling and quotas - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 plan_id Id of the created usage plan @@ -1592,7 +1592,7 @@ def delete_usage_plan(plan_id, region=None, key=None, keyid=None, profile=None): ''' Deletes usage plan identified by plan_id - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 CLI Example: @@ -1655,7 +1655,7 @@ def attach_usage_plan_to_apis(plan_id, apis, region=None, key=None, keyid=None, ''' Attaches given usage plan to each of the apis provided in a list of apiId and stage values - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 apis a list of dictionaries, where each dictionary contains the following: @@ -1680,7 +1680,7 @@ def detach_usage_plan_from_apis(plan_id, apis, region=None, key=None, keyid=None ''' Detaches given usage plan from each of the apis provided in a list of apiId and stage value - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 apis a list of dictionaries, where each dictionary contains the following: diff --git a/salt/modules/boto_ec2.py b/salt/modules/boto_ec2.py index d1f2a83360..975b740121 100644 --- a/salt/modules/boto_ec2.py +++ b/salt/modules/boto_ec2.py @@ -450,7 +450,7 @@ def assign_private_ip_addresses(network_interface_name=None, network_interface_i salt myminion boto_ec2.assign_private_ip_addresses network_interface_name=my_eni private_ip_addresses=private_ip salt myminion boto_ec2.assign_private_ip_addresses network_interface_name=my_eni secondary_private_ip_address_count=2 - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 ''' if not salt.utils.exactly_one((network_interface_name, network_interface_id)): @@ -504,7 +504,7 @@ def unassign_private_ip_addresses(network_interface_name=None, network_interface salt myminion boto_ec2.unassign_private_ip_addresses network_interface_name=my_eni private_ip_addresses=private_ip - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 ''' if not salt.utils.exactly_one((network_interface_name, network_interface_id)): diff --git a/salt/modules/boto_efs.py b/salt/modules/boto_efs.py index 1fb8ded16e..0bb20c31d2 100644 --- a/salt/modules/boto_efs.py +++ b/salt/modules/boto_efs.py @@ -2,7 +2,7 @@ ''' Connection module for Amazon EFS -.. versionadded:: Nitrogen +.. versionadded:: 2017.7.0 :configuration: This module accepts explicit EFS credentials but can also utilize IAM roles assigned to the instance through Instance Profiles or diff --git a/salt/modules/boto_kinesis.py b/salt/modules/boto_kinesis.py index cafda6cbb8..fa75140e2d 100644 --- a/salt/modules/boto_kinesis.py +++ b/salt/modules/boto_kinesis.py @@ -2,7 +2,7 @@ ''' Connection module for Amazon Kinesis -.. versionadded:: Nitrogen +.. versionadded:: 2017.7.0 :configuration: This module accepts explicit Kinesis credentials but can also utilize IAM roles assigned to the instance trough Instance Profiles. diff --git a/salt/modules/boto_lambda.py b/salt/modules/boto_lambda.py index 4c4e731541..5d1cf70a53 100644 --- a/salt/modules/boto_lambda.py +++ b/salt/modules/boto_lambda.py @@ -239,7 +239,7 @@ def create_function(FunctionName, Runtime, Role, Handler, ZipFile=None, } } - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 Returns {created: true} if the function was created and returns {created: False} if the function was not created. @@ -384,7 +384,7 @@ def update_function_config(FunctionName, Role=None, Handler=None, } } - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 Returns {updated: true} if the function was updated and returns {updated: False} if the function was not updated. diff --git a/salt/modules/boto_vpc.py b/salt/modules/boto_vpc.py index 84c8ba3d60..a7effb3c3a 100644 --- a/salt/modules/boto_vpc.py +++ b/salt/modules/boto_vpc.py @@ -4,6 +4,11 @@ Connection module for Amazon VPC .. versionadded:: 2014.7.0 +:depends: + +- boto >= 2.8.0 +- boto3 >= 1.2.6 + :configuration: This module accepts explicit VPC credentials but can also utilize IAM roles assigned to the instance through Instance Profiles. Dynamic credentials are then automatically obtained from AWS API and no @@ -69,8 +74,6 @@ Connection module for Amazon VPC error: message: error message -:depends: boto - .. versionadded:: 2016.11.0 Functions to request, accept, delete and describe VPC peering connections. diff --git a/salt/modules/bower.py b/salt/modules/bower.py index 543cc86f34..1b88d80446 100644 --- a/salt/modules/bower.py +++ b/salt/modules/bower.py @@ -219,7 +219,7 @@ def list_(dir, runas=None, env=None): def prune(dir, runas=None, env=None): ''' - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 Remove extraneous local Bower packages, i.e. those not referenced in bower.json diff --git a/salt/modules/capirca_acl.py b/salt/modules/capirca_acl.py index d354da4f39..f925f71df8 100644 --- a/salt/modules/capirca_acl.py +++ b/salt/modules/capirca_acl.py @@ -5,7 +5,7 @@ Capirca ACL Generate ACL (firewall) configuration for network devices. -.. versionadded:: Nitrogen +.. versionadded:: 2017.7.0 :codeauthor: Mircea Ulinic & Robert Ankeny :maturity: new @@ -108,6 +108,7 @@ _TERM_FIELDS = { 'fragment_offset': None, 'hop_limit': None, 'icmp_type': [], + 'icmp_code': None, 'ether_type': [], 'traffic_class_count': None, 'traffic_type': [], diff --git a/salt/modules/chocolatey.py b/salt/modules/chocolatey.py index bf9305a5c7..87895af323 100644 --- a/salt/modules/chocolatey.py +++ b/salt/modules/chocolatey.py @@ -257,7 +257,7 @@ def list_(narrow=None, Display only packages that match ``narrow`` exactly. Default is False. - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 Returns: dict: A dictionary of results. @@ -422,7 +422,7 @@ def install(name, Allow multiple versions of the package to be installed. Do not use with ``force``. Does not work with all packages. Default is False. - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 no_progress Do not show download progress percentages. Defaults to False. diff --git a/salt/modules/dockermod.py b/salt/modules/dockermod.py index 53684e9e0f..88f82757eb 100644 --- a/salt/modules/dockermod.py +++ b/salt/modules/dockermod.py @@ -3,7 +3,7 @@ Management of Docker Containers .. versionadded:: 2015.8.0 -.. versionchanged:: Nitrogen +.. versionchanged:: 2017.7.0 This module has replaced the legacy docker execution module. :depends: docker_ Python module @@ -56,7 +56,7 @@ For example: password: s3cr3t .. note:: - As of the 2016.3.7, 2016.11.4, and Nitrogen releases of Salt, credentials + As of the 2016.3.7, 2016.11.4, and 2017.7.0 releases of Salt, credentials for the Docker Hub can be configured simply by specifying ``hub`` in place of the registry URL. In earlier releases, it is necessary to specify the actual registry URL for the Docker Hub (i.e. @@ -119,7 +119,7 @@ Executing Commands Within a Running Container .. note:: With the release of Docker 1.13.1, the Execution Driver has been removed. - Starting in versions 2016.3.6, 2016.11.4, and Nitrogen, Salt defaults to + Starting in versions 2016.3.6, 2016.11.4, and 2017.7.0, Salt defaults to using ``docker exec`` to run commands in containers, however for older Salt releases it will be necessary to set the ``docker.exec_driver`` config option to either ``docker-exec`` or ``nsenter`` for Docker versions 1.13.1 @@ -767,8 +767,8 @@ def _error_detail(data, item): # Functions to handle docker-py client args def get_client_args(): ''' - .. versionadded:: 2016.3.6,2016.11.4,Nitrogen - .. versionchanged:: Nitrogen + .. versionadded:: 2016.3.6,2016.11.4,2017.7.0 + .. versionchanged:: 2017.7.0 Replaced the container config args with the ones from the API's ``create_container`` function. @@ -852,7 +852,7 @@ def _get_create_kwargs(image, def compare_container(first, second, ignore=None): ''' - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 Compare two containers' Config and and HostConfig and return any differences between the two. @@ -902,7 +902,7 @@ def compare_container(first, second, ignore=None): def login(*registries): ''' - .. versionadded:: 2016.3.7,2016.11.4,Nitrogen + .. versionadded:: 2016.3.7,2016.11.4,2017.7.0 Performs a ``docker login`` to authenticate to one or more configured repositories. See the documentation at the top of this page to configure @@ -1283,7 +1283,7 @@ def info(): def inspect(name): ''' - .. versionchanged:: Nitrogen + .. versionchanged:: 2017.7.0 Volumes and networks are now checked, in addition to containers and images. @@ -2890,7 +2890,7 @@ def rm_(name, force=False, volumes=False, **kwargs): option is set to ``False`` by default to prevent accidental removal of a running container. - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 volumes : False Also remove volumes associated with container @@ -2928,7 +2928,7 @@ def rm_(name, force=False, volumes=False, **kwargs): def rename(name, new_name): ''' - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 Renames a container. Returns ``True`` if successful, and raises an error if the API returns one. If unsuccessful and the API returns no error (should @@ -3927,7 +3927,7 @@ def tag_(name, image, force=False): # Network Management def networks(names=None, ids=None): ''' - .. versionchanged:: Nitrogen + .. versionchanged:: 2017.7.0 The ``names`` and ``ids`` can be passed as a comma-separated list now, as well as a Python list. @@ -4045,7 +4045,7 @@ def connect_container_to_network(container, network_id, ipv4_address=None): ipv4_address The IPv4 address to connect to the container - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 CLI Example: @@ -4362,7 +4362,7 @@ def stop(name, timeout=None, **kwargs): Timeout in seconds after which the container will be killed (if it has not yet gracefully shut down) - .. versionchanged:: Nitrogen + .. versionchanged:: 2017.7.0 If this argument is not passed, then the container's configuration will be checked. If the container was created using the ``stop_timeout`` argument, then the configured timeout will be diff --git a/salt/modules/elasticsearch.py b/salt/modules/elasticsearch.py index 3101eb24c6..df9eeb9a19 100644 --- a/salt/modules/elasticsearch.py +++ b/salt/modules/elasticsearch.py @@ -152,7 +152,7 @@ def _get_instance(hosts=None, profile=None): def ping(allow_failure=False, hosts=None, profile=None): ''' - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 Test connection to Elasticsearch instance. This method does not fail if not explicitly specified. @@ -175,7 +175,7 @@ def ping(allow_failure=False, hosts=None, profile=None): def info(hosts=None, profile=None): ''' - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 Return Elasticsearch information. @@ -194,7 +194,7 @@ def info(hosts=None, profile=None): def node_info(nodes=None, flat_settings=False, hosts=None, profile=None): ''' - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 Return Elasticsearch node information. @@ -217,7 +217,7 @@ def node_info(nodes=None, flat_settings=False, hosts=None, profile=None): def cluster_health(index=None, level='cluster', local=False, hosts=None, profile=None): ''' - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 Return Elasticsearch cluster health. @@ -242,7 +242,7 @@ def cluster_health(index=None, level='cluster', local=False, hosts=None, profile def cluster_stats(nodes=None, hosts=None, profile=None): ''' - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 Return Elasticsearch cluster stats. @@ -548,7 +548,7 @@ def index_get(index, hosts=None, profile=None): def index_open(index, allow_no_indices=True, expand_wildcards='closed', ignore_unavailable=True, hosts=None, profile=None): ''' - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 Open specified index. @@ -577,7 +577,7 @@ def index_open(index, allow_no_indices=True, expand_wildcards='closed', ignore_u def index_close(index, allow_no_indices=True, expand_wildcards='open', ignore_unavailable=True, hosts=None, profile=None): ''' - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 Close specified index. @@ -762,7 +762,7 @@ def index_template_get(name, hosts=None, profile=None): def pipeline_get(id, hosts=None, profile=None): ''' - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 Retrieve Ingest pipeline definition. Available since Elasticsearch 5.0. @@ -787,7 +787,7 @@ def pipeline_get(id, hosts=None, profile=None): def pipeline_delete(id, hosts=None, profile=None): ''' - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 Delete Ingest pipeline. Available since Elasticsearch 5.0. @@ -813,7 +813,7 @@ def pipeline_delete(id, hosts=None, profile=None): def pipeline_create(id, body, hosts=None, profile=None): ''' - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 Create Ingest pipeline by supplied definition. Available since Elasticsearch 5.0. @@ -838,7 +838,7 @@ def pipeline_create(id, body, hosts=None, profile=None): def pipeline_simulate(id, body, verbose=False, hosts=None, profile=None): ''' - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 Simulate existing Ingest pipeline on provided data. Available since Elasticsearch 5.0. @@ -864,7 +864,7 @@ def pipeline_simulate(id, body, verbose=False, hosts=None, profile=None): def search_template_get(id, hosts=None, profile=None): ''' - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 Obtain existing search template definition. @@ -887,7 +887,7 @@ def search_template_get(id, hosts=None, profile=None): def search_template_create(id, body, hosts=None, profile=None): ''' - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 Create search template by supplied definition @@ -912,7 +912,7 @@ def search_template_create(id, body, hosts=None, profile=None): def search_template_delete(id, hosts=None, profile=None): ''' - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 Delete existing search template definition. @@ -937,7 +937,7 @@ def search_template_delete(id, hosts=None, profile=None): def repository_get(name, local=False, hosts=None, profile=None): ''' - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 Get existing repository details. @@ -962,7 +962,7 @@ def repository_get(name, local=False, hosts=None, profile=None): def repository_create(name, body, hosts=None, profile=None): ''' - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 Create repository for storing snapshots. Note that shared repository paths have to be specified in path.repo Elasticsearch configuration option. @@ -987,7 +987,7 @@ def repository_create(name, body, hosts=None, profile=None): def repository_delete(name, hosts=None, profile=None): ''' - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 Delete existing repository. @@ -1012,7 +1012,7 @@ def repository_delete(name, hosts=None, profile=None): def repository_verify(name, hosts=None, profile=None): ''' - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 Obtain list of cluster nodes which successfully verified this repository. @@ -1035,7 +1035,7 @@ def repository_verify(name, hosts=None, profile=None): def snapshot_status(repository=None, snapshot=None, ignore_unavailable=False, hosts=None, profile=None): ''' - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 Obtain status of all currently running snapshots. @@ -1060,7 +1060,7 @@ def snapshot_status(repository=None, snapshot=None, ignore_unavailable=False, ho def snapshot_get(repository, snapshot, ignore_unavailable=False, hosts=None, profile=None): ''' - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 Obtain snapshot residing in specified repository. @@ -1085,7 +1085,7 @@ def snapshot_get(repository, snapshot, ignore_unavailable=False, hosts=None, pro def snapshot_create(repository, snapshot, body=None, hosts=None, profile=None): ''' - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 Create snapshot in specified repository by supplied definition. @@ -1112,7 +1112,7 @@ def snapshot_create(repository, snapshot, body=None, hosts=None, profile=None): def snapshot_restore(repository, snapshot, body=None, hosts=None, profile=None): ''' - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 Restore existing snapshot in specified repository by supplied definition. @@ -1139,7 +1139,7 @@ def snapshot_restore(repository, snapshot, body=None, hosts=None, profile=None): def snapshot_delete(repository, snapshot, hosts=None, profile=None): ''' - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 Delete snapshot from specified repository. diff --git a/salt/modules/file.py b/salt/modules/file.py index 491b2db4e8..317e6af889 100644 --- a/salt/modules/file.py +++ b/salt/modules/file.py @@ -3367,7 +3367,7 @@ def access(path, mode): def read(path, binary=False): ''' - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 Return the content of the file. @@ -4880,14 +4880,14 @@ def manage_file(name, See https://docs.python.org/3/library/codecs.html#standard-encodings for the list of available encodings. - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 encoding_errors : 'strict' Default is ```'strict'```. See https://docs.python.org/2/library/codecs.html#codec-base-classes for the error handling schemes. - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 CLI Example: diff --git a/salt/modules/freebsd_update.py b/salt/modules/freebsd_update.py index abbd40144f..e59d43a288 100644 --- a/salt/modules/freebsd_update.py +++ b/salt/modules/freebsd_update.py @@ -2,7 +2,7 @@ ''' Support for freebsd-update utility on FreeBSD. -.. versionadded:: Nitrogen +.. versionadded:: 2017.7.0 :maintainer: George Mamalakis :maturity: new diff --git a/salt/modules/git.py b/salt/modules/git.py index 96e81f1606..38d86d4f1c 100644 --- a/salt/modules/git.py +++ b/salt/modules/git.py @@ -399,7 +399,7 @@ def add(cwd, subcommand), in a single string. This is useful for passing ``-c`` to run git with temporary changes to the git configuration. - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 .. note:: This is only supported in git 1.7.2 and newer. @@ -524,7 +524,7 @@ def archive(cwd, ``archive`` subcommand), in a single string. This is useful for passing ``-c`` to run git with temporary changes to the git configuration. - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 .. note:: This is only supported in git 1.7.2 and newer. @@ -629,7 +629,7 @@ def branch(cwd, subcommand), in a single string. This is useful for passing ``-c`` to run git with temporary changes to the git configuration. - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 .. note:: This is only supported in git 1.7.2 and newer. @@ -708,7 +708,7 @@ def checkout(cwd, passing ``-c`` to run git with temporary changes to the git configuration. - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 .. note:: This is only supported in git 1.7.2 and newer. @@ -822,7 +822,7 @@ def clone(cwd, subcommand), in a single string. This is useful for passing ``-c`` to run git with temporary changes to the git configuration. - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 .. note:: This is only supported in git 1.7.2 and newer. @@ -966,7 +966,7 @@ def commit(cwd, subcommand), in a single string. This is useful for passing ``-c`` to run git with temporary changes to the git configuration. - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 .. note:: This is only supported in git 1.7.2 and newer. @@ -1596,7 +1596,7 @@ def diff(cwd, subcommand), in a single string. This is useful for passing ``-c`` to run git with temporary changes to the git configuration. - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 .. note:: This is only supported in git 1.7.2 and newer. @@ -1767,7 +1767,7 @@ def fetch(cwd, subcommand), in a single string. This is useful for passing ``-c`` to run git with temporary changes to the git configuration. - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 .. note:: This is only supported in git 1.7.2 and newer. @@ -1937,7 +1937,7 @@ def init(cwd, subcommand), in a single string. This is useful for passing ``-c`` to run git with temporary changes to the git configuration. - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 .. note:: This is only supported in git 1.7.2 and newer. @@ -2506,7 +2506,7 @@ def ls_remote(cwd=None, passing ``-c`` to run git with temporary changes to the git configuration. - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 .. note:: This is only supported in git 1.7.2 and newer. @@ -2644,7 +2644,7 @@ def merge(cwd, subcommand), in a single string. This is useful for passing ``-c`` to run git with temporary changes to the git configuration. - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 .. note:: This is only supported in git 1.7.2 and newer. @@ -2776,7 +2776,7 @@ def merge_base(cwd, passing ``-c`` to run git with temporary changes to the git configuration. - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 .. note:: This is only supported in git 1.7.2 and newer. @@ -3002,7 +3002,7 @@ def pull(cwd, subcommand), in a single string. This is useful for passing ``-c`` to run git with temporary changes to the git configuration. - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 .. note:: This is only supported in git 1.7.2 and newer. @@ -3114,7 +3114,7 @@ def push(cwd, subcommand), in a single string. This is useful for passing ``-c`` to run git with temporary changes to the git configuration. - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 .. note:: This is only supported in git 1.7.2 and newer. @@ -3228,7 +3228,7 @@ def rebase(cwd, subcommand), in a single string. This is useful for passing ``-c`` to run git with temporary changes to the git configuration. - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 .. note:: This is only supported in git 1.7.2 and newer. @@ -3677,7 +3677,7 @@ def reset(cwd, subcommand), in a single string. This is useful for passing ``-c`` to run git with temporary changes to the git configuration. - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 .. note:: This is only supported in git 1.7.2 and newer. @@ -3752,7 +3752,7 @@ def rev_parse(cwd, passing ``-c`` to run git with temporary changes to the git configuration. - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 .. note:: This is only supported in git 1.7.2 and newer. @@ -3893,7 +3893,7 @@ def rm_(cwd, subcommand), in a single string. This is useful for passing ``-c`` to run git with temporary changes to the git configuration. - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 .. note:: This is only supported in git 1.7.2 and newer. @@ -3962,7 +3962,7 @@ def stash(cwd, subcommand), in a single string. This is useful for passing ``-c`` to run git with temporary changes to the git configuration. - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 .. note:: This is only supported in git 1.7.2 and newer. @@ -4113,7 +4113,7 @@ def submodule(cwd, passing ``-c`` to run git with temporary changes to the git configuration. - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 .. note:: This is only supported in git 1.7.2 and newer. @@ -4251,7 +4251,7 @@ def symbolic_ref(cwd, passing ``-c`` to run git with temporary changes to the git configuration. - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 .. note:: This is only supported in git 1.7.2 and newer. @@ -4422,7 +4422,7 @@ def worktree_add(cwd, passing ``-c`` to run git with temporary changes to the git configuration. - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 .. note:: This is only supported in git 1.7.2 and newer. @@ -4547,7 +4547,7 @@ def worktree_prune(cwd, passing ``-c`` to run git with temporary changes to the git configuration. - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 .. note:: This is only supported in git 1.7.2 and newer. diff --git a/salt/modules/github.py b/salt/modules/github.py index af17c627e6..b8ea1fcb77 100644 --- a/salt/modules/github.py +++ b/salt/modules/github.py @@ -804,7 +804,7 @@ def get_repo_teams(repo_name, profile='github'): ''' Return teams belonging to a repository. - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 repo_name The name of the repository from which to retrieve teams. @@ -1385,7 +1385,7 @@ def add_team_repo(repo_name, team_name, profile="github", permission=None): 'push' or 'admin'. If not specified, the default permission specified on the team will be used. - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 CLI Example: @@ -1727,7 +1727,7 @@ def get_prs(repo_name=None, Returns information for all pull requests in a given repository, based on the search options provided. - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 repo_name The name of the repository for which to list pull requests. This diff --git a/salt/modules/grafana4.py b/salt/modules/grafana4.py index f2b49385d4..ee07550dc5 100644 --- a/salt/modules/grafana4.py +++ b/salt/modules/grafana4.py @@ -2,7 +2,7 @@ ''' Module for working with the Grafana v4 API -.. versionadded:: Nitrogen +.. versionadded:: 2017.7.0 :depends: requests diff --git a/salt/modules/grains.py b/salt/modules/grains.py index f2d7046758..cf719f9492 100644 --- a/salt/modules/grains.py +++ b/salt/modules/grains.py @@ -415,7 +415,7 @@ def remove(key, val, delimiter=DEFAULT_TARGET_DELIM): def delkey(key): ''' - .. versionadded:: nitrogen + .. versionadded:: 2017.7.0 Remove a grain completely from the grain system, this will remove the grain key and value @@ -765,7 +765,7 @@ def equals(key, value): Returns ``True`` if matches otherwise ``False``. - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 CLI Example: diff --git a/salt/modules/hashutil.py b/salt/modules/hashutil.py index 4db6bfe60f..0c9b7effe3 100644 --- a/salt/modules/hashutil.py +++ b/salt/modules/hashutil.py @@ -266,7 +266,7 @@ def github_signature(string, shared_secret, challenge_hmac): Verify a challenging hmac signature against a string / shared-secret for github webhooks. - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 Returns a boolean if the verification succeeded or failed. diff --git a/salt/modules/heat.py b/salt/modules/heat.py index 88c9872f19..1f94f2e605 100644 --- a/salt/modules/heat.py +++ b/salt/modules/heat.py @@ -2,7 +2,7 @@ ''' Module for handling OpenStack Heat calls -.. versionadded:: Nitrogen +.. versionadded:: 2017.7.0 :depends: - heatclient Python module :configuration: This module is not usable until the user, password, tenant, and diff --git a/salt/modules/icinga2.py b/salt/modules/icinga2.py index 9164af9bca..81f442dfc5 100644 --- a/salt/modules/icinga2.py +++ b/salt/modules/icinga2.py @@ -2,7 +2,7 @@ ''' Module to provide icinga2 compatibility to salt. -.. versionadded:: Nitrogen +.. versionadded:: 2017.7.0 :depends: - icinga2 server ''' diff --git a/salt/modules/logmod.py b/salt/modules/logmod.py index a4228ab9aa..aa6fcbf165 100644 --- a/salt/modules/logmod.py +++ b/salt/modules/logmod.py @@ -3,7 +3,7 @@ On-demand logging ================= -.. versionadded:: Nitrogen +.. versionadded:: 2017.7.0 The sole purpose of this module is logging messages in the (proxy) minion. It comes very handy when debugging complex Jinja templates, for example: diff --git a/salt/modules/match.py b/salt/modules/match.py index 312eaac421..20b50df14b 100644 --- a/salt/modules/match.py +++ b/salt/modules/match.py @@ -365,7 +365,7 @@ def search_by(lookup, tgt_type='compound', minion_id=None): ` and allows matching values instead of matching keys. A minion can be matched by multiple entries. - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 CLI Example: diff --git a/salt/modules/mattermost.py b/salt/modules/mattermost.py index e85588694b..58c77727cc 100644 --- a/salt/modules/mattermost.py +++ b/salt/modules/mattermost.py @@ -2,7 +2,7 @@ ''' Module for sending messages to Mattermost -.. versionadded:: Nitrogen +.. versionadded:: 2017.7.0 :configuration: This module can be used by either passing an api_url and hook directly or by specifying both in a configuration profile in the salt diff --git a/salt/modules/msteams.py b/salt/modules/msteams.py index 518790c04d..565082c291 100644 --- a/salt/modules/msteams.py +++ b/salt/modules/msteams.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- ''' Module for sending messages to MS Teams -.. versionadded:: Nitrogen +.. versionadded:: 2017.7.0 :configuration: This module can be used by either passing a hook_url directly or by specifying it in a configuration profile in the salt master/minion config. diff --git a/salt/modules/mysql.py b/salt/modules/mysql.py index f8536c011c..e97525ad08 100644 --- a/salt/modules/mysql.py +++ b/salt/modules/mysql.py @@ -685,7 +685,7 @@ def file_query(database, file_name, **connection_args): Run an arbitrary SQL query from the specified file and return the the number of affected rows. - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 CLI Example: diff --git a/salt/modules/namecheap_dns.py b/salt/modules/namecheap_dns.py index 594c37f7ab..472980352b 100644 --- a/salt/modules/namecheap_dns.py +++ b/salt/modules/namecheap_dns.py @@ -2,7 +2,7 @@ ''' Namecheap management -.. versionadded:: Nitrogen +.. versionadded:: 2017.7.0 General Notes ------------- diff --git a/salt/modules/namecheap_domains.py b/salt/modules/namecheap_domains.py index a96da4e46a..4f89ccdba0 100644 --- a/salt/modules/namecheap_domains.py +++ b/salt/modules/namecheap_domains.py @@ -2,7 +2,7 @@ ''' Namecheap management - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 General Notes ------------- diff --git a/salt/modules/namecheap_ns.py b/salt/modules/namecheap_ns.py index fdfb683f08..22214090b1 100644 --- a/salt/modules/namecheap_ns.py +++ b/salt/modules/namecheap_ns.py @@ -2,7 +2,7 @@ ''' Namecheap management -.. versionadded:: Nitrogen +.. versionadded:: 2017.7.0 General Notes ------------- diff --git a/salt/modules/namecheap_ssl.py b/salt/modules/namecheap_ssl.py index a8cad708e0..66bee981aa 100644 --- a/salt/modules/namecheap_ssl.py +++ b/salt/modules/namecheap_ssl.py @@ -2,7 +2,7 @@ ''' Namecheap management - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 General Notes ------------- diff --git a/salt/modules/namecheap_users.py b/salt/modules/namecheap_users.py index 9cd441bdb3..877712336d 100644 --- a/salt/modules/namecheap_users.py +++ b/salt/modules/namecheap_users.py @@ -2,7 +2,7 @@ ''' Namecheap management - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 General Notes ------------- diff --git a/salt/modules/napalm.py b/salt/modules/napalm.py index a045976fac..14a25d7319 100644 --- a/salt/modules/napalm.py +++ b/salt/modules/napalm.py @@ -5,7 +5,7 @@ NAPALM helpers Helpers for the NAPALM modules. -.. versionadded:: Nitrogen +.. versionadded:: 2017.7.0 ''' from __future__ import absolute_import diff --git a/salt/modules/napalm_acl.py b/salt/modules/napalm_acl.py index 3bc9ebde5e..9b0b60a8ed 100644 --- a/salt/modules/napalm_acl.py +++ b/salt/modules/napalm_acl.py @@ -5,7 +5,7 @@ NAPALM ACL Generate and load ACL (firewall) configuration on network devices. -.. versionadded:: Nitrogen +.. versionadded:: 2017.7.0 :codeauthor: Mircea Ulinic :maturity: new diff --git a/salt/modules/napalm_network.py b/salt/modules/napalm_network.py index 8da4415b24..5042eee025 100644 --- a/salt/modules/napalm_network.py +++ b/salt/modules/napalm_network.py @@ -16,7 +16,7 @@ Dependencies - :mod:`napalm proxy minion ` .. versionadded:: 2016.11.0 -.. versionchanged:: Nitrogen +.. versionchanged:: 2017.7.0 ''' from __future__ import absolute_import @@ -817,7 +817,7 @@ def mac(address='', interface='', vlan=0, **kwargs): # pylint: disable=unused-a @proxy_napalm_wrap def config(source=None, **kwargs): # pylint: disable=unused-argument ''' - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 Return the whole configuration of the network device. By default, it will return all possible configuration @@ -870,7 +870,7 @@ def config(source=None, **kwargs): # pylint: disable=unused-argument @proxy_napalm_wrap def optics(**kwargs): # pylint: disable=unused-argument ''' - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 Fetches the power usage on the various transceivers installed on the network device (in dBm), and returns a view that conforms with the diff --git a/salt/modules/napalm_route.py b/salt/modules/napalm_route.py index 40b54486e6..1a81d53e9d 100644 --- a/salt/modules/napalm_route.py +++ b/salt/modules/napalm_route.py @@ -76,7 +76,7 @@ def show(destination, protocol=None, **kwargs): # pylint: disable=unused-argume protocol (optional) protocol used to learn the routes to the destination. - .. versionchanged:: Nitrogen + .. versionchanged:: 2017.7.0 CLI Example: diff --git a/salt/modules/napalm_yang_mod.py b/salt/modules/napalm_yang_mod.py index ee137a767f..f4dd9f6358 100644 --- a/salt/modules/napalm_yang_mod.py +++ b/salt/modules/napalm_yang_mod.py @@ -5,7 +5,7 @@ NAPALM YANG NAPALM YANG basic operations. -.. versionadded:: Nitrogen +.. versionadded:: 2017.7.0 ''' from __future__ import absolute_import diff --git a/salt/modules/nix.py b/salt/modules/nix.py index ce3da34b3d..862bd9f3c0 100644 --- a/salt/modules/nix.py +++ b/salt/modules/nix.py @@ -3,7 +3,7 @@ Work with Nix packages ====================== -.. versionadded:: Nitrogen +.. versionadded:: 2017.7.0 Does not require the machine to be Nixos, just have Nix installed and available to use for the user running this command. Their profile must be located in their home, under ``$HOME/.nix-profile/``, and the nix store, unless specially set up, should be in ``/nix``. To easily use this diff --git a/salt/modules/npm.py b/salt/modules/npm.py index 41b266903e..969aa2ae90 100644 --- a/salt/modules/npm.py +++ b/salt/modules/npm.py @@ -281,7 +281,7 @@ def list_(pkg=None, dir=None, runas=None, env=None, depth=None): depth Limit the depth of the packages listed - .. versionadded:: 2016.11.6, Nitrogen + .. versionadded:: 2016.11.6, 2017.7.0 CLI Example: diff --git a/salt/modules/opkg.py b/salt/modules/opkg.py index 222cb5e4e4..03f847e38b 100644 --- a/salt/modules/opkg.py +++ b/salt/modules/opkg.py @@ -226,7 +226,7 @@ def install(name=None, Install a specific version of the package, e.g. 1.2.3~0ubuntu0. Ignored if "pkgs" or "sources" is passed. - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 reinstall : False Specifying reinstall=True will use ``opkg install --force-reinstall`` @@ -237,7 +237,7 @@ def install(name=None, install --force-reinstall`` will only be used if the installed version matches the requested version. - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 Multiple Package Installation Options: @@ -272,7 +272,7 @@ def install(name=None, Only upgrade the packages (disallow downgrades), if they are already installed. Default is False. - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 Returns a dict containing the new package names and versions:: @@ -900,7 +900,7 @@ def info_installed(*names, **kwargs): ''' Return the information of the named package(s), installed on the system. - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 :param names: Names of the packages to get information about. If none are specified, diff --git a/salt/modules/pdbedit.py b/salt/modules/pdbedit.py index 34b8d87fc3..d8cb4a75a6 100644 --- a/salt/modules/pdbedit.py +++ b/salt/modules/pdbedit.py @@ -6,7 +6,7 @@ Manage accounts in Samba's passdb using pdbedit :maturity: new :platform: posix -.. versionadded:: nitrogen +.. versionadded:: 2017.7.0 ''' from __future__ import absolute_import diff --git a/salt/modules/pillar.py b/salt/modules/pillar.py index 01819c469e..e9351aed2a 100644 --- a/salt/modules/pillar.py +++ b/salt/modules/pillar.py @@ -30,6 +30,7 @@ log = logging.getLogger(__name__) def get(key, default=KeyError, merge=False, + merge_nested_lists=None, delimiter=DEFAULT_TARGET_DELIM, pillarenv=None, saltenv=None): @@ -54,17 +55,29 @@ def get(key, pkg:apache - merge : False + merge : ``False`` If ``True``, the retrieved values will be merged into the passed default. When the default and the retrieved value are both dictionaries, the dictionaries will be recursively merged. .. versionadded:: 2014.7.0 - .. versionchanged:: 2016.3.7,2016.11.4,Nitrogen + .. versionchanged:: 2016.3.7,2016.11.4,2017.7.0 If the default and the retrieved value are not of the same type, then merging will be skipped and the retrieved value will be returned. Earlier releases raised an error in these cases. + merge_nested_lists + If set to ``False``, lists nested within the retrieved pillar + dictionary will *overwrite* lists in ``default``. If set to ``True``, + nested lists will be *merged* into lists in ``default``. If unspecified + (the default), this option is inherited from the + :conf_minion:`pillar_merge_lists` minion config option. + + .. note:: + This option is ignored when ``merge`` is set to ``False``. + + .. versionadded:: 2016.11.6 + delimiter Specify an alternate delimiter to use when traversing a nested dict. This is useful for when the desired key contains a colon. See CLI @@ -86,13 +99,13 @@ def get(key, data. This tradeoff in performance however allows for the use case where pillar data is desired only from a single environment. - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 saltenv Included only for compatibility with :conf_minion:`pillarenv_from_saltenv`, and is otherwise ignored. - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 CLI Example: @@ -104,7 +117,8 @@ def get(key, if not __opts__.get('pillar_raise_on_missing'): if default is KeyError: default = '' - opt_merge_lists = __opts__.get('pillar_merge_lists', False) + opt_merge_lists = __opts__.get('pillar_merge_lists', False) if \ + merge_nested_lists is None else merge_nested_lists pillar_dict = __pillar__ \ if all(x is None for x in (saltenv, pillarenv)) \ else items(saltenv=saltenv, pillarenv=pillarenv) @@ -191,7 +205,7 @@ def items(*args, **kwargs): will be necessary if the encrypted pillar data must be made available in an decrypted state pillar/ext_pillar rendering. - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 pillarenv Pass a specific pillar environment from which to compile pillar data. @@ -393,7 +407,7 @@ def raw(key=None): def ext(external, pillar=None): ''' - .. versionchanged:: 2016.3.6,2016.11.3,Nitrogen + .. versionchanged:: 2016.3.6,2016.11.3,2017.7.0 The supported ext_pillar types are now tunable using the :conf_master:`on_demand_ext_pillar` config option. Earlier releases used a hard-coded default. @@ -546,7 +560,7 @@ def filter_by(lookup_dict, default='default', base=None): ''' - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 Look up the given pillar in a given dictionary and return the result diff --git a/salt/modules/publish.py b/salt/modules/publish.py index d50df3b584..cd43ead5f5 100644 --- a/salt/modules/publish.py +++ b/salt/modules/publish.py @@ -205,7 +205,7 @@ def publish(tgt, - range - compound - .. versionchanged:: Nitrogen + .. versionchanged:: 2017.7.0 The ``expr_form`` argument has been renamed to ``tgt_type``, earlier releases must use ``expr_form``. diff --git a/salt/modules/raet_publish.py b/salt/modules/raet_publish.py index 00adec6c54..99aa062926 100644 --- a/salt/modules/raet_publish.py +++ b/salt/modules/raet_publish.py @@ -131,7 +131,7 @@ def publish(tgt, - range - compound - .. versionchanged:: Nitrogen + .. versionchanged:: 2017.7.0 The ``expr_form`` argument has been renamed to ``tgt_type``, earlier releases must use ``expr_form``. diff --git a/salt/modules/redismod.py b/salt/modules/redismod.py index 644e094c37..ee15a45a03 100644 --- a/salt/modules/redismod.py +++ b/salt/modules/redismod.py @@ -248,7 +248,7 @@ def hdel(key, *fields, **options): ''' Delete one of more hash fields. - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 CLI Example: @@ -268,7 +268,7 @@ def hexists(key, field, host=None, port=None, db=None, password=None): ''' Determine if a hash fields exists. - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 CLI Example: @@ -312,7 +312,7 @@ def hincrby(key, field, increment=1, host=None, port=None, db=None, password=Non ''' Increment the integer value of a hash field by the given number. - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 CLI Example: @@ -328,7 +328,7 @@ def hincrbyfloat(key, field, increment=1.0, host=None, port=None, db=None, passw ''' Increment the float value of a hash field by the given number. - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 CLI Example: @@ -344,7 +344,7 @@ def hlen(key, host=None, port=None, db=None, password=None): ''' Returns number of fields of a hash. - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 CLI Example: @@ -360,7 +360,7 @@ def hmget(key, *fields, **options): ''' Returns the values of all the given hash fields. - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 CLI Example: @@ -380,7 +380,7 @@ def hmset(key, **fieldsvals): ''' Sets multiple hash fields to multiple values. - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 CLI Example: @@ -400,7 +400,7 @@ def hset(key, field, value, host=None, port=None, db=None, password=None): ''' Set the value of a hash field. - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 CLI Example: @@ -416,7 +416,7 @@ def hsetnx(key, field, value, host=None, port=None, db=None, password=None): ''' Set the value of a hash field only if the field does not exist. - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 CLI Example: @@ -432,7 +432,7 @@ def hvals(key, host=None, port=None, db=None, password=None): ''' Return all the values in a hash. - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 CLI Example: @@ -448,7 +448,7 @@ def hscan(key, cursor=0, match=None, count=None, host=None, port=None, db=None, ''' Incrementally iterate hash fields and associated values. - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 CLI Example: diff --git a/salt/modules/rpmbuild.py b/salt/modules/rpmbuild.py index b40508649d..7b7ab71bc7 100644 --- a/salt/modules/rpmbuild.py +++ b/salt/modules/rpmbuild.py @@ -176,7 +176,7 @@ def make_src_pkg(dest_dir, spec, sources, env=None, template=None, saltenv='base This example command should build the libnacl SOURCE package and place it in /var/www/html/ on the minion - .. versionchanged:: Nitrogen + .. versionchanged:: 2017.7.0 .. note:: diff --git a/salt/modules/saltutil.py b/salt/modules/saltutil.py index fd3182a2da..bb8136c20e 100644 --- a/salt/modules/saltutil.py +++ b/salt/modules/saltutil.py @@ -339,7 +339,7 @@ def sync_states(saltenv=None, refresh=True, extmod_whitelist=None, extmod_blackl def refresh_grains(**kwargs): ''' - .. versionadded:: 2016.3.6,2016.11.4,Nitrogen + .. versionadded:: 2016.3.6,2016.11.4,2017.7.0 Refresh the minion's grains without syncing custom grains modules from ``salt://_grains``. @@ -583,7 +583,7 @@ sync_outputters = salt.utils.alias_function(sync_output, 'sync_outputters') def sync_clouds(saltenv=None, refresh=True, extmod_whitelist=None, extmod_blacklist=None): ''' - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 Sync utility modules from ``salt://_cloud`` to the minion @@ -653,7 +653,7 @@ def sync_utils(saltenv=None, refresh=True, extmod_whitelist=None, extmod_blackli def list_extmods(): ''' - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 List Salt modules which have been synced externally @@ -1287,7 +1287,7 @@ def cmd(tgt, ssh=False, **kwargs): ''' - .. versionchanged:: Nitrogen + .. versionchanged:: 2017.7.0 The ``expr_form`` argument has been renamed to ``tgt_type``, earlier releases must use ``expr_form``. @@ -1337,7 +1337,7 @@ def cmd_iter(tgt, ssh=False, **kwargs): ''' - .. versionchanged:: Nitrogen + .. versionchanged:: 2017.7.0 The ``expr_form`` argument has been renamed to ``tgt_type``, earlier releases must use ``expr_form``. diff --git a/salt/modules/solarisips.py b/salt/modules/solarisips.py index 64da0a61b3..b3f48a61cd 100644 --- a/salt/modules/solarisips.py +++ b/salt/modules/solarisips.py @@ -167,10 +167,10 @@ def list_upgrades(refresh=True, **kwargs): # pylint: disable=W0613 Runs a full package database refresh before listing. Set to ``False`` to disable running the refresh. - .. versionchanged:: Nitrogen + .. versionchanged:: 2017.7.0 In previous versions of Salt, ``refresh`` defaulted to ``False``. This was - changed to default to ``True`` in the Nitrogen release to make the behavior + changed to default to ``True`` in the 2017.7.0 release to make the behavior more consistent with the other package modules, which all default to ``True``. CLI Example: diff --git a/salt/modules/solrcloud.py b/salt/modules/solrcloud.py index a90d617b76..ab95f02af4 100644 --- a/salt/modules/solrcloud.py +++ b/salt/modules/solrcloud.py @@ -2,7 +2,7 @@ ''' Module for solrcloud configuration -.. versionadded:: Nitrogen +.. versionadded:: 2017.7.0 For now, module is limited to http-exposed API. It doesn't implement config upload via Solr zkCli ''' diff --git a/salt/modules/ssh.py b/salt/modules/ssh.py index 6b74f9fac0..4969f2b842 100644 --- a/salt/modules/ssh.py +++ b/salt/modules/ssh.py @@ -240,7 +240,7 @@ def _fingerprint(public_key, fingerprint_hash_type=None): was originally hashed with. This defaults to ``sha256`` if not specified. .. versionadded:: 2016.11.4 - .. versionchanged:: Nitrogen: default changed from ``md5`` to ``sha256`` + .. versionchanged:: 2017.7.0: default changed from ``md5`` to ``sha256`` ''' if fingerprint_hash_type: @@ -248,7 +248,7 @@ def _fingerprint(public_key, fingerprint_hash_type=None): else: # Set fingerprint_hash_type to md5 as default log.warning('Public Key hashing currently defaults to "md5". This will ' - 'change to "sha256" in the Nitrogen release.') + 'change to "sha256" in the 2017.7.0 release.') hash_type = 'sha256' try: @@ -836,7 +836,7 @@ def recv_known_host(hostname, was originally hashed with. This defaults to ``sha256`` if not specified. .. versionadded:: 2016.11.4 - .. versionchanged:: Nitrogen: default changed from ``md5`` to ``sha256`` + .. versionchanged:: 2017.7.0: default changed from ``md5`` to ``sha256`` CLI Example: @@ -1009,7 +1009,7 @@ def set_known_host(user=None, was originally hashed with. This defaults to ``sha256`` if not specified. .. versionadded:: 2016.11.4 - .. versionchanged:: Nitrogen: default changed from ``md5`` to ``sha256`` + .. versionchanged:: 2017.7.0: default changed from ``md5`` to ``sha256`` CLI Example: diff --git a/salt/modules/state.py b/salt/modules/state.py index dc01ef6e53..48802dd49c 100644 --- a/salt/modules/state.py +++ b/salt/modules/state.py @@ -1140,7 +1140,7 @@ def top(topfn, :conf_minion:`pillarenv` minion config option nor this CLI argument is used, all Pillar environments will be merged together. - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 CLI Example: diff --git a/salt/modules/statuspage.py b/salt/modules/statuspage.py index d41e6bf5b3..6b740badfb 100644 --- a/salt/modules/statuspage.py +++ b/salt/modules/statuspage.py @@ -16,7 +16,7 @@ In the minion configuration file, the following block is required: api_key: page_id: -.. versionadded:: Nitrogen +.. versionadded:: 2017.7.0 ''' from __future__ import absolute_import diff --git a/salt/modules/systemd.py b/salt/modules/systemd.py index d235cb8457..1909525cab 100644 --- a/salt/modules/systemd.py +++ b/salt/modules/systemd.py @@ -616,7 +616,7 @@ def unmask_(name, runtime=False): runtime : False Set to ``True`` to unmask this service only until the next reboot - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 In previous versions, this function would remove whichever mask was identified by running ``systemctl is-enabled`` on the service. However, since it is possible to both have both indefinite and @@ -701,7 +701,7 @@ def masked(name, runtime=False): is-enabled`` command (so that a persistent mask can be distinguished from a runtime mask). If the service is not masked, then ``False`` will be returned. - .. versionchanged:: Nitrogen + .. versionchanged:: 2017.7.0 This function now returns a boolean telling the user whether a mask specified by the new ``runtime`` argument is set. If ``runtime`` is ``False``, this function will return ``True`` if an indefinite mask is @@ -714,7 +714,7 @@ def masked(name, runtime=False): runtime : False Set to ``True`` to check for a runtime mask - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 In previous versions, this function would simply return the output of ``systemctl is-enabled`` when the service was found to be masked. However, since it is possible to both have both indefinite @@ -771,13 +771,13 @@ def start(name, no_block=False, unmask=False, unmask_runtime=False): no_block : False Set to ``True`` to start the service using ``--no-block``. - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 unmask : False Set to ``True`` to remove an indefinite mask before attempting to start the service. - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 In previous releases, Salt would simply unmask a service before starting. This behavior is no longer the default. @@ -785,7 +785,7 @@ def start(name, no_block=False, unmask=False, unmask_runtime=False): Set to ``True`` to remove a runtime mask before attempting to start the service. - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 In previous releases, Salt would simply unmask a service before starting. This behavior is no longer the default. @@ -827,7 +827,7 @@ def stop(name, no_block=False): no_block : False Set to ``True`` to start the service using ``--no-block``. - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 CLI Example: @@ -860,13 +860,13 @@ def restart(name, no_block=False, unmask=False, unmask_runtime=False): no_block : False Set to ``True`` to start the service using ``--no-block``. - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 unmask : False Set to ``True`` to remove an indefinite mask before attempting to restart the service. - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 In previous releases, Salt would simply unmask a service before restarting. This behavior is no longer the default. @@ -874,7 +874,7 @@ def restart(name, no_block=False, unmask=False, unmask_runtime=False): Set to ``True`` to remove a runtime mask before attempting to restart the service. - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 In previous releases, Salt would simply unmask a service before restarting. This behavior is no longer the default. @@ -916,13 +916,13 @@ def reload_(name, no_block=False, unmask=False, unmask_runtime=False): no_block : False Set to ``True`` to reload the service using ``--no-block``. - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 unmask : False Set to ``True`` to remove an indefinite mask before attempting to reload the service. - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 In previous releases, Salt would simply unmask a service before reloading. This behavior is no longer the default. @@ -930,7 +930,7 @@ def reload_(name, no_block=False, unmask=False, unmask_runtime=False): Set to ``True`` to remove a runtime mask before attempting to reload the service. - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 In previous releases, Salt would simply unmask a service before reloading. This behavior is no longer the default. @@ -974,13 +974,13 @@ def force_reload(name, no_block=True, unmask=False, unmask_runtime=False): no_block : False Set to ``True`` to start the service using ``--no-block``. - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 unmask : False Set to ``True`` to remove an indefinite mask before attempting to force-reload the service. - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 In previous releases, Salt would simply unmask a service before force-reloading. This behavior is no longer the default. @@ -988,7 +988,7 @@ def force_reload(name, no_block=True, unmask=False, unmask_runtime=False): Set to ``True`` to remove a runtime mask before attempting to force-reload the service. - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 In previous releases, Salt would simply unmask a service before force-reloading. This behavior is no longer the default. @@ -1052,13 +1052,13 @@ def enable(name, no_block=False, unmask=False, unmask_runtime=False, **kwargs): no_block : False Set to ``True`` to start the service using ``--no-block``. - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 unmask : False Set to ``True`` to remove an indefinite mask before attempting to enable the service. - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 In previous releases, Salt would simply unmask a service before enabling. This behavior is no longer the default. @@ -1066,7 +1066,7 @@ def enable(name, no_block=False, unmask=False, unmask_runtime=False, **kwargs): Set to ``True`` to remove a runtime mask before attempting to enable the service. - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 In previous releases, Salt would simply unmask a service before enabling. This behavior is no longer the default. @@ -1124,7 +1124,7 @@ def disable(name, no_block=False, **kwargs): # pylint: disable=unused-argument no_block : False Set to ``True`` to start the service using ``--no-block``. - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 CLI Example: diff --git a/salt/modules/win_dsc.py b/salt/modules/win_dsc.py index aebcfeb999..90aef68630 100644 --- a/salt/modules/win_dsc.py +++ b/salt/modules/win_dsc.py @@ -123,19 +123,19 @@ def run_config(path, file containing the proper hash table or the PowerShell code to create the hash table. - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 config_data_source (str): The path to the ``.psd1`` file on ``file_roots`` to cache at the location specified by ``config_data``. If this is specified, ``config_data`` must be a local path instead of a hash table. - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 script_parameters (str): Any additional parameters expected by the configuration script. These must be defined in the script itself. - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 salt_env (str): The salt environment to use when copying the source. Default is 'base' @@ -205,19 +205,19 @@ def compile_config(path, file containing the proper hash table or the PowerShell code to create the hash table. - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 config_data_source (str): The path to the ``.psd1`` file on ``file_roots`` to cache at the location specified by ``config_data``. If this is specified, ``config_data`` must be a local path instead of a hash table. - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 script_parameters (str): Any additional parameters expected by the configuration script. These must be defined in the script itself. - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 salt_env (str): The salt environment to use when copying the source. Default is 'base' diff --git a/salt/modules/win_iis.py b/salt/modules/win_iis.py index 0faa0fb7ab..d0fe647b03 100644 --- a/salt/modules/win_iis.py +++ b/salt/modules/win_iis.py @@ -303,7 +303,7 @@ def modify_site(name, sourcepath=None, apppool=None): ''' Modify a basic website in IIS. - ..versionadded:: Nitrogen + .. versionadded:: 2017.7.0 Args: name (str): The IIS site name. @@ -412,7 +412,7 @@ def stop_site(name): ''' Stop a Web Site in IIS. - ..versionadded:: Nitrogen + .. versionadded:: 2017.7.0 Args: name (str): The name of the website to stop. @@ -437,7 +437,7 @@ def start_site(name): ''' Start a Web Site in IIS. - ..versionadded:: Nitrogen + .. versionadded:: 2017.7.0 Args: name (str): The name of the website to start. @@ -462,7 +462,7 @@ def restart_site(name): ''' Restart a Web Site in IIS. - ..versionadded:: Nitrogen + .. versionadded:: 2017.7.0 Args: name (str): The name of the website to restart. @@ -598,7 +598,7 @@ def modify_binding(site, binding, hostheader=None, ipaddress=None, port=None, Modify an IIS Web Binding. Use ``site`` and ``binding`` to target the binding. - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 Args: site (str): The IIS site name. @@ -1085,7 +1085,7 @@ def stop_apppool(name): ''' Stop an IIS application pool. - ..versionadded:: Nitrogen + .. versionadded:: 2017.7.0 Args: name (str): The name of the App Pool to stop. @@ -1110,7 +1110,7 @@ def start_apppool(name): ''' Start an IIS application pool. - ..versionadded:: Nitrogen + .. versionadded:: 2017.7.0 Args: name (str): The name of the App Pool to start. @@ -1633,7 +1633,7 @@ def list_backups(): r''' List the IIS Configuration Backups on the System. - ..versionadded:: Nitrogen + .. versionadded:: 2017.7.0 .. note:: Backups are made when a configuration is edited. Manual backups are @@ -1678,7 +1678,7 @@ def create_backup(name): r''' Backup an IIS Configuration on the System. - ..versionadded:: Nitrogen + .. versionadded:: 2017.7.0 .. note:: Backups are stored in the ``$env:Windir\System32\inetsrv\backup`` @@ -1716,7 +1716,7 @@ def remove_backup(name): ''' Remove an IIS Configuration backup from the System. - ..versionadded:: Nitrogen + .. versionadded:: 2017.7.0 Args: name (str): The name of the backup to remove @@ -1752,7 +1752,7 @@ def list_worker_processes(apppool): Returns a list of worker processes that correspond to the passed application pool. - ..versionadded:: Nitrogen + .. versionadded:: 2017.7.0 Args: apppool (str): The application pool to query @@ -1798,7 +1798,7 @@ def get_webapp_settings(name, site, settings): Available settings: physicalPath, applicationPool, userName, password Returns: dict: A dictionary of the provided settings and their values. - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 CLI Example: .. code-block:: bash salt '*' win_iis.get_webapp_settings name='app0' site='Default Web Site' @@ -1871,7 +1871,7 @@ def set_webapp_settings(name, site, settings): : password: "connectAs" password for user :return: A boolean representing whether all changes succeeded. :rtype: bool - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 CLI Example: .. code-block:: bash salt '*' win_iis.set_webapp_settings name='app0' site='site0' settings="{'physicalPath': 'C:\site0', 'apppool': 'site0'}" diff --git a/salt/modules/win_wua.py b/salt/modules/win_wua.py index 74a73454a1..638452f2ae 100644 --- a/salt/modules/win_wua.py +++ b/salt/modules/win_wua.py @@ -57,7 +57,7 @@ def available(software=True, severities=None, ): ''' - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 List updates that match the passed criteria. @@ -181,7 +181,7 @@ def available(software=True, def list_update(name, download=False, install=False): ''' - .. deprecated:: Nitrogen + .. deprecated:: 2017.7.0 Use :func:`get` instead Returns details for all updates that match the search criteria @@ -249,14 +249,14 @@ def list_update(name, download=False, install=False): ''' salt.utils.warn_until( 'Fluorine', - 'This function is replaced by \'get\' as of Salt Nitrogen. This' + 'This function is replaced by \'get\' as of Salt 2017.7.0. This' 'warning will be removed in Salt Fluorine.') return get(name, download, install) def get(name, download=False, install=False): ''' - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 Returns details for all updates that match the search criteria @@ -350,7 +350,7 @@ def list_updates(software=True, download=False, install=False): ''' - .. deprecated:: Nitrogen + .. deprecated:: 2017.7.0 Use :func:`list` instead Returns a detailed list of available updates or a summary. If download or @@ -465,7 +465,7 @@ def list_updates(software=True, ''' salt.utils.warn_until( 'Fluorine', - 'This function is replaced by \'list\' as of Salt Nitrogen. This' + 'This function is replaced by \'list\' as of Salt 2017.7.0. This' 'warning will be removed in Salt Fluorine.') return list(software, drivers, summary, skip_installed, categories, severities, download, install) @@ -480,7 +480,7 @@ def list(software=True, download=False, install=False): ''' - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 Returns a detailed list of available updates or a summary. If download or install is True the same list will be downloaded and/or installed. @@ -618,7 +618,7 @@ def list(software=True, def download_update(name): ''' - .. deprecated:: Nitrogen + .. deprecated:: 2017.7.0 Use :func:`download` instead Downloads a single update. @@ -645,14 +645,14 @@ def download_update(name): ''' salt.utils.warn_until( 'Fluorine', - 'This function is replaced by \'download\' as of Salt Nitrogen. This' + 'This function is replaced by \'download\' as of Salt 2017.7.0. This' 'warning will be removed in Salt Fluorine.') return download(name) def download_updates(names): ''' - .. deprecated:: Nitrogen + .. deprecated:: 2017.7.0 Use :func:`download` instead Downloads updates that match the list of passed identifiers. It's easier to @@ -676,14 +676,14 @@ def download_updates(names): ''' salt.utils.warn_until( 'Fluorine', - 'This function is replaced by \'download\' as of Salt Nitrogen. This' + 'This function is replaced by \'download\' as of Salt 2017.7.0. This' 'warning will be removed in Salt Fluorine.') return download(names) def download(names): ''' - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 Downloads updates that match the list of passed identifiers. It's easier to use this function by using list_updates and setting install=True. @@ -723,7 +723,7 @@ def download(names): def install_update(name): ''' - .. deprecated:: Nitrogen + .. deprecated:: 2017.7.0 Use :func:`install` instead Installs a single update @@ -750,14 +750,14 @@ def install_update(name): ''' salt.utils.warn_until( 'Fluorine', - 'This function is replaced by \'install\' as of Salt Nitrogen. This' + 'This function is replaced by \'install\' as of Salt 2017.7.0. This' 'warning will be removed in Salt Fluorine.') return install(name) def install_updates(names): ''' - .. deprecated:: Nitrogen + .. deprecated:: 2017.7.0 Use :func:`install` instead Installs updates that match the list of identifiers. It may be easier to use @@ -781,14 +781,14 @@ def install_updates(names): ''' salt.utils.warn_until( 'Fluorine', - 'This function is replaced by \'install\' as of Salt Nitrogen. This' + 'This function is replaced by \'install\' as of Salt 2017.7.0. This' 'warning will be removed in Salt Fluorine.') return install(names) def install(names): ''' - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 Installs updates that match the list of identifiers. It may be easier to use the list_updates function and set install=True. @@ -828,7 +828,7 @@ def install(names): def uninstall(names): ''' - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 Uninstall updates. diff --git a/salt/modules/yumpkg.py b/salt/modules/yumpkg.py index 9eda2b36f8..c251ec1401 100644 --- a/salt/modules/yumpkg.py +++ b/salt/modules/yumpkg.py @@ -642,7 +642,7 @@ def list_repo_pkgs(*args, **kwargs): ` will only show the currently-installed version, as locking a package will make other versions appear unavailable to yum/dnf. - .. versionchanged:: Nitrogen + .. versionchanged:: 2017.7.0 By default, the versions for each package are no longer organized by repository. To get results organized by repository, use ``byrepo=True``. @@ -714,26 +714,26 @@ def list_repo_pkgs(*args, **kwargs): Specify a disabled package repository (or repositories) to enable. (e.g., ``yum --enablerepo='somerepo'``) - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 disablerepo (ignored if ``fromrepo`` is specified) Specify an enabled package repository (or repositories) to disable. (e.g., ``yum --disablerepo='somerepo'``) - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 byrepo : False When ``True``, the return data for each package will be organized by repository. - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 cacheonly : False When ``True``, the repo information will be retrieved from the cached repo metadata. This is equivalent to passing the ``-C`` option to yum/dnf. - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 CLI Examples: diff --git a/salt/modules/zoneadm.py b/salt/modules/zoneadm.py index 1039300af6..4edbe15679 100644 --- a/salt/modules/zoneadm.py +++ b/salt/modules/zoneadm.py @@ -6,7 +6,7 @@ Module for Solaris 10's zoneadm :maturity: new :platform: OmniOS,OpenIndiana,SmartOS,OpenSolaris,Solaris 10 -.. versionadded:: nitrogen +.. versionadded:: 2017.7.0 .. warning:: Oracle Solaris 11's zoneadm is not supported by this module! diff --git a/salt/modules/zonecfg.py b/salt/modules/zonecfg.py index 9e351c413f..ff9178f0d6 100644 --- a/salt/modules/zonecfg.py +++ b/salt/modules/zonecfg.py @@ -7,7 +7,7 @@ Module for Solaris 10's zonecfg :platform: OmniOS,OpenIndiana,SmartOS,OpenSolaris,Solaris 10 :depend: salt.modules.file -.. versionadded:: nitrogen +.. versionadded:: 2017.7.0 .. warning:: Oracle Solaris 11's zonecfg is not supported by this module! diff --git a/salt/modules/zypper.py b/salt/modules/zypper.py index fdfce4b1c0..aa4857cb39 100644 --- a/salt/modules/zypper.py +++ b/salt/modules/zypper.py @@ -316,7 +316,7 @@ __zypper__ = _Zypper() class Wildcard(object): ''' - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 Converts string wildcard to a zypper query. Example: diff --git a/salt/netapi/rest_cherrypy/app.py b/salt/netapi/rest_cherrypy/app.py index 1901d601bc..57d9200105 100644 --- a/salt/netapi/rest_cherrypy/app.py +++ b/salt/netapi/rest_cherrypy/app.py @@ -121,7 +121,7 @@ A REST API for Salt Enable or disable all endpoints that rely on session cookies. This can be useful to enforce only header-based authentication. - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 app : ``index.html`` A filesystem path to an HTML file that will be served as a static file. @@ -132,7 +132,7 @@ A REST API for Salt Send the custom ``X-Auth-Token`` header instead and consider disabling the ``enable_sessions`` setting. - .. versionchanged:: Nitrogen + .. versionchanged:: 2017.7.0 Add a proof-of-concept JavaScript single-page app. @@ -1918,7 +1918,7 @@ class Token(LowDataAdapter): Wraps functionality in the :py:mod:`auth Runner `. - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 ''' @cherrypy.config(**{'tools.sessions.on': False}) def POST(self, **kwargs): diff --git a/salt/output/table_out.py b/salt/output/table_out.py index 59e2070821..59c4cd9486 100644 --- a/salt/output/table_out.py +++ b/salt/output/table_out.py @@ -3,7 +3,7 @@ Display output in a table format ================================= -.. versionadded:: Nitrogen +.. versionadded:: 2017.7.0 This outputter displays a sequence of rows as table. diff --git a/salt/pillar/file_tree.py b/salt/pillar/file_tree.py index 7ae7a05bf4..1a825f80a8 100644 --- a/salt/pillar/file_tree.py +++ b/salt/pillar/file_tree.py @@ -56,7 +56,7 @@ intended to be used to deploy a file using ``contents_pillar`` with a files would not affected by the ``keep_newline`` configuration. However, this module does not actually distinguish between binary and text files. -.. versionchanged:: Nitrogen +.. versionchanged:: 2017.7.0 Templating/rendering has been added. You can now specify a default render pipeline and a black- and whitelist of (dis)allowed renderers. diff --git a/salt/pillar/git_pillar.py b/salt/pillar/git_pillar.py index 477067567a..8b85d14ab3 100644 --- a/salt/pillar/git_pillar.py +++ b/salt/pillar/git_pillar.py @@ -340,7 +340,7 @@ mind: order, with results merged together as each remote is evaluated. .. note:: - Prior to the Nitrogen release, remotes would be evaluated in a + Prior to the 2017.7.0 release, remotes would be evaluated in a non-deterministic order. 3. By default, when a repo is evaluated, other remotes' which share its pillar @@ -386,11 +386,11 @@ and when the ``baz`` remote is processed, SLS files will be looked for in :conf_master:`file_roots` and :conf_minion`pillar_roots`. The ordering of which remote is checked for SLS files is determined by the order they are listed. First the remote being processed is checked, then the others that share the -same environment are checked. However, before the Nitrogen release, since +same environment are checked. However, before the 2017.7.0 release, since evaluation was unordered, the remote being processed would be checked, followed in no specific order by the other repos which share the same environment. -Beginning with the Nitrogen release, this behavior of git_pillar remotes having +Beginning with the 2017.7.0 release, this behavior of git_pillar remotes having access to files in other repos which share the same environment can be disabled by setting :conf_master:`git_pillar_includes` to ``False``. If this is done, then all git_pillar remotes will only have access to their own SLS files. @@ -406,7 +406,7 @@ the example configuration above. In the second group of git_pillar remotes, the Mountpoints ~~~~~~~~~~~ -.. versionadded:: Nitrogen +.. versionadded:: 2017.7.0 Assume the following pillar top file: diff --git a/salt/pillar/postgres.py b/salt/pillar/postgres.py index 14cbb1d47a..58cd0e3298 100644 --- a/salt/pillar/postgres.py +++ b/salt/pillar/postgres.py @@ -2,7 +2,7 @@ ''' Retrieve Pillar data by doing a postgres query -.. versionadded:: Nitrogen +.. versionadded:: 2017.7.0 :maturity: new :depends: psycopg2 diff --git a/salt/pillar/vmware_pillar.py b/salt/pillar/vmware_pillar.py index 61b9fbf593..314f7dc55c 100644 --- a/salt/pillar/vmware_pillar.py +++ b/salt/pillar/vmware_pillar.py @@ -2,7 +2,7 @@ ''' Pillar data from vCenter or an ESXi host -.. versionadded:: Nitrogen +.. versionadded:: 2017.7.0 :depends: - pyVmomi diff --git a/salt/proxy/napalm.py b/salt/proxy/napalm.py index 87d1d12721..b0cd8d6546 100644 --- a/salt/proxy/napalm.py +++ b/salt/proxy/napalm.py @@ -35,7 +35,7 @@ please refer to the `NAPALM Read the Docs page`_. .. _`NAPALM Read the Docs page`: https://napalm.readthedocs.io/en/latest/#supported-network-operating-systems .. _`optional arguments`: http://napalm.readthedocs.io/en/latest/support/index.html#list-of-supported-optional-arguments -.. versionadded:: Nitrogen +.. versionadded:: 2017.7.0 * always_alive: in certain less dynamic environments, maintaining the remote connection permanently open with the network device is not always beneficial. In that case, the user can @@ -136,7 +136,7 @@ def alive(opts): ''' Return the connection status with the remote device. - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 ''' if salt.utils.napalm.not_always_alive(opts): return True # don't force reconnection for not-always alive proxies diff --git a/salt/renderers/pass.py b/salt/renderers/pass.py index 31ee31a939..05607e9475 100644 --- a/salt/renderers/pass.py +++ b/salt/renderers/pass.py @@ -4,7 +4,7 @@ Pass Renderer for Salt [pass](https://www.passwordstore.org/) -.. versionadded:: Nitrogen +.. versionadded:: 2017.7.0 # Setup __Note__: `` needs to be replaced with the user salt-master will be diff --git a/salt/returners/highstate_return.py b/salt/returners/highstate_return.py index 5ce71441a1..385abc06cc 100644 --- a/salt/returners/highstate_return.py +++ b/salt/returners/highstate_return.py @@ -3,7 +3,7 @@ Return the results of a highstate (or any other state function that returns data in a compatible format) via an HTML email or HTML file. -.. versionadded:: Nitrogen +.. versionadded:: 2017.7.0 Similar results can be achieved by using smtp returner with a custom template, except an attempt at writing such a template for the complex data structure diff --git a/salt/returners/mattermost_returner.py b/salt/returners/mattermost_returner.py index 9f5945f764..3d022297de 100644 --- a/salt/returners/mattermost_returner.py +++ b/salt/returners/mattermost_returner.py @@ -2,7 +2,7 @@ ''' Return salt data via mattermost -.. versionadded:: Nitrogen +.. versionadded:: 2017.7.0 The following fields can be set in the minion conf file:: .. code-block:: yaml diff --git a/salt/roster/cache.py b/salt/roster/cache.py index 43ab8be391..fb848507ff 100644 --- a/salt/roster/cache.py +++ b/salt/roster/cache.py @@ -3,7 +3,7 @@ The `cache` roster provides a flexible interface to the Salt Masters' minion cache to access regular minions over ``salt-ssh``. -.. versionadded:: Nitrogen +.. versionadded:: 2017.7.0 - grains, pillar, mine data matching - SDB URLs diff --git a/salt/runners/bgp.py b/salt/runners/bgp.py index cc8891e4e7..b460bdcef9 100644 --- a/salt/runners/bgp.py +++ b/salt/runners/bgp.py @@ -3,7 +3,7 @@ BGP Finder ========== -.. versionadded:: Nitrogen +.. versionadded:: 2017.7.0 Runner to search BGP neighbors details. diff --git a/salt/runners/cache.py b/salt/runners/cache.py index 3ed71dc443..8260b074df 100644 --- a/salt/runners/cache.py +++ b/salt/runners/cache.py @@ -32,7 +32,7 @@ __func_alias__ = { def grains(tgt=None, tgt_type='glob', **kwargs): ''' - .. versionchanged:: Nitrogen + .. versionchanged:: 2017.7.0 The ``expr_form`` argument has been renamed to ``tgt_type``, earlier releases must use ``expr_form``. @@ -63,7 +63,7 @@ def grains(tgt=None, tgt_type='glob', **kwargs): def pillar(tgt=None, tgt_type='glob', **kwargs): ''' - .. versionchanged:: Nitrogen + .. versionchanged:: 2017.7.0 The ``expr_form`` argument has been renamed to ``tgt_type``, earlier releases must use ``expr_form``. @@ -96,7 +96,7 @@ def pillar(tgt=None, tgt_type='glob', **kwargs): def mine(tgt=None, tgt_type='glob', **kwargs): ''' - .. versionchanged:: Nitrogen + .. versionchanged:: 2017.7.0 The ``expr_form`` argument has been renamed to ``tgt_type``, earlier releases must use ``expr_form``. @@ -152,7 +152,7 @@ def _clear_cache(tgt=None, def clear_pillar(tgt=None, tgt_type='glob', expr_form=None): ''' - .. versionchanged:: Nitrogen + .. versionchanged:: 2017.7.0 The ``expr_form`` argument has been renamed to ``tgt_type``, earlier releases must use ``expr_form``. @@ -180,7 +180,7 @@ def clear_pillar(tgt=None, tgt_type='glob', expr_form=None): def clear_grains(tgt=None, tgt_type='glob', expr_form=None): ''' - .. versionchanged:: Nitrogen + .. versionchanged:: 2017.7.0 The ``expr_form`` argument has been renamed to ``tgt_type``, earlier releases must use ``expr_form``. @@ -208,7 +208,7 @@ def clear_grains(tgt=None, tgt_type='glob', expr_form=None): def clear_mine(tgt=None, tgt_type='glob', expr_form=None): ''' - .. versionchanged:: Nitrogen + .. versionchanged:: 2017.7.0 The ``expr_form`` argument has been renamed to ``tgt_type``, earlier releases must use ``expr_form``. @@ -239,7 +239,7 @@ def clear_mine_func(tgt=None, clear_mine_func_flag=None, expr_form=None): ''' - .. versionchanged:: Nitrogen + .. versionchanged:: 2017.7.0 The ``expr_form`` argument has been renamed to ``tgt_type``, earlier releases must use ``expr_form``. @@ -256,7 +256,7 @@ def clear_mine_func(tgt=None, def clear_all(tgt=None, tgt_type='glob', expr_form=None): ''' - .. versionchanged:: Nitrogen + .. versionchanged:: 2017.7.0 The ``expr_form`` argument has been renamed to ``tgt_type``, earlier releases must use ``expr_form``. diff --git a/salt/runners/manage.py b/salt/runners/manage.py index fa7b060689..249c875c57 100644 --- a/salt/runners/manage.py +++ b/salt/runners/manage.py @@ -68,7 +68,7 @@ def _ping(tgt, tgt_type, timeout, gather_job_timeout): def status(output=True, tgt='*', tgt_type='glob', expr_form=None, timeout=None, gather_job_timeout=None): ''' - .. versionchanged:: Nitrogen + .. versionchanged:: 2017.7.0 The ``expr_form`` argument has been renamed to ``tgt_type``, earlier releases must use ``expr_form``. @@ -158,7 +158,7 @@ def key_regen(): def down(removekeys=False, tgt='*', tgt_type='glob', expr_form=None): ''' - .. versionchanged:: Nitrogen + .. versionchanged:: 2017.7.0 The ``expr_form`` argument has been renamed to ``tgt_type``, earlier releases must use ``expr_form``. @@ -184,7 +184,7 @@ def down(removekeys=False, tgt='*', tgt_type='glob', expr_form=None): def up(tgt='*', tgt_type='glob', expr_form=None, timeout=None, gather_job_timeout=None): # pylint: disable=C0103 ''' - .. versionchanged:: Nitrogen + .. versionchanged:: 2017.7.0 The ``expr_form`` argument has been renamed to ``tgt_type``, earlier releases must use ``expr_form``. @@ -579,7 +579,7 @@ def lane_stats(estate=None): def safe_accept(target, tgt_type='glob', expr_form=None): ''' - .. versionchanged:: Nitrogen + .. versionchanged:: 2017.7.0 The ``expr_form`` argument has been renamed to ``tgt_type``, earlier releases must use ``expr_form``. @@ -712,7 +712,7 @@ def bootstrap(version='develop', .. versionchanged:: 2016.11.0 - .. deprecated:: 2016.11.0 + .. deprecated:: Oxygen script_args Any additional arguments that you want to pass to the script. diff --git a/salt/runners/mattermost.py b/salt/runners/mattermost.py index a53f1f890a..2bd3d928c4 100644 --- a/salt/runners/mattermost.py +++ b/salt/runners/mattermost.py @@ -2,7 +2,7 @@ ''' Module for sending messages to Mattermost -.. versionadded:: Nitrogen +.. versionadded:: 2017.7.0 :configuration: This module can be used by either passing an api_url and hook directly or by specifying both in a configuration profile in the salt diff --git a/salt/runners/mine.py b/salt/runners/mine.py index 0ffa90e7a0..081c27536b 100644 --- a/salt/runners/mine.py +++ b/salt/runners/mine.py @@ -34,7 +34,7 @@ def update(tgt, clear=False, mine_functions=None): ''' - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 Update the mine data on a certain group of minions. diff --git a/salt/runners/net.py b/salt/runners/net.py index b7a4965955..86017f4ae1 100644 --- a/salt/runners/net.py +++ b/salt/runners/net.py @@ -3,7 +3,7 @@ NET Finder ========== -.. versionadded:: Nitrogen +.. versionadded:: 2017.7.0 A runner to find network details easily and fast. It's smart enough to know what you are looking for. diff --git a/salt/runners/salt.py b/salt/runners/salt.py index 63ea0592c5..1cbae0ac27 100644 --- a/salt/runners/salt.py +++ b/salt/runners/salt.py @@ -79,7 +79,7 @@ def execute(tgt, kwarg=None, **kwargs): ''' - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 Execute ``fun`` on all minions matched by ``tgt`` and ``tgt_type``. Parameter ``fun`` is the name of execution module function to call. @@ -115,7 +115,7 @@ def execute(tgt, fun, arg=arg, timeout=timeout or __opts__['timeout'], - tgt_type=tgt_type, # no warn_until, as this is introduced only in Nitrogen + tgt_type=tgt_type, # no warn_until, as this is introduced only in 2017.7.0 ret=ret, jid=jid, kwarg=kwarg, diff --git a/salt/runners/saltutil.py b/salt/runners/saltutil.py index 1140cde1a6..555de1b16b 100644 --- a/salt/runners/saltutil.py +++ b/salt/runners/saltutil.py @@ -377,7 +377,7 @@ def sync_utils(saltenv='base', extmod_whitelist=None, extmod_blacklist=None): def sync_sdb(saltenv='base', extmod_whitelist=None, extmod_blacklist=None): ''' - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 Sync utils modules from ``salt://_sdb`` to the master @@ -403,7 +403,7 @@ def sync_sdb(saltenv='base', extmod_whitelist=None, extmod_blacklist=None): def sync_tops(saltenv='base', extmod_whitelist=None, extmod_blacklist=None): ''' - .. versionadded:: 2016.3.7,2016.11.4,Nitrogen + .. versionadded:: 2016.3.7,2016.11.4,2017.7.0 Sync master_tops modules from ``salt://_tops`` to the master @@ -423,7 +423,7 @@ def sync_tops(saltenv='base', extmod_whitelist=None, extmod_blacklist=None): def sync_cache(saltenv='base', extmod_whitelist=None, extmod_blacklist=None): ''' - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 Sync utils modules from ``salt://_cache`` to the master @@ -475,7 +475,7 @@ def sync_fileserver(saltenv='base', extmod_whitelist=None, extmod_blacklist=None def sync_clouds(saltenv='base', extmod_whitelist=None, extmod_blacklist=None): ''' - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 Sync utils modules from ``salt://_clouds`` to the master @@ -501,7 +501,7 @@ def sync_clouds(saltenv='base', extmod_whitelist=None, extmod_blacklist=None): def sync_roster(saltenv='base', extmod_whitelist=None, extmod_blacklist=None): ''' - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 Sync utils modules from ``salt://_roster`` to the master diff --git a/salt/runners/ssh.py b/salt/runners/ssh.py index 9463e398d5..e26b4579e3 100644 --- a/salt/runners/ssh.py +++ b/salt/runners/ssh.py @@ -21,7 +21,7 @@ def cmd(tgt, expr_form=None): ''' .. versionadded:: 2015.5.0 - .. versionchanged:: Nitrogen + .. versionchanged:: 2017.7.0 The ``expr_form`` argument has been renamed to ``tgt_type``, earlier releases must use ``expr_form``. diff --git a/salt/sdb/cache.py b/salt/sdb/cache.py index 16e1eff8a8..324c9d82f0 100644 --- a/salt/sdb/cache.py +++ b/salt/sdb/cache.py @@ -6,7 +6,7 @@ cache Module :maturity: New :platform: all -.. versionadded:: Nitrogen +.. versionadded:: 2017.7.0 This module provides access to Salt's cache subsystem. diff --git a/salt/sdb/tism.py b/salt/sdb/tism.py index 863a4018b9..8843190386 100644 --- a/salt/sdb/tism.py +++ b/salt/sdb/tism.py @@ -6,7 +6,7 @@ tISM - the Immutalbe Secrets Manager SDB Module :maturity: New :platform: all -.. versionadded:: Nitrogen +.. versionadded:: 2017.7.0 This module will decrypt PGP encrypted secrets against a tISM server. diff --git a/salt/sdb/yaml.py b/salt/sdb/yaml.py index 39827f8c87..aafc63246c 100644 --- a/salt/sdb/yaml.py +++ b/salt/sdb/yaml.py @@ -6,7 +6,7 @@ Pull sdb values from a YAML file :maturity: New :platform: all -.. versionadded:: Nitrogen +.. versionadded:: 2017.7.0 Configuration: diff --git a/salt/state.py b/salt/state.py index b0eb11d651..39097819fe 100644 --- a/salt/state.py +++ b/salt/state.py @@ -983,9 +983,12 @@ class State(object): errors.append('Missing "name" data') if data['name'] and not isinstance(data['name'], six.string_types): errors.append( - 'ID \'{0}\' in SLS \'{1}\' is not formed as a string, but is ' - 'a {2}'.format( - data['name'], data['__sls__'], type(data['name']).__name__) + 'ID \'{0}\' {1}is not formed as a string, but is a {2}'.format( + data['name'], + 'in SLS \'{0}\' '.format(data['__sls__']) + if '__sls__' in data else '', + type(data['name']).__name__ + ) ) if errors: return errors diff --git a/salt/states/archive.py b/salt/states/archive.py index 7feaaddb10..f61a8084dd 100644 --- a/salt/states/archive.py +++ b/salt/states/archive.py @@ -572,7 +572,8 @@ def extracted(name, .. versionchanged:: 2016.11.0 If omitted, the archive format will be guessed based on the value - of the ``source`` argument. + of the ``source`` argument. If the minion is running a release + older than 2016.11.0, this option is required. .. _tarfile: https://docs.python.org/2/library/tarfile.html .. _zipfile: https://docs.python.org/2/library/zipfile.html diff --git a/salt/states/at.py b/salt/states/at.py index 7da364e6cb..27c8d83030 100644 --- a/salt/states/at.py +++ b/salt/states/at.py @@ -25,7 +25,7 @@ def __virtual__(): def present(name, timespec, tag=None, user=None, job=None, unique_tag=False): ''' - .. versionchanged:: nitrogen + .. versionchanged:: 2017.7.0 Add a job to queue. job : string @@ -43,7 +43,7 @@ def present(name, timespec, tag=None, user=None, job=None, unique_tag=False): unique_tag : boolean If set to True job will not be added if a job with the tag exists. - .. versionadded:: nitrogen + .. versionadded:: 2017.7.0 .. code-block:: yaml @@ -126,7 +126,7 @@ def present(name, timespec, tag=None, user=None, job=None, unique_tag=False): def absent(name, jobid=None, **kwargs): ''' - .. versionchanged:: nitrogen + .. versionchanged:: 2017.7.0 Remove a job from queue jobid: string|int @@ -245,7 +245,7 @@ def absent(name, jobid=None, **kwargs): def watch(name, timespec, tag=None, user=None, job=None, unique_tag=False): ''' - .. versionadded:: nitrogen + .. versionadded:: 2017.7.0 Add an at job if trigger by watch job : string @@ -263,7 +263,7 @@ def watch(name, timespec, tag=None, user=None, job=None, unique_tag=False): unique_tag : boolean If set to True job will not be added if a job with the tag exists. - .. versionadded:: nitrogen + .. versionadded:: 2017.7.0 .. code-block:: yaml diff --git a/salt/states/boto3_elasticache.py b/salt/states/boto3_elasticache.py index 2ab15e7cb0..dd5cd96f6d 100644 --- a/salt/states/boto3_elasticache.py +++ b/salt/states/boto3_elasticache.py @@ -3,7 +3,7 @@ Manage Elasticache with boto3 ============================= -.. versionadded:: Nitrogen +.. versionadded:: 2017.7.0 Create, destroy and update Elasticache clusters. Be aware that this interacts with Amazon's services, and so may incur charges. diff --git a/salt/states/boto3_route53.py b/salt/states/boto3_route53.py index b578781953..0a49dcc3fe 100644 --- a/salt/states/boto3_route53.py +++ b/salt/states/boto3_route53.py @@ -2,7 +2,7 @@ ''' Manage Route53 records with Boto 3 -.. versionadded:: Nitrogen +.. versionadded:: 2017.7.0 Create and delete Route53 records. Be aware that this interacts with Amazon's services, and so may incur charges. diff --git a/salt/states/boto_apigateway.py b/salt/states/boto_apigateway.py index 28adc200be..0f1ffc33fd 100644 --- a/salt/states/boto_apigateway.py +++ b/salt/states/boto_apigateway.py @@ -225,13 +225,13 @@ def present(name, api_name, swagger_file, stage_name, api_key_required, '#end\n' ' ]\n' - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 response_template String value that defines the response template mapping applied in case of success (including OPTIONS method) If set to None, empty ({}) template is assumed, which will transfer response from the lambda function as is. - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 ''' ret = {'name': name, 'result': True, @@ -1674,7 +1674,7 @@ def usage_plan_present(name, plan_name, description=None, throttle=None, quota=N ''' Ensure the spcifieda usage plan with the corresponding metrics is deployed - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 name name of the state @@ -1814,7 +1814,7 @@ def usage_plan_absent(name, plan_name, region=None, key=None, keyid=None, profil ''' Ensures usage plan identified by name is no longer present - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 name name of the state @@ -1880,7 +1880,7 @@ def usage_plan_association_present(name, plan_name, api_stages, region=None, key ''' Ensures usage plan identified by name is added to provided api_stages - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 name name of the state @@ -1975,7 +1975,7 @@ def usage_plan_association_absent(name, plan_name, api_stages, region=None, key= If a plan is associated to stages not listed in api_stages parameter, those associations remain intact. - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 name name of the state diff --git a/salt/states/boto_iam_role.py b/salt/states/boto_iam_role.py index 6b9841610e..84b0a24343 100644 --- a/salt/states/boto_iam_role.py +++ b/salt/states/boto_iam_role.py @@ -129,7 +129,7 @@ def present( defined here will be appended with the policy document statements defined in the policy_document argument. - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 path The path to the role/instance profile. (See https://boto.readthedocs.io/en/latest/ref/iam.html#boto.iam.connection.IAMConnection.create_role) diff --git a/salt/states/boto_kinesis.py b/salt/states/boto_kinesis.py index f701215b2d..6b7e73a495 100644 --- a/salt/states/boto_kinesis.py +++ b/salt/states/boto_kinesis.py @@ -3,7 +3,7 @@ Manage Kinesis Streams ====================== -.. versionadded:: Nitrogen +.. versionadded:: 2017.7.0 Create and destroy Kinesis streams. Be aware that this interacts with Amazon's services, and so may incur charges. diff --git a/salt/states/boto_lambda.py b/salt/states/boto_lambda.py index d77753e93f..c676ebfe6c 100644 --- a/salt/states/boto_lambda.py +++ b/salt/states/boto_lambda.py @@ -183,7 +183,7 @@ def function_present(name, FunctionName, Runtime, Role, Handler, ZipFile=None, } } - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 region Region to connect to. diff --git a/salt/states/boto_vpc.py b/salt/states/boto_vpc.py index d1741b6600..b289789670 100644 --- a/salt/states/boto_vpc.py +++ b/salt/states/boto_vpc.py @@ -5,11 +5,14 @@ Manage VPCs .. versionadded:: 2015.8.0 +:depends: + +- boto >= 2.8.0 +- boto3 >= 1.2.6 + Create and destroy VPCs. Be aware that this interacts with Amazon's services, and so may incur charges. -This module uses ``boto``, which can be installed via package, or pip. - This module accepts explicit vpc credentials but can also utilize IAM roles assigned to the instance through Instance Profiles. Dynamic credentials are then automatically obtained from AWS API and no further @@ -147,6 +150,8 @@ import logging import salt.ext.six as six import salt.utils.dictupdate as dictupdate +__virtualname__ = 'boto_vpc' + log = logging.getLogger(__name__) @@ -154,7 +159,14 @@ def __virtual__(): ''' Only load if boto is available. ''' - return 'boto_vpc' if 'boto_vpc.exists' in __salt__ else False + boto_version = '2.8.0' + boto3_version = '1.2.6' + if 'boto_vpc.exists' in __salt__: + return __virtualname__ + else: + return False, 'The following libraries are required to run the boto_vpc state module: ' \ + 'boto >= {0} and boto3 >= {1}.'.format(boto_version, + boto3_version) def present(name, cidr_block, instance_tenancy=None, dns_support=None, diff --git a/salt/states/bower.py b/salt/states/bower.py index 3baca6ae74..ffcbb9c8a3 100644 --- a/salt/states/bower.py +++ b/salt/states/bower.py @@ -275,7 +275,7 @@ def bootstrap(name, user=None): def pruned(name, user=None, env=None): ''' - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 Cleans up local bower_components directory. diff --git a/salt/states/chocolatey.py b/salt/states/chocolatey.py index eb7e9bc292..79c69048ef 100644 --- a/salt/states/chocolatey.py +++ b/salt/states/chocolatey.py @@ -67,7 +67,7 @@ def installed(name, version=None, source=None, force=False, pre_versions=False, Allow mulitiple versions of the package to be installed. Do not use with ``force``. Does not work with all packages. Default is False. - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 .. code-block:: yaml diff --git a/salt/states/docker.py b/salt/states/docker.py index 595a26d637..962887445c 100644 --- a/salt/states/docker.py +++ b/salt/states/docker.py @@ -2,12 +2,12 @@ ''' States to manage Docker containers, images, volumes, and networks -.. versionchanged:: Nitrogen +.. versionchanged:: 2017.7.0 The legacy Docker state and execution module have been removed, and the new modules (formerly called ``dockerng`` have taken their places). .. important:: - As of the Nitrogen release, the states in this module have been separated + As of the 2017.7.0 release, the states in this module have been separated into the following four state modules: - :mod:`docker_container ` - States to manage @@ -81,7 +81,7 @@ def __virtual__(): def running(name, **kwargs): ''' - .. deprecated:: Nitrogen + .. deprecated:: 2017.7.0 This state has been moved to :py:func:`docker_container.running `. ''' @@ -101,7 +101,7 @@ def running(name, **kwargs): def stopped(**kwargs): ''' - .. deprecated:: Nitrogen + .. deprecated:: 2017.7.0 This state has been moved to :py:func:`docker_container.stopped `. ''' @@ -120,7 +120,7 @@ def stopped(**kwargs): def absent(name, **kwargs): ''' - .. deprecated:: Nitrogen + .. deprecated:: 2017.7.0 This state has been moved to :py:func:`docker_container.absent `. ''' @@ -140,7 +140,7 @@ def absent(name, **kwargs): def network_present(name, **kwargs): ''' - .. deprecated:: Nitrogen + .. deprecated:: 2017.7.0 This state has been moved to :py:func:`docker_network.present `. ''' @@ -160,7 +160,7 @@ def network_present(name, **kwargs): def network_absent(name, **kwargs): ''' - .. deprecated:: Nitrogen + .. deprecated:: 2017.7.0 This state has been moved to :py:func:`docker_network.absent `. ''' @@ -180,7 +180,7 @@ def network_absent(name, **kwargs): def image_present(name, **kwargs): ''' - .. deprecated:: Nitrogen + .. deprecated:: 2017.7.0 This state has been moved to :py:func:`docker_image.present `. ''' @@ -200,7 +200,7 @@ def image_present(name, **kwargs): def image_absent(**kwargs): ''' - .. deprecated:: Nitrogen + .. deprecated:: 2017.7.0 This state has been moved to :py:func:`docker_image.absent `. ''' @@ -219,7 +219,7 @@ def image_absent(**kwargs): def volume_present(name, driver=None, driver_opts=None, force=False): ''' - .. deprecated:: Nitrogen + .. deprecated:: 2017.7.0 This state has been moved to :py:func:`docker_volume.present `. ''' @@ -239,7 +239,7 @@ def volume_present(name, driver=None, driver_opts=None, force=False): def volume_absent(name, driver=None): ''' - .. deprecated:: Nitrogen + .. deprecated:: 2017.7.0 This state has been moved to :py:func:`docker_volume.absent `. ''' diff --git a/salt/states/docker_container.py b/salt/states/docker_container.py index cf043148f1..b8eae874fc 100644 --- a/salt/states/docker_container.py +++ b/salt/states/docker_container.py @@ -2,7 +2,7 @@ ''' Management of Docker containers -.. versionadded:: Nitrogen +.. versionadded:: 2017.7.0 :depends: docker_ Python module @@ -28,9 +28,9 @@ Management of Docker containers .. _docker-py: https://pypi.python.org/pypi/docker-py These states were moved from the :mod:`docker ` state -module (formerly called **dockerng**) in the Nitrogen release. When running the +module (formerly called **dockerng**) in the 2017.7.0 release. When running the :py:func:`docker_container.running ` -state for the first time after upgrading to Nitrogen, your container(s) may be +state for the first time after upgrading to 2017.7.0, your container(s) may be replaced. The changes may show diffs for certain parameters which say that the old value was an empty string, and the new value is ``None``. This is due to the fact that in prior releases Salt was passing empty strings for these values @@ -254,7 +254,7 @@ def running(name, ` as the ``timeout`` value, telling Docker how long to wait for a graceful shutdown before killing the container. - .. versionchanged:: Nitrogen + .. versionchanged:: 2017.7.0 This option was renamed from ``stop_timeout`` to ``shutdown_timeout`` to acommodate the ``stop_timeout`` container configuration setting. @@ -1322,7 +1322,7 @@ def running(name, - stop_timeout: 5 .. note:: - In releases prior to Nitrogen, this option was not set in the + In releases prior to 2017.7.0, this option was not set in the container configuration, but rather this timeout was enforced only when shutting down an existing container to replace it. To remove the ambiguity, and to allow for the container to have a stop diff --git a/salt/states/docker_image.py b/salt/states/docker_image.py index 7fb6a7b887..e3c1a37779 100644 --- a/salt/states/docker_image.py +++ b/salt/states/docker_image.py @@ -2,7 +2,7 @@ ''' Management of Docker images -.. versionadded:: Nitrogen +.. versionadded:: 2017.7.0 :depends: docker_ Python module @@ -28,7 +28,7 @@ Management of Docker images .. _docker-py: https://pypi.python.org/pypi/docker-py These states were moved from the :mod:`docker ` state -module (formerly called **dockerng**) in the Nitrogen release. +module (formerly called **dockerng**) in the 2017.7.0 release. .. note:: To pull from a Docker registry, authentication must be configured. See @@ -148,17 +148,17 @@ def present(name, - base: centos - saltenv: base - .. versionadded: Nitrogen + .. versionadded: 2017.7.0 base Base image with which to start ``dockerng.sls_build`` - .. versionadded: Nitrogen + .. versionadded: 2017.7.0 saltenv environment from which to pull sls files for ``dockerng.sls_build``. - .. versionadded: Nitrogen + .. versionadded: 2017.7.0 ''' ret = {'name': name, 'changes': {}, diff --git a/salt/states/docker_network.py b/salt/states/docker_network.py index e85c771704..5faf35d55e 100644 --- a/salt/states/docker_network.py +++ b/salt/states/docker_network.py @@ -2,7 +2,7 @@ ''' Management of Docker networks -.. versionadded:: Nitrogen +.. versionadded:: 2017.7.0 :depends: docker_ Python module @@ -28,7 +28,7 @@ Management of Docker networks .. _docker-py: https://pypi.python.org/pypi/docker-py These states were moved from the :mod:`docker ` state -module (formerly called **dockerng**) in the Nitrogen release. +module (formerly called **dockerng**) in the 2017.7.0 release. ''' from __future__ import absolute_import import logging diff --git a/salt/states/docker_volume.py b/salt/states/docker_volume.py index ce15967a59..84a4f2154d 100644 --- a/salt/states/docker_volume.py +++ b/salt/states/docker_volume.py @@ -2,7 +2,7 @@ ''' Management of Docker volumes -.. versionadded:: Nitrogen +.. versionadded:: 2017.7.0 :depends: docker_ Python module @@ -28,7 +28,7 @@ Management of Docker volumes .. _docker-py: https://pypi.python.org/pypi/docker-py These states were moved from the :mod:`docker ` state -module (formerly called **dockerng**) in the Nitrogen release. +module (formerly called **dockerng**) in the 2017.7.0 release. ''' from __future__ import absolute_import import logging @@ -75,7 +75,7 @@ def present(name, driver=None, driver_opts=None, force=False): This state no longer deletes and re-creates a volume if the existing volume's driver does not match the ``driver`` parameter (unless the ``force`` parameter is set to ``True``). - .. versionchanged:: Nitrogen + .. versionchanged:: 2017.7.0 This state was renamed from **docker.volume_present** to **docker_volume.present** name @@ -197,7 +197,7 @@ def absent(name, driver=None): Ensure that a volume is absent. .. versionadded:: 2015.8.4 - .. versionchanged:: Nitrogen + .. versionchanged:: 2017.7.0 This state was renamed from **docker.volume_absent** to **docker_volume.absent** name diff --git a/salt/states/elasticsearch.py b/salt/states/elasticsearch.py index 29fbae4256..2c37a304ce 100644 --- a/salt/states/elasticsearch.py +++ b/salt/states/elasticsearch.py @@ -2,7 +2,7 @@ ''' State module to manage Elasticsearch. -.. versionadded:: Nitrogen +.. versionadded:: 2017.7.0 ''' # Import python libs diff --git a/salt/states/elasticsearch_index.py b/salt/states/elasticsearch_index.py index 5b4662ce71..bd4c3d1732 100644 --- a/salt/states/elasticsearch_index.py +++ b/salt/states/elasticsearch_index.py @@ -3,7 +3,7 @@ State module to manage Elasticsearch indices .. versionadded:: 2015.8.0 -.. deprecated:: Nitrogen Use elasticsearch state instead +.. deprecated:: 2017.7.0 Use elasticsearch state instead ''' # Import python libs diff --git a/salt/states/elasticsearch_index_template.py b/salt/states/elasticsearch_index_template.py index a503a9b3fa..8bb0d7f2ee 100644 --- a/salt/states/elasticsearch_index_template.py +++ b/salt/states/elasticsearch_index_template.py @@ -3,7 +3,7 @@ State module to manage Elasticsearch index templates .. versionadded:: 2015.8.0 -.. deprecated:: Nitrogen Use elasticsearch state instead +.. deprecated:: 2017.7.0 Use elasticsearch state instead ''' # Import python libs diff --git a/salt/states/file.py b/salt/states/file.py index 78f7807950..84a6f12d5b 100644 --- a/salt/states/file.py +++ b/salt/states/file.py @@ -1934,14 +1934,14 @@ def managed(name, See https://docs.python.org/3/library/codecs.html#standard-encodings for available encodings. - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 encoding_errors : 'strict' Error encoding scheme. Default is ```'strict'```. See https://docs.python.org/2/library/codecs.html#codec-base-classes for the list of available schemes. - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 allow_empty : True .. versionadded:: 2015.8.4 @@ -2014,26 +2014,30 @@ def managed(name, The owner of the directory. If this is not passed, user will be used. If user is not passed, the account under which Salt is running will be used. - .. versionadded:: Nitrogen + + .. versionadded:: 2017.7.0 win_perms : None A dictionary containing permissions to grant and their propagation. For example: ``{'Administrators': {'perms': 'full_control'}}`` Can be a single basic perm or a list of advanced perms. ``perms`` must be specified. ``applies_to`` does not apply to file objects. - .. versionadded:: Nitrogen + + .. versionadded:: 2017.7.0 win_deny_perms : None A dictionary containing permissions to deny and their propagation. For example: ``{'Administrators': {'perms': 'full_control'}}`` Can be a single basic perm or a list of advanced perms. ``perms`` must be specified. ``applies_to`` does not apply to file objects. - .. versionadded:: Nitrogen + + .. versionadded:: 2017.7.0 win_inheritance : True True to inherit permissions from the parent directory, False not to inherit permission. - .. versionadded:: Nitrogen + + .. versionadded:: 2017.7.0 Here's an example using the above ``win_*`` parameters: @@ -2696,7 +2700,8 @@ def directory(name, The owner of the directory. If this is not passed, user will be used. If user is not passed, the account under which Salt is running will be used. - .. versionadded:: Nitrogen + + .. versionadded:: 2017.7.0 win_perms : None A dictionary containing permissions to grant and their propagation. For @@ -2704,19 +2709,22 @@ def directory(name, 'this_folder_only'}}`` Can be a single basic perm or a list of advanced perms. ``perms`` must be specified. ``applies_to`` is optional and defaults to ``this_folder_subfoler_files``. - .. versionadded:: Nitrogen + + .. versionadded:: 2017.7.0 win_deny_perms : None A dictionary containing permissions to deny and their propagation. For example: ``{'Administrators': {'perms': 'full_control', 'applies_to': 'this_folder_only'}}`` Can be a single basic perm or a list of advanced perms. - .. versionadded:: Nitrogen + + .. versionadded:: 2017.7.0 win_inheritance : True True to inherit permissions from the parent directory, False not to inherit permission. - .. versionadded:: Nitrogen + + .. versionadded:: 2017.7.0 Here's an example using the above ``win_*`` parameters: @@ -5568,14 +5576,14 @@ def serialize(name, See https://docs.python.org/3/library/codecs.html#standard-encodings for available encodings. - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 encoding_errors : 'strict' Error encoding scheme. Default is ```'strict'```. See https://docs.python.org/2/library/codecs.html#codec-base-classes for the list of available schemes. - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 user The user to own the directory, this defaults to the user salt is diff --git a/salt/states/git.py b/salt/states/git.py index 317800e649..7a710fee10 100644 --- a/salt/states/git.py +++ b/salt/states/git.py @@ -511,13 +511,13 @@ def latest(name, A glob expression defining which branches to retrieve when fetching. See `git-fetch(1)`_ for more information on how refspecs work. - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 refspec_tag : * A glob expression defining which tags to retrieve when fetching. See `git-fetch(1)`_ for more information on how refspecs work. - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 .. _`git-fetch(1)`: http://git-scm.com/docs/git-fetch @@ -2036,7 +2036,7 @@ def detached(name, and checked out. ref - .. deprecated:: Nitrogen + .. deprecated:: 2017.7.0 Use ``rev`` instead. target diff --git a/salt/states/github.py b/salt/states/github.py index a744bdc3a9..4b84ca77a5 100644 --- a/salt/states/github.py +++ b/salt/states/github.py @@ -524,7 +524,7 @@ def repo_present( The teams for which this repo should belong to, specified as a dict of team name to permission ('pull', 'push' or 'admin'). - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 Example: diff --git a/salt/states/grafana4_dashboard.py b/salt/states/grafana4_dashboard.py index 8dc575665e..0f3318c3b8 100644 --- a/salt/states/grafana4_dashboard.py +++ b/salt/states/grafana4_dashboard.py @@ -2,7 +2,7 @@ ''' Manage Grafana v4.0 Dashboards -.. versionadded:: Nitrogen +.. versionadded:: 2017.7.0 .. code-block:: yaml diff --git a/salt/states/grafana4_datasource.py b/salt/states/grafana4_datasource.py index 9d5d40b242..7ae3ef3e95 100644 --- a/salt/states/grafana4_datasource.py +++ b/salt/states/grafana4_datasource.py @@ -2,7 +2,7 @@ ''' Manage Grafana v4.0 data sources -.. versionadded:: Nitrogen +.. versionadded:: 2017.7.0 Token auth setup diff --git a/salt/states/grafana4_org.py b/salt/states/grafana4_org.py index efbd200597..08376ba5cd 100644 --- a/salt/states/grafana4_org.py +++ b/salt/states/grafana4_org.py @@ -2,7 +2,7 @@ ''' Manage Grafana v4.0 orgs -.. versionadded:: Nitrogen +.. versionadded:: 2017.7.0 Token auth setup diff --git a/salt/states/grafana4_user.py b/salt/states/grafana4_user.py index ae7ede7780..ce1a46c50b 100644 --- a/salt/states/grafana4_user.py +++ b/salt/states/grafana4_user.py @@ -2,7 +2,7 @@ ''' Manage Grafana v4.0 users -.. versionadded:: Nitrogen +.. versionadded:: 2017.7.0 Token auth setup diff --git a/salt/states/heat.py b/salt/states/heat.py index f7d1e02093..c5f40f1687 100644 --- a/salt/states/heat.py +++ b/salt/states/heat.py @@ -3,7 +3,7 @@ Management of Heat ================== -.. versionadded:: Nitrogen +.. versionadded:: 2017.7.0 :depends: - heat Python module :configuration: See :py:mod:`salt.modules.heat` for setup instructions. diff --git a/salt/states/hg.py b/salt/states/hg.py index 0d74373fae..0b6425d863 100644 --- a/salt/states/hg.py +++ b/salt/states/hg.py @@ -83,7 +83,7 @@ def latest(name, update_head Should we update the head if new changes are found? Defaults to True - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 ''' ret = {'name': name, 'result': True, 'comment': '', 'changes': {}} diff --git a/salt/states/icinga2.py b/salt/states/icinga2.py index cd8f3b049e..fe2b75b5bb 100644 --- a/salt/states/icinga2.py +++ b/salt/states/icinga2.py @@ -3,7 +3,7 @@ Icinga2 state ============= -.. versionadded:: Nitrogen +.. versionadded:: 2017.7.0 :depends: - Icinga2 Python module :configuration: See :py:mod:`salt.modules.icinga2` for setup instructions. diff --git a/salt/states/influxdb_continuous_query.py b/salt/states/influxdb_continuous_query.py index 6750144def..bf585adc7b 100644 --- a/salt/states/influxdb_continuous_query.py +++ b/salt/states/influxdb_continuous_query.py @@ -3,7 +3,7 @@ Management of Influxdb continuous queries ========================================= -.. versionadded:: Nitrogen +.. versionadded:: 2017.7.0 (compatible with InfluxDB version 0.9+) ''' diff --git a/salt/states/influxdb_retention_policy.py b/salt/states/influxdb_retention_policy.py index d66322c793..3fc7853465 100644 --- a/salt/states/influxdb_retention_policy.py +++ b/salt/states/influxdb_retention_policy.py @@ -3,7 +3,7 @@ Management of Influxdb retention policies ========================================= -.. versionadded:: Nitrogen +.. versionadded:: 2017.7.0 (compatible with InfluxDB version 0.9+) ''' diff --git a/salt/states/logrotate.py b/salt/states/logrotate.py index f3bebbf05a..bfee6de49e 100644 --- a/salt/states/logrotate.py +++ b/salt/states/logrotate.py @@ -2,7 +2,7 @@ ''' Module for managing logrotate. -.. versionadded:: Nitrogen +.. versionadded:: 2017.7.0 ''' diff --git a/salt/states/loop.py b/salt/states/loop.py index 4c8343e01a..331292abc0 100644 --- a/salt/states/loop.py +++ b/salt/states/loop.py @@ -4,7 +4,7 @@ Loop state Allows for looping over execution modules. -.. versionadded:: Nitrogen +.. versionadded:: 2017.7.0 .. code-block:: yaml diff --git a/salt/states/modjk_worker.py b/salt/states/modjk_worker.py index f7faa7c94e..f902d99c0a 100644 --- a/salt/states/modjk_worker.py +++ b/salt/states/modjk_worker.py @@ -174,7 +174,7 @@ def _talk2modjk(name, lbn, target, action, profile='default', tgt_type='glob'): def stop(name, lbn, target, profile='default', tgt_type='glob', expr_form=None): ''' - .. versionchanged:: Nitrogen + .. versionchanged:: 2017.7.0 The ``expr_form`` argument has been renamed to ``tgt_type``, earlier releases must use ``expr_form``. @@ -208,7 +208,7 @@ def stop(name, lbn, target, profile='default', tgt_type='glob', expr_form=None): def activate(name, lbn, target, profile='default', tgt_type='glob', expr_form=None): ''' - .. versionchanged:: Nitrogen + .. versionchanged:: 2017.7.0 The ``expr_form`` argument has been renamed to ``tgt_type``, earlier releases must use ``expr_form``. @@ -242,7 +242,7 @@ def activate(name, lbn, target, profile='default', tgt_type='glob', expr_form=No def disable(name, lbn, target, profile='default', tgt_type='glob', expr_form=None): ''' - .. versionchanged:: Nitrogen + .. versionchanged:: 2017.7.0 The ``expr_form`` argument has been renamed to ``tgt_type``, earlier releases must use ``expr_form``. diff --git a/salt/states/module.py b/salt/states/module.py index 1281a37374..6fd9f541cf 100644 --- a/salt/states/module.py +++ b/salt/states/module.py @@ -337,7 +337,7 @@ def _call_function(name, returner=None, **kwargs): def _run(name, **kwargs): ''' - .. deprecated:: Nitrogen + .. deprecated:: 2017.7.0 Function name stays the same, behaviour will change. Run a single module function diff --git a/salt/states/msteams.py b/salt/states/msteams.py index 39e4f37c77..59715bb6cb 100644 --- a/salt/states/msteams.py +++ b/salt/states/msteams.py @@ -3,7 +3,7 @@ Send a message card to Microsoft Teams ======================= This state is useful for sending messages to Teams during state runs. -.. versionadded:: Nitrogen +.. versionadded:: 2017.7.0 .. code-block:: yaml teams-message: msteams.post_card: diff --git a/salt/states/mysql_query.py b/salt/states/mysql_query.py index 597bc8302d..b2ea6c1c3c 100644 --- a/salt/states/mysql_query.py +++ b/salt/states/mysql_query.py @@ -84,7 +84,7 @@ def run_file(name, overwrite: The file or grain will be overwritten if it already exists (default) - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 ''' ret = {'name': name, 'changes': {}, diff --git a/salt/states/netacl.py b/salt/states/netacl.py index b69361c598..df97c76b6e 100644 --- a/salt/states/netacl.py +++ b/salt/states/netacl.py @@ -8,7 +8,7 @@ The firewall configuration is generated by Capirca_. .. _Capirca: https://github.com/google/capirca -.. versionadded:: Nitrogen +.. versionadded:: 2017.7.0 :codeauthor: Mircea Ulinic :maturity: new diff --git a/salt/states/netconfig.py b/salt/states/netconfig.py index dbd4e655eb..9318e227b4 100644 --- a/salt/states/netconfig.py +++ b/salt/states/netconfig.py @@ -15,7 +15,7 @@ Dependencies - :mod:`NAPALM proxy minion ` - :mod:`Network-related basic features execution module ` -.. versionadded:: Nitrogen +.. versionadded:: 2017.7.0 ''' from __future__ import absolute_import diff --git a/salt/states/netyang.py b/salt/states/netyang.py index 3a2ecd0e93..e39b09b3b9 100644 --- a/salt/states/netyang.py +++ b/salt/states/netyang.py @@ -6,7 +6,7 @@ NAPALM YANG state Manage the configuration of network devices according to the YANG models (OpenConfig/IETF). -.. versionadded:: Nitrogen +.. versionadded:: 2017.7.0 Dependencies ------------ diff --git a/salt/states/pdbedit.py b/salt/states/pdbedit.py index a6600bd725..9b4c7b0b98 100644 --- a/salt/states/pdbedit.py +++ b/salt/states/pdbedit.py @@ -7,7 +7,7 @@ Manage accounts in Samba's passdb using pdbedit :depends: pdbedit :platform: posix -.. versionadded:: nitrogen +.. versionadded:: 2017.7.0 .. code-block:: yaml diff --git a/salt/states/pkg.py b/salt/states/pkg.py index 4e1cba67ab..55a40965e7 100644 --- a/salt/states/pkg.py +++ b/salt/states/pkg.py @@ -968,7 +968,7 @@ def installed( ` in 2014.1.0, and was expanded to :py:func:`Debian/Ubuntu ` and :py:func:`Arch Linux `-based - distros in the Nitrogen release. + distros in the 2017.7.0 release. The version strings returned by either of these functions can be used as version specifiers in pkg states. @@ -990,7 +990,7 @@ def installed( **WILDCARD VERSIONS** - As of the Nitrogen release, this state now supports wildcards in + As of the 2017.7.0 release, this state now supports wildcards in package versions for SUSE SLES/Leap/Tumbleweed, Debian/Ubuntu, RHEL/CentOS, Arch Linux, and their derivatives. Using wildcards can be useful for packages where the release name is built into the version in some way, diff --git a/salt/states/saltmod.py b/salt/states/saltmod.py index f6bfb30ddb..d9cc6ee196 100644 --- a/salt/states/saltmod.py +++ b/salt/states/saltmod.py @@ -102,7 +102,7 @@ def state(name, The target type to resolve, defaults to ``glob`` expr_form - .. deprecated:: Nitrogen + .. deprecated:: 2017.7.0 Use tgt_type instead ret @@ -136,7 +136,7 @@ def state(name, pillarenv The pillar environment to grab pillars from - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 saltenv The default salt environment to pull sls files from @@ -175,7 +175,7 @@ def state(name, subset Number of minions from the targeted set to randomly use - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 Examples: @@ -422,7 +422,7 @@ def function( The target type, defaults to ``glob`` expr_form - .. deprecated:: Nitrogen + .. deprecated:: 2017.7.0 Use tgt_type instead arg @@ -459,7 +459,7 @@ def function( subset Number of minions from the targeted set to randomly use - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 ''' func_ret = {'name': name, diff --git a/salt/states/service.py b/salt/states/service.py index 3b78bc1cfe..895d6b4960 100644 --- a/salt/states/service.py +++ b/salt/states/service.py @@ -360,13 +360,13 @@ def running(name, no_block : False **For systemd minions only.** Starts the service using ``--no-block``. - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 unmask : False **For systemd minions only.** Set to ``True`` to remove an indefinite mask before attempting to start the service. - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 In previous releases, Salt would simply unmask a service before making any changes. This behavior is no longer the default. @@ -374,7 +374,7 @@ def running(name, **For systemd minions only.** Set to ``True`` to remove a runtime mask before attempting to start the service. - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 In previous releases, Salt would simply unmask a service before making any changes. This behavior is no longer the default. @@ -516,12 +516,12 @@ def dead(name, Add a sleep command (in seconds) before the check to make sure service is killed. - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 no_block : False **For systemd minions only.** Stops the service using ``--no-block``. - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 ''' ret = {'name': name, 'changes': {}, @@ -660,7 +660,7 @@ def disabled(name, **kwargs): def masked(name, runtime=False): ''' - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 .. note:: This state is only available on minions which use systemd_. @@ -745,7 +745,7 @@ def masked(name, runtime=False): def unmasked(name, runtime=False): ''' - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 .. note:: This state is only available on minions which use systemd_. diff --git a/salt/states/solrcloud.py b/salt/states/solrcloud.py index 040f05ac67..7e738d2c6f 100644 --- a/salt/states/solrcloud.py +++ b/salt/states/solrcloud.py @@ -2,7 +2,7 @@ ''' States for solrcloud alias and collection configuration -.. versionadded:: Nitrogen +.. versionadded:: 2017.7.0 ''' diff --git a/salt/states/ssh_known_hosts.py b/salt/states/ssh_known_hosts.py index 23e7ad1c4b..0fe24cb813 100644 --- a/salt/states/ssh_known_hosts.py +++ b/salt/states/ssh_known_hosts.py @@ -106,7 +106,7 @@ def present( was originally hashed with. This defaults to ``sha256`` if not specified. .. versionadded:: 2016.11.4 - .. versionchanged:: Nitrogen: default changed from ``md5`` to ``sha256`` + .. versionchanged:: 2017.7.0: default changed from ``md5`` to ``sha256`` ''' ret = {'name': name, diff --git a/salt/states/statuspage.py b/salt/states/statuspage.py index bc1d298efa..a7a04e825f 100644 --- a/salt/states/statuspage.py +++ b/salt/states/statuspage.py @@ -16,7 +16,7 @@ In the minion configuration file, the following block is required: api_key: page_id: -.. versionadded:: Nitrogen +.. versionadded:: 2017.7.0 ''' from __future__ import unicode_literals diff --git a/salt/states/vault.py b/salt/states/vault.py index e0eac5b81d..d86bc4cb0a 100644 --- a/salt/states/vault.py +++ b/salt/states/vault.py @@ -4,7 +4,7 @@ :maturity: new :platform: all -.. versionadded:: Nitrogen +.. versionadded:: 2017.7.0 States for managing Hashicorp Vault. Currently handles policies. Configuration instructions are documented in the execution module docs. diff --git a/salt/states/virtualenv_mod.py b/salt/states/virtualenv_mod.py index 041186a6d1..81ee1707e8 100644 --- a/salt/states/virtualenv_mod.py +++ b/salt/states/virtualenv_mod.py @@ -113,7 +113,7 @@ def managed(name, process_dependency_links: False Run pip install with the --process_dependency_links flag. - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 Also accepts any kwargs that the virtualenv module will. However, some kwargs, such as the ``pip`` option, require ``- distribute: True``. diff --git a/salt/states/win_iis.py b/salt/states/win_iis.py index 869c8d6e2d..614236afc1 100644 --- a/salt/states/win_iis.py +++ b/salt/states/win_iis.py @@ -784,7 +784,7 @@ def set_app(name, site, settings=None): : userName: "connectAs" user : password: "connectAs" password for user :rtype: bool - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 Example of usage: .. code-block:: yaml diff --git a/salt/states/win_wua.py b/salt/states/win_wua.py index 6b0d1c26db..835dea28ce 100644 --- a/salt/states/win_wua.py +++ b/salt/states/win_wua.py @@ -2,7 +2,7 @@ ''' Installation of Windows Updates using the Windows Update Agent -.. versionadded:: Nitrogen +.. versionadded:: 2017.7.0 Salt can manage Windows updates via the "wua" state module. Updates can be installed and removed. Update management declarations are as follows: diff --git a/salt/states/zabbix_host.py b/salt/states/zabbix_host.py index 211fa285cd..7220297db2 100644 --- a/salt/states/zabbix_host.py +++ b/salt/states/zabbix_host.py @@ -368,7 +368,7 @@ def assign_templates(host, templates, **kwargs): ''' Ensures that templates are assigned to the host. - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 :param host: technical name of the host :param _connection_user: Optional - zabbix user (can also be set in opts or pillar, see module's docstring) diff --git a/salt/states/zone.py b/salt/states/zone.py index 30d4686174..22900f89c5 100644 --- a/salt/states/zone.py +++ b/salt/states/zone.py @@ -7,7 +7,7 @@ Management of Solaris Zones :depends: salt.modules.zoneadm, salt.modules.zonecfg :platform: solaris -.. versionadded:: nitrogen +.. versionadded:: 2017.7.0 Bellow are some examples of how to use this state. Lets start with creating a zone and installing it. diff --git a/salt/utils/__init__.py b/salt/utils/__init__.py index f7725f08af..b39fda4165 100644 --- a/salt/utils/__init__.py +++ b/salt/utils/__init__.py @@ -2204,19 +2204,31 @@ def parse_docstring(docstring): return ret -def print_cli(msg): +def print_cli(msg, retries=10, step=0.01): ''' Wrapper around print() that suppresses tracebacks on broken pipes (i.e. when salt output is piped to less and less is stopped prematurely). ''' - try: + while retries: try: - print(msg) - except UnicodeEncodeError: - print(msg.encode('utf-8')) - except IOError as exc: - if exc.errno != errno.EPIPE: - raise + try: + print(msg) + except UnicodeEncodeError: + print(msg.encode('utf-8')) + except IOError as exc: + err = "{0}".format(exc) + if exc.errno != errno.EPIPE: + if ( + ("temporarily unavailable" in err or + exc.errno in (errno.EAGAIN,)) and + retries + ): + time.sleep(step) + retries -= 1 + continue + else: + raise + break def safe_walk(top, topdown=True, onerror=None, followlinks=True, _seen=None): diff --git a/salt/utils/crypt.py b/salt/utils/crypt.py index 574689f90c..51003b939e 100644 --- a/salt/utils/crypt.py +++ b/salt/utils/crypt.py @@ -19,7 +19,7 @@ def decrypt(data, opts=None, valid_rend=None): ''' - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 Decrypt a data structure using the specified renderer. Written originally as a common codebase to handle decryption of encrypted elements within diff --git a/salt/utils/dictupdate.py b/salt/utils/dictupdate.py index 04580350be..1d744dcc85 100644 --- a/salt/utils/dictupdate.py +++ b/salt/utils/dictupdate.py @@ -27,8 +27,13 @@ def update(dest, upd, recursive_update=True, merge_lists=False): on a manual merge (helpful for non-dict types like FunctionWrapper) If merge_lists=True, will aggregate list object types instead of replace. - This behavior is only activated when recursive_update=True. By default - merge_lists=False. + The list in ``upd`` is added to the list in ``dest``, so the resulting list + is ``dest[key] + upd[key]``. This behavior is only activated when + recursive_update=True. By default merge_lists=False. + + .. versionchanged: 2016.11.6 + When merging lists, duplicate values are removed. Values already + present in the ``dest`` list are not added from the ``upd`` list. ''' if (not isinstance(dest, collections.Mapping)) \ or (not isinstance(upd, collections.Mapping)): @@ -50,7 +55,9 @@ def update(dest, upd, recursive_update=True, merge_lists=False): elif isinstance(dest_subkey, list) \ and isinstance(val, list): if merge_lists: - dest[key] = dest.get(key, []) + val + merged = copy.deepcopy(dest_subkey) + merged.extend([x for x in val if x not in merged]) + dest[key] = merged else: dest[key] = upd[key] else: diff --git a/salt/utils/jinja.py b/salt/utils/jinja.py index 563b37cc0f..e8e379c8fc 100644 --- a/salt/utils/jinja.py +++ b/salt/utils/jinja.py @@ -692,7 +692,7 @@ class SerializerExtension(Extension, object): ** Escape Filters ** - ..versionadded:: Nitrogen + .. versionadded:: 2017.7.0 Allows escaping of strings so they can be interpreted literally by another function. @@ -709,7 +709,7 @@ class SerializerExtension(Extension, object): ** Set Theory Filters ** - ..versionadded:: Nitrogen + .. versionadded:: 2017.7.0 Performs set math using Jinja filters. diff --git a/salt/utils/napalm.py b/salt/utils/napalm.py index 0ef3569e90..c69a92432e 100644 --- a/salt/utils/napalm.py +++ b/salt/utils/napalm.py @@ -12,7 +12,7 @@ Utils for the NAPALM modules and proxy. - :mod:`SNMP configuration module ` - :mod:`Users configuration management ` -.. versionadded:: Nitrogen +.. versionadded:: 2017.7.0 ''' from __future__ import absolute_import diff --git a/salt/utils/openstack/nova.py b/salt/utils/openstack/nova.py index e922386a88..82deb5769c 100644 --- a/salt/utils/openstack/nova.py +++ b/salt/utils/openstack/nova.py @@ -45,6 +45,7 @@ log = logging.getLogger(__name__) # Version added to novaclient.client.Client function NOVACLIENT_MINVER = '2.6.1' +NOVACLIENT_MAXVER = '6.0.1' # dict for block_device_mapping_v2 CLIENT_BDM2_KEYS = { @@ -65,8 +66,12 @@ def check_nova(): if HAS_NOVA: novaclient_ver = _LooseVersion(novaclient.__version__) min_ver = _LooseVersion(NOVACLIENT_MINVER) - if novaclient_ver >= min_ver: + max_ver = _LooseVersion(NOVACLIENT_MAXVER) + if novaclient_ver >= min_ver and novaclient_ver <= max_ver: return HAS_NOVA + elif novaclient_ver > max_ver: + log.debug('Older novaclient version required. Maximum: {0}'.format(NOVACLIENT_MAXVER)) + return False log.debug('Newer novaclient version required. Minimum: {0}'.format(NOVACLIENT_MINVER)) return False @@ -1145,7 +1150,14 @@ class SaltNova(object): floating_ips = nt_ks.floating_ips.list() for floating_ip in floating_ips: if floating_ip.ip == ip: - return floating_ip + response = { + 'ip': floating_ip.ip, + 'fixed_ip': floating_ip.fixed_ip, + 'id': floating_ip.id, + 'instance_id': floating_ip.instance_id, + 'pool': floating_ip.pool + } + return response return {} def floating_ip_create(self, pool=None): diff --git a/salt/utils/schedule.py b/salt/utils/schedule.py index d3155df618..117914a12e 100644 --- a/salt/utils/schedule.py +++ b/salt/utils/schedule.py @@ -887,21 +887,28 @@ class Schedule(object): try: # Only attempt to return data to the master # if the scheduled job is running on a minion. - if '__role' in self.opts and self.opts['__role'] == 'minion': - if 'return_job' in data and not data['return_job']: - pass - else: - # Send back to master so the job is included in the job list - mret = ret.copy() - mret['jid'] = 'req' - if data.get('return_job') == 'nocache': - # overwrite 'req' to signal to master that this job shouldn't be stored - mret['jid'] = 'nocache' - event = salt.utils.event.get_event('minion', opts=self.opts, listen=False) - load = {'cmd': '_return', 'id': self.opts['id']} - for key, value in six.iteritems(mret): - load[key] = value - event.fire_event(load, '__schedule_return') + if 'return_job' in data and not data['return_job']: + pass + else: + # Send back to master so the job is included in the job list + mret = ret.copy() + mret['jid'] = 'req' + if data.get('return_job') == 'nocache': + # overwrite 'req' to signal to master that + # this job shouldn't be stored + mret['jid'] = 'nocache' + load = {'cmd': '_return', 'id': self.opts['id']} + for key, value in six.iteritems(mret): + load[key] = value + + if '__role' in self.opts and self.opts['__role'] == 'minion': + event = salt.utils.event.get_event('minion', + opts=self.opts, + listen=False) + elif '__role' in self.opts and self.opts['__role'] == 'master': + event = salt.utils.event.get_master_event(self.opts, + self.opts['sock_dir']) + event.fire_event(load, '__schedule_return') log.debug('schedule.handle_func: Removing {0}'.format(proc_fn)) os.unlink(proc_fn) diff --git a/salt/utils/timed_subprocess.py b/salt/utils/timed_subprocess.py index 1890e38bd7..d77f3ca0cc 100644 --- a/salt/utils/timed_subprocess.py +++ b/salt/utils/timed_subprocess.py @@ -2,6 +2,7 @@ '''For running command line executables with a timeout''' from __future__ import absolute_import +import shlex import subprocess import threading import salt.exceptions @@ -40,13 +41,29 @@ class TimedProc(object): try: self.process = subprocess.Popen(args, **kwargs) except TypeError: - str_args = [] - for arg in args: - if not isinstance(arg, six.string_types): - str_args.append(str(arg)) - else: - str_args.append(arg) - args = str_args + if not kwargs.get('shell', False): + if not isinstance(args, (list, tuple)): + try: + args = shlex.split(args) + except AttributeError: + args = shlex.split(str(args)) + str_args = [] + for arg in args: + if not isinstance(arg, six.string_types): + str_args.append(str(arg)) + else: + str_args.append(arg) + args = str_args + else: + if not isinstance(args, (list, tuple, six.string_types)): + # Handle corner case where someone does a 'cmd.run 3' + args = str(args) + # Ensure that environment variables are strings + for key, val in six.iteritems(kwargs.get('env', {})): + if not isinstance(val, six.string_types): + kwargs['env'][key] = str(val) + if not isinstance(key, six.string_types): + kwargs['env'][str(key)] = kwargs['env'].pop(key) self.process = subprocess.Popen(args, **kwargs) self.command = args diff --git a/salt/utils/vmware.py b/salt/utils/vmware.py index 48c14fd86c..19292f2128 100644 --- a/salt/utils/vmware.py +++ b/salt/utils/vmware.py @@ -988,7 +988,7 @@ def create_datacenter(service_instance, datacenter_name): ''' Creates a datacenter. - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 service_instance The Service Instance Object diff --git a/salt/version.py b/salt/version.py index 3118410c11..89df51200a 100644 --- a/salt/version.py +++ b/salt/version.py @@ -93,7 +93,7 @@ class SaltStackVersion(object): 'Beryllium' : (2015, 8), 'Boron' : (2016, 3), 'Carbon' : (2016, 11), - 'Nitrogen' : (MAX_SIZE - 102, 0), + 'Nitrogen' : (2017, 7), 'Oxygen' : (MAX_SIZE - 101, 0), 'Fluorine' : (MAX_SIZE - 100, 0), 'Neon' : (MAX_SIZE - 99, 0), diff --git a/tests/integration/files/file/base/_modules/runtests_helpers.py b/tests/integration/files/file/base/_modules/runtests_helpers.py index 44b0319d59..0aa5df742a 100644 --- a/tests/integration/files/file/base/_modules/runtests_helpers.py +++ b/tests/integration/files/file/base/_modules/runtests_helpers.py @@ -109,13 +109,10 @@ def get_invalid_docs(): 'missing_cli_example': sorted(noexample)} -def modules_available(names): +def modules_available(*names): ''' Returns a list of modules not available. Empty list if modules are all available ''' - if isinstance(names, six.string_types): - names = [names] - not_found = [] for name in names: if '.' not in name: diff --git a/tests/integration/shell/test_enabled.py b/tests/integration/shell/test_enabled.py index 4e155cfca3..1b3685dfaf 100644 --- a/tests/integration/shell/test_enabled.py +++ b/tests/integration/shell/test_enabled.py @@ -47,8 +47,8 @@ class EnabledTest(ModuleCase): Test cmd.shell works correctly when using a template. Note: This test used to test that python_shell defaulted to True for templates - in releases before Nitrogen. The cmd.run --> cmd.shell aliasing was removed in - Nitrogen. Templates should now be using cmd.shell. + in releases before 2017.7.0. The cmd.run --> cmd.shell aliasing was removed in + 2017.7.0. Templates should now be using cmd.shell. ''' state_name = 'template_shell_enabled' state_filename = state_name + '.sls' @@ -75,7 +75,7 @@ class EnabledTest(ModuleCase): def test_template_default_disabled(self): ''' test shell disabled output for templates (python_shell=False is the default - beginning with the Nitrogen release). + beginning with the 2017.7.0 release). ''' state_name = 'template_shell_disabled' state_filename = state_name + '.sls' diff --git a/tests/integration/shell/test_master.py b/tests/integration/shell/test_master.py index bd21bc8376..1a3bfdd203 100644 --- a/tests/integration/shell/test_master.py +++ b/tests/integration/shell/test_master.py @@ -165,17 +165,21 @@ class MasterTest(ShellCase, testprogram.TestProgramCase, ShellCaseCommonTestsMix master.shutdown(wait_for_orphans=3) # Do the test again to check does master shut down correctly - stdout, stderr, status = master.run( - args=['-d'], - catch_stderr=True, - with_retcode=True, - ) - try: - self.assert_exit_status( - status, 'EX_OK', - message='correct usage', - stdout=stdout, - stderr=tests.integration.utils.decode_byte_list(stderr) - ) - finally: - master.shutdown(wait_for_orphans=3) + # **Due to some underlying subprocessing issues with Minion._thread_return, this + # part of the test has been commented out. Once these underlying issues have + # been addressed, this part of the test should be uncommented. Work for this + # issue is being tracked in https://github.com/saltstack/salt-jenkins/issues/378 + # stdout, stderr, status = master.run( + # args=['-d'], + # catch_stderr=True, + # with_retcode=True, + # ) + # try: + # self.assert_exit_status( + # status, 'EX_OK', + # message='correct usage', + # stdout=stdout, + # stderr=tests.integration.utils.decode_byte_list(stderr) + # ) + # finally: + # master.shutdown(wait_for_orphans=3) diff --git a/tests/unit/cloud/clouds/test_dimensiondata.py b/tests/unit/cloud/clouds/test_dimensiondata.py index 2ba960f27d..d771b428bb 100644 --- a/tests/unit/cloud/clouds/test_dimensiondata.py +++ b/tests/unit/cloud/clouds/test_dimensiondata.py @@ -31,8 +31,13 @@ VM_NAME = 'winterfell' # Use certifi if installed try: if HAS_LIBCLOUD: - import certifi - libcloud.security.CA_CERTS_PATH.append(certifi.where()) + # This work-around for Issue #32743 is no longer needed for libcloud >= 1.4.0. + # However, older versions of libcloud must still be supported with this work-around. + # This work-around can be removed when the required minimum version of libcloud is + # 2.0.0 (See PR #40837 - which is implemented in Salt Oxygen). + if LooseVersion(libcloud.__version__) < LooseVersion('1.4.0'): + import certifi + libcloud.security.CA_CERTS_PATH.append(certifi.where()) except (ImportError, NameError): pass diff --git a/tests/unit/cloud/clouds/test_gce.py b/tests/unit/cloud/clouds/test_gce.py index c4de6be65d..e81c24373b 100644 --- a/tests/unit/cloud/clouds/test_gce.py +++ b/tests/unit/cloud/clouds/test_gce.py @@ -36,8 +36,13 @@ DUMMY_TOKEN = { # Use certifi if installed try: if HAS_LIBCLOUD: - import certifi - libcloud.security.CA_CERTS_PATH.append(certifi.where()) + # This work-around for Issue #32743 is no longer needed for libcloud >= 1.4.0. + # However, older versions of libcloud must still be supported with this work-around. + # This work-around can be removed when the required minimum version of libcloud is + # 2.0.0 (See PR #40837 - which is implemented in Salt Oxygen). + if LooseVersion(libcloud.__version__) < LooseVersion('1.4.0'): + import certifi + libcloud.security.CA_CERTS_PATH.append(certifi.where()) except ImportError: pass diff --git a/tests/unit/modules/test_aptpkg.py b/tests/unit/modules/test_aptpkg.py index f2d4e6266d..9c594981bc 100644 --- a/tests/unit/modules/test_aptpkg.py +++ b/tests/unit/modules/test_aptpkg.py @@ -3,7 +3,7 @@ :synopsis: Unit Tests for Advanced Packaging Tool module 'module.aptpkg' :platform: Linux :maturity: develop - versionadded:: nitrogen + versionadded:: 2017.7.0 ''' # Import Python Libs diff --git a/tests/unit/modules/test_win_pki.py b/tests/unit/modules/test_win_pki.py index a59a0d581b..8466da9310 100644 --- a/tests/unit/modules/test_win_pki.py +++ b/tests/unit/modules/test_win_pki.py @@ -3,7 +3,7 @@ :synopsis: Unit Tests for Windows PKI Module 'module.win_pki' :platform: Windows :maturity: develop - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 ''' # Import Python Libs diff --git a/tests/unit/modules/test_win_snmp.py b/tests/unit/modules/test_win_snmp.py index 90e2d08826..9660d5d6a0 100644 --- a/tests/unit/modules/test_win_snmp.py +++ b/tests/unit/modules/test_win_snmp.py @@ -3,7 +3,7 @@ :synopsis: Unit Tests for Windows SNMP Module 'module.win_snmp' :platform: Windows :maturity: develop - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 ''' # Import Python Libs diff --git a/tests/unit/states/test_win_pki.py b/tests/unit/states/test_win_pki.py index 13bdc164dd..751a2df6cc 100644 --- a/tests/unit/states/test_win_pki.py +++ b/tests/unit/states/test_win_pki.py @@ -3,7 +3,7 @@ :synopsis: Unit Tests for Windows PKI Module 'state.win_pki' :platform: Windows :maturity: develop - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 ''' # Import Python Libs diff --git a/tests/unit/states/test_win_snmp.py b/tests/unit/states/test_win_snmp.py index c4753f82d9..3618d01ab0 100644 --- a/tests/unit/states/test_win_snmp.py +++ b/tests/unit/states/test_win_snmp.py @@ -3,7 +3,7 @@ :synopsis: Unit Tests for Windows SNMP Module 'state.win_snmp' :platform: Windows :maturity: develop - .. versionadded:: Nitrogen + .. versionadded:: 2017.7.0 ''' # Import Python Libs diff --git a/tests/unit/utils/test_dictupdate.py b/tests/unit/utils/test_dictupdate.py index be138f5b4c..df482970f7 100644 --- a/tests/unit/utils/test_dictupdate.py +++ b/tests/unit/utils/test_dictupdate.py @@ -39,6 +39,14 @@ class UtilDictupdateTestCase(TestCase): mdict['A'] = [1, 2, 3, 4] self.assertEqual(res, mdict) + # level 1 value changes (list merge, remove duplicates, preserve order) + mdict = copy.deepcopy(self.dict1) + mdict['A'] = [1, 2] + res = dictupdate.update(copy.deepcopy(mdict), {'A': [4, 3, 2, 1]}, + merge_lists=True) + mdict['A'] = [1, 2, 4, 3] + self.assertEqual(res, mdict) + # level 2 value changes mdict = copy.deepcopy(self.dict1) mdict['C']['D'] = 'Z' @@ -61,6 +69,15 @@ class UtilDictupdateTestCase(TestCase): mdict['C']['D'] = ['a', 'b', 'c', 'd'] self.assertEqual(res, mdict) + # level 2 value changes (list merge, remove duplicates, preserve order) + mdict = copy.deepcopy(self.dict1) + mdict['C']['D'] = ['a', 'b'] + res = dictupdate.update(copy.deepcopy(mdict), + {'C': {'D': ['d', 'c', 'b', 'a']}}, + merge_lists=True) + mdict['C']['D'] = ['a', 'b', 'd', 'c'] + self.assertEqual(res, mdict) + # level 3 value changes mdict = copy.deepcopy(self.dict1) mdict['C']['F']['G'] = 'Z' @@ -86,6 +103,14 @@ class UtilDictupdateTestCase(TestCase): mdict['C']['F']['G'] = ['a', 'b', 'c', 'd'] self.assertEqual(res, mdict) + # level 3 value changes (list merge, remove duplicates, preserve order) + mdict = copy.deepcopy(self.dict1) + mdict['C']['F']['G'] = ['a', 'b'] + res = dictupdate.update(copy.deepcopy(mdict), + {'C': {'F': {'G': ['d', 'c', 'b', 'a']}}}, merge_lists=True) + mdict['C']['F']['G'] = ['a', 'b', 'd', 'c'] + self.assertEqual(res, mdict) + # replace a sub-dictionary mdict = copy.deepcopy(self.dict1) mdict['C'] = 'Z'