Clean up Sphinx warnings

This commit is contained in:
Erik Johnson 2018-06-06 00:49:37 -05:00
parent f5fc936865
commit f89d2ccd30
No known key found for this signature in database
GPG key ID: 5E5583C437808F3F
65 changed files with 1394 additions and 1150 deletions

View file

@ -1,7 +1,7 @@
.. _all-salt.cache:
=============
cache modules
Cache Modules
=============
.. currentmodule:: salt.cache
@ -10,6 +10,8 @@ cache modules
:toctree:
:template: autosummary.rst.tmpl
localfs
consul
etcd_cache
localfs
mysql_cache
redis_cache

View file

@ -1,5 +1,5 @@
salt.cache.consul module
========================
salt.cache.consul
=================
.. automodule:: salt.cache.consul
:members:

View file

@ -1,5 +1,5 @@
salt.cache.etcd_cache module
=============================
salt.cache.etcd_cache
=====================
.. automodule:: salt.cache.etcd_cache
:members:

View file

@ -1,5 +1,5 @@
salt.cache.localfs module
=========================
salt.cache.localfs
==================
.. automodule:: salt.cache.localfs
:members:

View file

@ -1,5 +1,5 @@
salt.cache.mysql_cache module
=============================
salt.cache.mysql_cache
======================
.. automodule:: salt.cache.mysql_cache
:members:

View file

@ -1,5 +1,5 @@
salt.cache.redis_cache module
=============================
salt.cache.redis_cache
======================
.. automodule:: salt.cache.redis_cache
:members:

View file

@ -23,6 +23,7 @@ cloud modules
lxc
msazure
nova
oneandone
opennebula
openstack
parallels

View file

@ -1,6 +1,6 @@
===============================
========================
salt.cloud.clouds.aliyun
===============================
========================
.. automodule:: salt.cloud.clouds.aliyun
:members:
:members:

View file

@ -1,5 +1,6 @@
salt.cloud.clouds.vultrpy module
================================
=========================
salt.cloud.clouds.vultrpy
=========================
.. automodule:: salt.cloud.clouds.vultrpy
:members:

View file

@ -428,7 +428,7 @@ to False.
.. conf_master:: color_theme
``color_theme``
---------
---------------
Default: ``""``
@ -728,31 +728,6 @@ master event bus. The value is expressed in bytes.
max_event_size: 1048576
.. conf_master:: ping_on_rotate
``ping_on_rotate``
------------------
.. versionadded:: 2014.7.0
Default: ``False``
By default, the master AES key rotates every 24 hours. The next command
following a key rotation will trigger a key refresh from the minion which may
result in minions which do not respond to the first command after a key refresh.
To tell the master to ping all minions immediately after an AES key refresh, set
ping_on_rotate to ``True``. This should mitigate the issue where a minion does not
appear to initially respond after a key is rotated.
Note that ping_on_rotate may cause high load on the master immediately after
the key rotation event as minions reconnect. Consider this carefully if this
salt master is managing a large number of minions.
.. code-block:: yaml
ping_on_rotate: False
.. conf_master:: master_job_cache
``master_job_cache``
@ -840,6 +815,8 @@ that connect to a master via localhost.
``ping_on_rotate``
------------------
.. versionadded:: 2014.7.0
Default: ``False``
By default, the master AES key rotates every 24 hours. The next command
@ -850,9 +827,9 @@ To tell the master to ping all minions immediately after an AES key refresh,
set ``ping_on_rotate`` to ``True``. This should mitigate the issue where a
minion does not appear to initially respond after a key is rotated.
Note that ping_on_rotate may cause high load on the master immediately after
the key rotation event as minions reconnect. Consider this carefully if this
salt master is managing a large number of minions.
Note that enabling this may cause high load on the master immediately after the
key rotation event as minions reconnect. Consider this carefully if this salt
master is managing a large number of minions.
If disabled, it is recommended to handle this event by listening for the
``aes_key_rotate`` event with the ``key`` tag and acting appropriately.
@ -1085,24 +1062,27 @@ Default settings which will be inherited by all rosters.
Default: ``/etc/salt/roster``
Pass in an alternative location for the salt-ssh `flat` roster file.
Pass in an alternative location for the salt-ssh :py:mod:`flat
<salt.roster.flat>` roster file.
.. code-block:: yaml
roster_file: /root/roster
.. conf_master:: roster_file
.. conf_master:: rosters
``rosters``
---------------
-----------
Default: None
Default: ``None``
Define locations for `flat` roster files so they can be chosen when using Salt API.
An administrator can place roster files into these locations.
Then when calling Salt API, parameter 'roster_file' should contain a relative path to these locations.
That is, "roster_file=/foo/roster" will be resolved as "/etc/salt/roster.d/foo/roster" etc.
This feature prevents passing insecure custom rosters through the Salt API.
Define locations for :py:mod:`flat <salt.roster.flat>` roster files so they can
be chosen when using Salt API. An administrator can place roster files into
these locations. Then, when calling Salt API, the :conf_master:`roster_file`
parameter should contain a relative path to these locations. That is,
``roster_file=/foo/roster`` will be resolved as
``/etc/salt/roster.d/foo/roster`` etc. This feature prevents passing insecure
custom rosters through the Salt API.
.. code-block:: yaml
@ -2179,6 +2159,7 @@ Example using line statements and line comments to increase ease of use:
If your configuration options are
.. code-block:: yaml
jinja_sls_env:
line_statement_prefix: '%'
line_comment_prefix: '##'
@ -2188,7 +2169,7 @@ as a jinja statement and will interpret anything after a ``##`` as a comment.
This allows the following more convenient syntax to be used:
.. code-block:: yaml
.. code-block:: jinja
## (this comment will not stay once rendered)
# (this comment remains in the rendered template)
@ -2202,7 +2183,7 @@ This allows the following more convenient syntax to be used:
The following less convenient but equivalent syntax would have to
be used if you had not set the line_statement and line_comment options:
.. code-block:: yaml
.. code-block:: jinja
{# (this comment will not stay once rendered) #}
# (this comment remains in the rendered template)

View file

@ -623,7 +623,7 @@ This directory may contain sensitive data and should be protected accordingly.
.. conf_master:: color_theme
``color_theme``
---------
---------------
Default: ``""``
@ -2674,7 +2674,7 @@ executed in a thread.
.. conf_minion:: process_count_max
``process_count_max``
-------
---------------------
.. versionadded:: 2018.3.0

View file

@ -498,5 +498,6 @@ execution modules
znc
zoneadm
zonecfg
zookeeper
zpool
zypper

View file

@ -1,5 +1,5 @@
salt.modules.libcloud_storage module
================================
salt.modules.libcloud_storage
=============================
.. automodule:: salt.modules.libcloud_storage
:members:

View file

@ -1,6 +1,6 @@
===================
=====================
salt.modules.opsgenie
===================
=====================
.. automodule:: salt.modules.opsgenie
:members:

View file

@ -0,0 +1,6 @@
=====================
salt.modules.telegram
=====================
.. automodule:: salt.modules.telegram
:members:

View file

@ -321,4 +321,5 @@ state modules
zk_concurrency
zfs
zone
zookeeper
zpool

View file

@ -1,5 +1,5 @@
salt.states.infoblox_a module
===========================
salt.states.infoblox_a
======================
.. automodule:: salt.states.infoblox_a
:members:

View file

@ -1,5 +1,5 @@
salt.states.infoblox_cname module
===========================
salt.states.infoblox_cname
==========================
.. automodule:: salt.states.infoblox_cname
:members:

View file

@ -1,5 +1,5 @@
salt.states.infoblox_host_record module
===========================
salt.states.infoblox_host_record
================================
.. automodule:: salt.states.infoblox_host_record
:members:

View file

@ -1,5 +1,5 @@
salt.states.infoblox_range module
===========================
salt.states.infoblox_range
==========================
.. automodule:: salt.states.infoblox_range
:members:

View file

@ -125,7 +125,6 @@ Cloud Provider Specifics
Getting Started With Parallels <parallels>
Getting Started With ProfitBricks <profitbricks>
Getting Started With Proxmox <proxmox>
Getting Started With Rackspace <rackspace>
Getting Started With Scaleway <scaleway>
Getting Started With Saltify <saltify>
Getting Started With SoftLayer <softlayer>

View file

@ -9,11 +9,11 @@ libvirt with qemu-kvm.
http://www.libvirt.org/
Host Dependencies
============
=================
* libvirt >= 1.2.18 (older might work)
Salt-Cloud Dependencies
============
=======================
* libvirt-python
Provider Configuration

View file

@ -110,40 +110,51 @@ The typical lifecycle of a salt job from the perspective of the master
might be as follows:
1) A command is issued on the CLI. For example, 'salt my_minion test.ping'.
2) The 'salt' command uses LocalClient to generate a request to the salt master
by connecting to the ReqServer on TCP:4506 and issuing the job.
3) The salt-master ReqServer sees the request and passes it to an available
MWorker over workers.ipc.
4) A worker picks up the request and handles it. First, it checks to ensure
that the requested user has permissions to issue the command. Then, it sends
the publish command to all connected minions. For the curious, this happens
in ClearFuncs.publish().
5) The worker announces on the master event bus that it is about to publish
a job to connected minions. This happens by placing the event on the master
event bus (master_event_pull.ipc) where the EventPublisher picks it up and
distributes it to all connected event listeners on master_event_pub.ipc.
6) The message to the minions is encrypted and sent to the Publisher via IPC
on publish_pull.ipc.
7) Connected minions have a TCP session established with the Publisher on TCP
port 4505 where they await commands. When the Publisher receives the job over
publish_pull, it sends the jobs across the wire to the minions for processing.
8) After the minions receive the request, they decrypt it and perform any
requested work, if they determine that they are targeted to do so.
9) When the minion is ready to respond, it publishes the result of its job back
to the master by sending the encrypted result back to the master on TCP 4506
where it is again picked up by the ReqServer and forwarded to an available
MWorker for processing. (Again, this happens by passing this message across
workers.ipc to an available worker.)
10) When the MWorker receives the job it decrypts it and fires an event onto
the master event bus (master_event_pull.ipc). (Again for the curious, this
happens in AESFuncs._return().
11) The EventPublisher sees this event and re-publishes it on the bus to all
connected listeners of the master event bus (on master_event_pub.ipc). This
is where the LocalClient has been waiting, listening to the event bus for
minion replies. It gathers the job and stores the result.
12) When all targeted minions have replied or the timeout has been exceeded,
the salt client displays the results of the job to the user on the CLI.
2) The 'salt' command uses LocalClient to generate a request to the salt master
by connecting to the ReqServer on TCP:4506 and issuing the job.
3) The salt-master ReqServer sees the request and passes it to an available
MWorker over workers.ipc.
4) A worker picks up the request and handles it. First, it checks to ensure
that the requested user has permissions to issue the command. Then, it sends
the publish command to all connected minions. For the curious, this happens
in ClearFuncs.publish().
5) The worker announces on the master event bus that it is about to publish a
job to connected minions. This happens by placing the event on the master
event bus (master_event_pull.ipc) where the EventPublisher picks it up and
distributes it to all connected event listeners on master_event_pub.ipc.
6) The message to the minions is encrypted and sent to the Publisher via IPC on
publish_pull.ipc.
7) Connected minions have a TCP session established with the Publisher on TCP
port 4505 where they await commands. When the Publisher receives the job
over publish_pull, it sends the jobs across the wire to the minions for
processing.
8) After the minions receive the request, they decrypt it and perform any
requested work, if they determine that they are targeted to do so.
9) When the minion is ready to respond, it publishes the result of its job back
to the master by sending the encrypted result back to the master on TCP 4506
where it is again picked up by the ReqServer and forwarded to an available
MWorker for processing. (Again, this happens by passing this message across
workers.ipc to an available worker.)
10) When the MWorker receives the job it decrypts it and fires an event onto
the master event bus (master_event_pull.ipc). (Again for the curious, this
happens in AESFuncs._return().
11) The EventPublisher sees this event and re-publishes it on the bus to all
connected listeners of the master event bus (on master_event_pub.ipc). This
is where the LocalClient has been waiting, listening to the event bus for
minion replies. It gathers the job and stores the result.
12) When all targeted minions have replied or the timeout has been exceeded,
the salt client displays the results of the job to the user on the CLI.
Salt Minion
===========

View file

@ -236,13 +236,13 @@ repository be sure to communicate with any other contributors there on pull
requests that are large or have breaking changes.
In general it is best to have another Contributor review and merge any pull
requests that you open. Feel free to `at-mention`__ other regular contributors
requests that you open. Feel free to `at-mention`_ other regular contributors
to a repository and request a review. However, there are a lot of formula
repositories so if a repository does not yet have regular contributors or if
your pull request has stayed open for more than a couple days feel free to
"selfie-merge" your own pull request.
__: https://help.github.com/articles/basic-writing-and-formatting-syntax/#mentioning-users-and-teams
.. _`at-mention`: https://help.github.com/articles/basic-writing-and-formatting-syntax/#mentioning-users-and-teams
Style
-----

View file

@ -64,7 +64,7 @@ populated with values from the existing config, but they will be grayed out.
There will also be a checkbox to use the existing config. If you continue, the
existing config will be used. If the checkbox is unchecked, default values are
displayed and can be changed. If you continue, the existing config file in
``c:\salt\conf`` will be removed along with the ``c:\salt\conf\minion.d`
``c:\salt\conf`` will be removed along with the ``c:\salt\conf\minion.d``
directory. The values entered will be used with the default config.
The final page allows you to start the minion service and optionally change its

View file

@ -21,8 +21,8 @@ New in Carbon (2016.11)
-----------------------
The methodologies for network automation have been introduced in
:ref:`Carbon <release-2016-11-0.network-automation-napalm>` based on proxy
minions:
:ref:`2016.11.0 <release-2016-11-0-network-automation-napalm>`. Network
automation support is based on proxy minions.
- :mod:`NAPALM proxy <salt.proxy.napalm>`
- :mod:`Junos proxy<salt.proxy.junos>`

View file

@ -288,6 +288,8 @@ Junos Module Changes
- zeroize - Remove all configuration information on the Routing Engines and reset all key values on a device.
- file_copy - Copy file from proxy to the Junos device.
.. _release-2016-11-0-network-automation-napalm:
Network Automation: NAPALM
==========================
@ -296,7 +298,9 @@ of Salt. It is based on a the `NAPALM <https://github.com/napalm-automation/napa
library and provides facilities to manage the configuration and retrieve data
from network devices running widely used operating systems such: JunOS, IOS-XR,
eOS, IOS, NX-OS etc.
- see `the complete list of supported devices <http://napalm.readthedocs.io/en/latest/support/index.html#supported-devices>`_.
- see `the complete list of supported devices
<http://napalm.readthedocs.io/en/latest/support/index.html#supported-devices>`_.
The connection is established via the :mod:`NAPALM proxy <salt.proxy.napalm>`.

File diff suppressed because it is too large Load diff

View file

@ -1907,7 +1907,7 @@ Changelog for v2018.3.0..v2018.3.1
* b429fc3e74 Add tests for mac_utils
* b5f67130cc Used *args and **kwargs
* b5f67130cc Used \*args and \*\*kwargs
* ed061617a2 Fix unicode_literal issue in mac_assistive
@ -2418,7 +2418,7 @@ Changelog for v2018.3.0..v2018.3.1
* 62d64c9230 Fix missing import
* 18b1730320 Skip test that requires pywin32 on *nix platforms
* 18b1730320 Skip test that requires pywin32 on \*nix platforms
* 45dce1a485 Add reg module to globals

View file

@ -29,7 +29,7 @@ argument value in states.
Slot syntax looks close to the simple python function call.
.. code-block::
.. code-block:: text
__slot__:salt:<module>.<function>(<args>, ..., <kwargs...>, ...)

View file

@ -1,11 +1,10 @@
# -*- coding: utf-8 -*-
'''
NAPALM functions
================
Watch NAPALM functions and fire events on specific triggers
===========================================================
.. versionadded:: 2018.3.0
Watch NAPALM functions and fire events on specific triggers.
.. note::
@ -14,7 +13,7 @@ Watch NAPALM functions and fire events on specific triggers.
Check the documentation for the
:mod:`NAPALM proxy module <salt.proxy.napalm>`.
_NAPALM: http://napalm.readthedocs.io/en/latest/index.html
.. _NAPALM: http://napalm.readthedocs.io/en/latest/index.html
The configuration accepts a list of Salt functions to be
invoked, and the corresponding output hierarchy that should
@ -134,7 +133,7 @@ Event structure example:
.. code-block:: json
salt/beacon/edge01.bjm01/napalm/junos/ntp.stats {
{
"_stamp": "2017-09-05T09:51:09.377202",
"args": [],
"data": {

View file

@ -2374,21 +2374,30 @@ def destroy(vm_name, call=None):
def create_attach_volumes(name, kwargs, call=None):
'''
.. versionadded:: 2017.7.0
Create and attach multiple volumes to a node. The 'volumes' and 'node'
arguments are required, where 'node' is a libcloud node, and 'volumes'
is a list of maps, where each map contains:
'size': The size of the new disk in GB. Required.
'type': The disk type, either pd-standard or pd-ssd. Optional, defaults to pd-standard.
'image': An image to use for this new disk. Optional.
'snapshot': A snapshot to use for this new disk. Optional.
'auto_delete': An option(bool) to keep or remove the disk upon
instance deletion. Optional, defaults to False.
size
The size of the new disk in GB. Required.
type
The disk type, either pd-standard or pd-ssd. Optional, defaults to pd-standard.
image
An image to use for this new disk. Optional.
snapshot
A snapshot to use for this new disk. Optional.
auto_delete
An option(bool) to keep or remove the disk upon instance deletion.
Optional, defaults to False.
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:: 2017.7.0
'''
if call != 'action':
raise SaltCloudSystemExit(

View file

@ -3,16 +3,13 @@
1&1 Cloud Server Module
=======================
=======
The 1&1 SaltStack cloud module allows a 1&1 server to
be automatically deployed and bootstrapped with Salt.
The 1&1 SaltStack cloud module allows a 1&1 server to be automatically deployed
and bootstrapped with Salt.
:depends: 1and1 >= 1.2.0
The module requires the 1&1 api_token to be provided.
The server should also be assigned a public LAN, a private LAN,
or both along with SSH key pairs.
...
The module requires the 1&1 api_token to be provided. The server should also
be assigned a public LAN, a private LAN, or both along with SSH key pairs.
Set up the cloud configuration at ``/etc/salt/cloud.providers`` or
``/etc/salt/cloud.providers.d/oneandone.conf``:

View file

@ -542,7 +542,7 @@ def list_subnets(conn=None, call=None, kwargs=None):
network
network to list subnets of
.. code-block::
.. code-block:: bash
salt-cloud -f list_subnets myopenstack network=salt-net

View file

@ -18,10 +18,11 @@ the saltmaster's minion pillar.
.. versionadded: 2016.3.0
:configuration: Example configuration using only a 'default' group. The default group is not special.
In addition, other groups are being loaded from pillars.
:configuration: Example configuration using only a 'default' group. The default
group is not special. In addition, other groups are being loaded from
pillars.
.. code-block:: yaml
.. code-block:: text
engines:
- slack:
@ -42,7 +43,7 @@ In addition, other groups are being loaded from pillars.
list_jobs:
cmd: jobs.list_jobs
list_commands:
cmd: pillar.get salt:engines:slack:valid_commands target=saltmaster tgt_type=list
cmd: 'pillar.get salt:engines:slack:valid_commands target=saltmaster tgt_type=list'
default_target:
target: saltmaster
tgt_type: glob
@ -54,12 +55,14 @@ In addition, other groups are being loaded from pillars.
target: saltmaster
tgt_type: list
: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
: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: 2017.7.0
.. code-block:: yaml
.. code-block:: text
engines:
- slack:
@ -79,7 +82,7 @@ In addition, other groups are being loaded from pillars.
list_jobs:
cmd: jobs.list_jobs
list_commands:
cmd: pillar.get salt:engines:slack:valid_commands target=saltmaster tgt_type=list
cmd: 'pillar.get salt:engines:slack:valid_commands target=saltmaster tgt_type=list'
gods:
users:
- garethgreenaway
@ -401,13 +404,16 @@ class SlackClient(object):
input_valid_users = set
input_valid_commands = set
When the trigger_string prefixes the message text, yields a dictionary of {
'message_data': m_data,
'cmdline': cmdline_list, # this is a list
'channel': channel,
'user': m_data['user'],
'slack_client': sc
}
When the trigger_string prefixes the message text, yields a dictionary
of::
{
'message_data': m_data,
'cmdline': cmdline_list, # this is a list
'channel': channel,
'user': m_data['user'],
'slack_client': sc
}
else yields {'message_data': m_data} and the caller can handle that
@ -526,17 +532,18 @@ class SlackClient(object):
If no configured target is provided, the command line will be parsed
for target=foo and tgt_type=bar
Test for this:
h = {'aliases': {}, 'commands': {'cmd.run', 'pillar.get'},
'default_target': {'target': '*', 'tgt_type': 'glob'},
'targets': {'pillar.get': {'target': 'you_momma', 'tgt_type': 'list'}},
'users': {'dmangot', 'jmickle', 'pcn'}}
f = {'aliases': {}, 'commands': {'cmd.run', 'pillar.get'},
'default_target': {}, 'targets': {},'users': {'dmangot', 'jmickle', 'pcn'}}
Test for this::
g = {'aliases': {}, 'commands': {'cmd.run', 'pillar.get'},
'default_target': {'target': '*', 'tgt_type': 'glob'},
'targets': {}, 'users': {'dmangot', 'jmickle', 'pcn'}}
h = {'aliases': {}, 'commands': {'cmd.run', 'pillar.get'},
'default_target': {'target': '*', 'tgt_type': 'glob'},
'targets': {'pillar.get': {'target': 'you_momma', 'tgt_type': 'list'}},
'users': {'dmangot', 'jmickle', 'pcn'}}
f = {'aliases': {}, 'commands': {'cmd.run', 'pillar.get'},
'default_target': {}, 'targets': {},'users': {'dmangot', 'jmickle', 'pcn'}}
g = {'aliases': {}, 'commands': {'cmd.run', 'pillar.get'},
'default_target': {'target': '*', 'tgt_type': 'glob'},
'targets': {}, 'users': {'dmangot', 'jmickle', 'pcn'}}
Run each of them through ``get_configured_target(('foo', f), 'pillar.get')`` and confirm a valid target

View file

@ -19,7 +19,7 @@ Management of Docker Containers
.. _lxc-attach: https://linuxcontainers.org/lxc/manpages/man1/lxc-attach.1.html
.. _nsenter: http://man7.org/linux/man-pages/man1/nsenter.1.html
.. _docker-exec: http://docs.docker.com/reference/commandline/cli/#exec
.. _`low-level API`: http://docker-py.readthedocs.io/en/stable/api.html
.. _`docker-py Low-level API`: http://docker-py.readthedocs.io/en/stable/api.html
.. _timelib: https://pypi.python.org/pypi/timelib
.. _`trusted builds`: https://blog.docker.com/2013/11/introducing-trusted-builds/
.. _`Docker Engine API`: https://docs.docker.com/engine/api/v1.33/#operation/ContainerCreate
@ -788,7 +788,7 @@ def get_client_args(limit=None):
Added ability to limit the input to specific client functions
Many functions in Salt have been written to support the full list of
arguments for a given function in docker-py's `low-level API`_. However,
arguments for a given function in the `docker-py Low-level API`_. However,
depending on the version of docker-py installed on the minion, the
available arguments may differ. This function will get the arguments for
various functions in the installed version of docker-py, to be used as a
@ -996,17 +996,17 @@ def compare_container_networks(first, second):
:py:func:`docker_container.running <salt.states.docker_container.running>`
state), automatic IP configuration will also be checked in these cases.
This function uses the :minion_opts:`docker.compare_container_networks`
This function uses the :conf_minion:`docker.compare_container_networks`
minion config option to determine which keys to examine. This provides
flexibility in the event that features added in a future Docker release
necessitate changes to how Salt compares networks. In these cases, rather
than waiting for a new Salt release one can just set
:minion_opts:`docker.compare_container_networks`.
:conf_minion:`docker.compare_container_networks`.
.. note::
The checks for automatic IP configuration described above only apply if
``IPAMConfig`` is among the keys set for static IP checks in
:minion_opts:`docker.compare_container_networks`.
:conf_minion:`docker.compare_container_networks`.
first
Name or ID of first container (old)
@ -5069,7 +5069,7 @@ def create_network(name,
other issues to be more easily worked around. See the following links
for more information:
- docker-py `low-level API`_
- `docker-py Low-level API`_
- `Docker Engine API`_
.. versionadded:: 2018.3.0
@ -5160,6 +5160,8 @@ def create_network(name,
get an error unless you have set up a fixed IPv6 subnet. Consult
the `Docker IPv6 docs`_ for information on how to do this.
.. _`Docker IPv6 docs`: https://docs.docker.com/v17.09/engine/userguide/networking/default_network/ipv6/
attachable : False
If ``True``, and the network is in the global scope, non-service
containers on worker nodes will be able to connect to the network.

View file

@ -575,30 +575,26 @@ def lsattr(path):
return results
def chattr(*args, **kwargs):
def chattr(*files, **kwargs):
'''
.. versionadded:: 2018.3.0
Change the attributes of files
*args
list of files to modify attributes of
**kwargs - the following are valid <key,value> pairs:
Change the attributes of files. This function accepts one or more files and
the following options:
operator
add|remove
determines whether attributes should be added or removed from files
Can be wither ``add`` or ``remove``. Determines whether attributes
should be added or removed from files
attributes
acdijstuADST
string of characters representing attributes to add/remove from files
One or more of the following characters: ``acdijstuADST``, representing
attributes to add to/remove from files
version
a version number to assign to the files
a version number to assign to the file(s)
flags
[RVf]
One or more of the following characters: ``RVf``, representing
flags to assign to chattr (recurse, verbose, suppress most errors)
CLI Example:
@ -608,34 +604,34 @@ def chattr(*args, **kwargs):
salt '*' file.chattr foo1.txt foo2.txt operator=add attributes=ai
salt '*' file.chattr foo3.txt operator=remove attributes=i version=2
'''
args = [arg if salt.utils.stringutils.is_quoted(arg) else '"{0}"'.format(arg)
for arg in args]
operator = kwargs.pop('operator', None)
attributes = kwargs.pop('attributes', None)
flags = kwargs.pop('flags', None)
version = kwargs.pop('version', None)
if (operator is None) or (operator not in ['add', 'remove']):
if (operator is None) or (operator not in ('add', 'remove')):
raise SaltInvocationError(
"Need an operator: 'add' or 'remove' to modify attributes.")
if attributes is None:
raise SaltInvocationError("Need attributes: [AacDdijsTtSu]")
cmd = ['chattr']
if operator == "add":
attrs = '+{0}'.format(attributes)
elif operator == "remove":
attrs = '-{0}'.format(attributes)
flgs = ''
cmd.append(attrs)
if flags is not None:
flgs = '-{0}'.format(flags)
cmd.append('-{0}'.format(flags))
vrsn = ''
if version is not None:
vrsn = '-v {0}'.format(version)
cmd.extend(['-v', version])
cmd.extend(files)
cmd = 'chattr {0} {1} {2} {3}'.format(attrs, flgs, vrsn, ' '.join(args))
result = __salt__['cmd.run'](cmd, python_shell=False)
if bool(result):

View file

@ -1051,16 +1051,15 @@ def verify(text=None,
signature
Specify the filename of a detached signature.
.. versionadded:: 2018.3.0
.. versionadded:: 2018.3.0
CLI Example:
.. code-block:: bash
salt '*' gpg.verify text='Hello there. How are you?'
salt '*' gpg.verify filename='/path/to/important.file'
salt '*' gpg.verify filename='/path/to/important.file' use_passphrase=True
'''

View file

@ -97,7 +97,8 @@ def diff_objects(obja, objb):
Diff two complex infoblox objects.
This is used from salt states to detect changes in objects.
Using `func:nextavailableip` will not cause a diff if the ipaddres is in range
Using ``func:nextavailableip`` will not cause a diff if the ipaddress is in
range
'''
return libinfoblox.diff_obj(obja, objb)
@ -108,6 +109,8 @@ def is_ipaddr_in_ipfunc_range(ipaddr, ipfunc):
CLI Example:
.. code-block:: bash
salt-call infoblox.is_ipaddr_in_ipfunc_range \
ipaddr="10.0.2.2" ipfunc="func:nextavailableip:10.0.0.0/8"
'''
@ -118,10 +121,12 @@ def update_host(name, data, **api_opts):
'''
Update host record. This is a helper call to update_object.
Find a hosts `_ref` then call update_object with the record data.
Find a hosts ``_ref`` then call update_object with the record data.
CLI Example:
.. code-block:: bash
salt-call infoblox.update_host name=fqdn data={}
'''
o = get_host(name=name, **api_opts)
@ -130,8 +135,7 @@ def update_host(name, data, **api_opts):
def update_object(objref, data, **api_opts):
'''
Update raw infoblox object.
This is a low level api call.
Update raw infoblox object. This is a low level api call.
CLI Example:
@ -147,11 +151,12 @@ def update_object(objref, data, **api_opts):
def delete_object(objref, **api_opts):
'''
Delete infoblox object.
This is a low level api call.
Delete infoblox object. This is a low level api call.
CLI Example:
.. code-block:: bash
salt-call infoblox.delete_object objref=[ref_of_object]
'''
if '__opts__' in globals() and __opts__['test']:
@ -162,11 +167,12 @@ def delete_object(objref, **api_opts):
def create_object(object_type, data, **api_opts):
'''
Create raw infoblox object
This is a low level api call.
Create raw infoblox object. This is a low level api call.
CLI Example:
.. code-block:: bash
salt-call infoblox.update_object object_type=record:host data={}
'''
if '__opts__' in globals() and __opts__['test']:
@ -178,11 +184,12 @@ def create_object(object_type, data, **api_opts):
def get_object(objref, data=None, return_fields=None, max_results=None,
ensure_none_or_one_result=False, **api_opts):
'''
Get raw infoblox object.
This is a low level api call.
Get raw infoblox object. This is a low level api call.
CLI Example:
.. code-block:: bash
salt-call infoblox.get_object objref=[_ref of object]
'''
if not data:
@ -198,6 +205,8 @@ def create_cname(data, **api_opts):
CLI Example:
.. code-block:: bash
salt-call infoblox.create_cname data={ \
"comment": "cname to example server", \
"name": "example.example.com", \
@ -215,7 +224,9 @@ def get_cname(name=None, canonical=None, return_fields=None, **api_opts):
'''
Get CNAME information.
CLI Example:
CLI Examples:
.. code-block:: bash
salt-call infoblox.get_cname name=example.example.com
salt-call infoblox.get_cname canonical=example-ha-0.example.com
@ -229,10 +240,12 @@ def update_cname(name, data, **api_opts):
'''
Update CNAME. This is a helper call to update_object.
Find a CNAME `_ref` then call update_object with the record data.
Find a CNAME ``_ref`` then call update_object with the record data.
CLI Example:
.. code-block:: bash
salt-call infoblox.update_cname name=example.example.com data="{
'canonical':'example-ha-0.example.com',
'use_ttl':true,
@ -251,7 +264,9 @@ def delete_cname(name=None, canonical=None, **api_opts):
If record is not found, return True
CLI Example:
CLI Examples:
.. code-block:: bash
salt-call infoblox.delete_cname name=example.example.com
salt-call infoblox.delete_cname canonical=example-ha-0.example.com
@ -266,16 +281,13 @@ def get_host(name=None, ipv4addr=None, mac=None, return_fields=None, **api_opts)
'''
Get host information
CLI Example:
CLI Examples:
.. code-block:: bash
salt-call infoblox.get_host hostname.domain.ca
salt-call infoblox.get_host ipv4addr=123.123.122.12
salt-call infoblox.get_host mac=00:50:56:84:6e:ae
return_fields=
https://INFOBLOX/wapidoc/objects/record.host.html#fields-list
return_fields='ipv4addrs,aliases,name,configure_for_dns,extattrs,disable,view,comment,zone'
'''
infoblox = _get_infoblox(**api_opts)
host = infoblox.get_host(name=name, mac=mac, ipv4addr=ipv4addr, return_fields=return_fields)
@ -288,6 +300,8 @@ def get_host_advanced(name=None, ipv4addr=None, mac=None, **api_opts):
CLI Example:
.. code-block:: bash
salt-call infoblox.get_host_advanced hostname.domain.ca
'''
infoblox = _get_infoblox(**api_opts)
@ -299,7 +313,8 @@ def get_host_domainname(name, domains=None, **api_opts):
'''
Get host domain name
If no domains are passed, the hostname is checked for a zone in infoblox, if no zone split on first dot.
If no domains are passed, the hostname is checked for a zone in infoblox,
if no zone split on first dot.
If domains are provided, the best match out of the list is returned.
@ -309,6 +324,8 @@ def get_host_domainname(name, domains=None, **api_opts):
CLI Example:
.. code-block:: bash
salt-call uwl.get_host_domainname name=localhost.t.domain.com \
domains=['domain.com', 't.domain.com.']
@ -337,15 +354,19 @@ def get_host_hostname(name, domains=None, **api_opts):
'''
Get hostname
If no domains are passed, the hostname is checked for a zone in infoblox, if no zone split on first dot.
If no domains are passed, the hostname is checked for a zone in infoblox,
if no zone split on first dot.
If domains are provided, the best match out of the list is truncated from the fqdn leaving the hostname.
If domains are provided, the best match out of the list is truncated from
the fqdn leaving the hostname.
If no matching domains are found the fqdn is returned.
dots at end of names are ignored.
CLI Example:
CLI Examples:
.. code-block:: bash
salt-call infoblox.get_host_hostname fqdn=localhost.xxx.t.domain.com \
domains="['domain.com', 't.domain.com']"
@ -371,6 +392,8 @@ def get_host_mac(name=None, allow_array=False, **api_opts):
CLI Example:
.. code-block:: bash
salt-call infoblox.get_host_mac host=localhost.domain.com
'''
data = get_host(name=name, **api_opts)
@ -392,7 +415,9 @@ def get_host_ipv4(name=None, mac=None, allow_array=False, **api_opts):
Use `allow_array` to return possible multiple values.
CLI Example:
CLI Examples:
.. code-block:: bash
salt-call infoblox.get_host_ipv4 host=localhost.domain.com
salt-call infoblox.get_host_ipv4 mac=00:50:56:84:6e:ae
@ -416,14 +441,13 @@ def get_host_ipv4addr_info(ipv4addr=None, mac=None,
'''
Get host ipv4addr information
return_fields='mac,host,configure_for_dhcp,ipv4addr'
CLI Examples:
CLI Example:
.. code-block:: bash
salt-call infoblox.get_ipv4addr ipv4addr=123.123.122.12
salt-call infoblox.get_ipv4addr mac=00:50:56:84:6e:ae
salt-call infoblox.get_ipv4addr mac=00:50:56:84:6e:ae return_fields=host
return_fields='mac,host,configure_for_dhcp,ipv4addr'
salt-call infoblox.get_ipv4addr mac=00:50:56:84:6e:ae return_fields=host return_fields='mac,host,configure_for_dhcp,ipv4addr'
'''
infoblox = _get_infoblox(**api_opts)
return infoblox.get_host_ipv4addr_object(ipv4addr, mac, discovered_data, return_fields)
@ -437,6 +461,8 @@ def get_host_ipv6addr_info(ipv6addr=None, mac=None,
CLI Example:
.. code-block:: bash
salt-call infoblox.get_host_ipv6addr_info ipv6addr=2001:db8:85a3:8d3:1349:8a2e:370:7348
'''
infoblox = _get_infoblox(**api_opts)
@ -445,9 +471,8 @@ def get_host_ipv6addr_info(ipv6addr=None, mac=None,
def get_network(ipv4addr=None, network=None, return_fields=None, **api_opts):
'''
Get list of all networks.
This is helpful when looking up subnets to
use with func:nextavailableip
Get list of all networks. This is helpful when looking up subnets to use
with func:nextavailableip
This call is offen slow and not cached!
@ -456,6 +481,8 @@ def get_network(ipv4addr=None, network=None, return_fields=None, **api_opts):
CLI Example:
.. code-block:: bash
salt-call infoblox.get_network
'''
infoblox = _get_infoblox(**api_opts)
@ -468,6 +495,8 @@ def delete_host(name=None, mac=None, ipv4addr=None, **api_opts):
CLI Example:
.. code-block:: bash
salt-call infoblox.delete_host name=example.domain.com
salt-call infoblox.delete_host ipv4addr=123.123.122.12
salt-call infoblox.delete_host ipv4addr=123.123.122.12 mac=00:50:56:84:6e:ae
@ -483,15 +512,18 @@ def create_host(data, **api_opts):
Add host record
Avoid race conditions, use func:nextavailableip for ipv[4,6]addrs:
- func:nextavailableip:network/ZG54dfgsrDFEFfsfsLzA:10.0.0.0/8/default
- func:nextavailableip:10.0.0.0/8
- func:nextavailableip:10.0.0.0/8,external
- func:nextavailableip:10.0.0.3-10.0.0.10
- func:nextavailableip:network/ZG54dfgsrDFEFfsfsLzA:10.0.0.0/8/default
- func:nextavailableip:10.0.0.0/8
- func:nextavailableip:10.0.0.0/8,external
- func:nextavailableip:10.0.0.3-10.0.0.10
See your infoblox API for full `data` format.
CLI Example:
.. code-block:: bash
salt-call infoblox.create_host \
data =
{'name': 'hostname.example.ca',
@ -514,6 +546,8 @@ def get_ipv4_range(start_addr=None, end_addr=None, return_fields=None, **api_opt
CLI Example:
.. code-block:: bash
salt-call infoblox.get_ipv4_range start_addr=123.123.122.12
'''
infoblox = _get_infoblox(**api_opts)
@ -526,7 +560,9 @@ def delete_ipv4_range(start_addr=None, end_addr=None, **api_opts):
CLI Example:
salt-call infoblox.delete_ipv4_range start_addr=123.123.122.12
.. code-block:: bash
salt-call infoblox.delete_ipv4_range start_addr=123.123.122.12
'''
r = get_ipv4_range(start_addr, end_addr, **api_opts)
if r:
@ -544,6 +580,8 @@ def create_ipv4_range(data, **api_opts):
CLI Example:
.. code-block:: bash
salt-call infoblox.create_ipv4_range data={
start_addr: '129.97.150.160',
end_addr: '129.97.150.170'}
@ -560,6 +598,8 @@ def create_a(data, **api_opts):
CLI Example:
.. code-block:: bash
salt-call infoblox.create_a \
data =
name: 'fastlinux.math.example.ca'
@ -573,7 +613,9 @@ def get_a(name=None, ipv4addr=None, allow_array=True, **api_opts):
'''
Get A record
CLI Example:
CLI Examples:
.. code-block:: bash
salt-call infoblox.get_a name=abc.example.com
salt-call infoblox.get_a ipv4addr=192.168.3.5
@ -593,14 +635,16 @@ def delete_a(name=None, ipv4addr=None, allow_array=False, **api_opts):
'''
Delete A record
If the A record is used as a round robin you can set
`allow_array=true to delete all records for the hostname.
If the A record is used as a round robin you can set ``allow_array=True`` to
delete all records for the hostname.
CLI Example:
CLI Examples:
.. code-block:: bash
salt-call infoblox.delete_a name=abc.example.com
salt-call infoblox.delete_a ipv4addr=192.168.3.5
salt-call infoblox.delete_a name=acname.example.com allow_array=true
salt-call infoblox.delete_a name=acname.example.com allow_array=True
'''
r = get_a(name, ipv4addr, allow_array=False, **api_opts)
if not r:

View file

@ -114,7 +114,6 @@ def latest_installed():
salt '*' kernelpkg.latest_installed
.. note::
This function may not return the same value as
:py:func:`~salt.modules.kernelpkg_linux_apt.active` if a new kernel
has been installed and the system has not yet been rebooted.
@ -163,9 +162,9 @@ def upgrade(reboot=False, at_time=None):
salt '*' kernelpkg.upgrade reboot=True at_time=1
.. note::
An immediate reboot often shuts down the system before the minion
has a chance to return, resulting in errors. A minimal delay (1 minute)
is useful to ensure the result is delivered to the master.
An immediate reboot often shuts down the system before the minion has a
chance to return, resulting in errors. A minimal delay (1 minute) is
useful to ensure the result is delivered to the master.
'''
result = __salt__['pkg.install'](
name='{0}-{1}'.format(_package_prefix(), latest_available()))

View file

@ -108,7 +108,6 @@ def latest_installed():
salt '*' kernelpkg.latest_installed
.. note::
This function may not return the same value as
:py:func:`~salt.modules.kernelpkg_linux_yum.active` if a new kernel
has been installed and the system has not yet been rebooted.
@ -157,9 +156,9 @@ def upgrade(reboot=False, at_time=None):
salt '*' kernelpkg.upgrade reboot=True at_time=1
.. note::
An immediate reboot often shuts down the system before the minion
has a chance to return, resulting in errors. A minimal delay (1 minute)
is useful to ensure the result is delivered to the master.
An immediate reboot often shuts down the system before the minion has a
chance to return, resulting in errors. A minimal delay (1 minute) is
useful to ensure the result is delivered to the master.
'''
result = __salt__['pkg.upgrade'](name=_package_name())
_needs_reboot = needs_reboot()

View file

@ -249,7 +249,7 @@ def rotate(name, pattern=None, conf_file=default_conf, **kwargs):
alias for log_file
conf_file : string
optional path to alternative configuration file
**kwargs : boolean|string|int
kwargs : boolean|string|int
optional additional flags and parameters
.. note::

View file

@ -137,7 +137,9 @@ def db_create(database, containment='NONE', new_database_options=None, **kwargs)
new_database_options can only be a list of strings
CLI Example:
.. code-block:: bash
salt minion mssql.db_create DB_NAME
'''
if containment not in ['NONE', 'PARTIAL']:
@ -299,18 +301,22 @@ def login_exists(login, domain='', **kwargs):
def login_create(login, new_login_password=None, new_login_domain='', new_login_roles=None, new_login_options=None, **kwargs):
'''
Creates a new login.
Does not update password of existing logins.
For Windows authentication, provide new_login_domain.
For SQL Server authentication, prvide new_login_password.
Since hashed passwords are varbinary values, if the
new_login_password is 'int / long', it will be considered
to be HASHED.
new_login_roles can only be a list of SERVER roles
new_login_options can only be a list of strings
Creates a new login. Does not update password of existing logins. For
Windows authentication, provide ``new_login_domain``. For SQL Server
authentication, prvide ``new_login_password``. Since hashed passwords are
*varbinary* values, if the ``new_login_password`` is 'int / long', it will
be considered to be HASHED.
new_login_roles
a list of SERVER roles
new_login_options
a list of strings
CLI Example:
.. code-block:: bash
salt minion mssql.login_create LOGIN_NAME database=DBNAME [new_login_password=PASSWORD]
'''
# One and only one of password and domain should be specifies
@ -408,13 +414,14 @@ def user_list(**kwargs):
def user_create(username, login=None, domain='', database=None, roles=None, options=None, **kwargs):
'''
Creates a new user.
If login is not specified, the user will be created without a login.
domain, if provided, will be prepended to username.
Creates a new user. If login is not specified, the user will be created
without a login. domain, if provided, will be prepended to username.
options can only be a list of strings
CLI Example:
.. code-block:: bash
salt minion mssql.user_create USERNAME database=DBNAME
'''
if domain and not login:

View file

@ -16,29 +16,7 @@ Configuration
The Namecheap username, API key and URL should be set in the minion configuration
file, or in the Pillar data.
* ``requests``
.. code-block:: bash
pip install requests
- As saltstack depends on ``requests`` this shouldn't be a problem
Prerequisite Configuration
--------------------------
- The namecheap username, api key and url should be set in a minion
configuration file or pillar
.. code-block:: yaml
namecheap.name: companyname
namecheap.key: a1b2c3d4e5f67a8b9c0d1e2f3
namecheap.client_ip: 162.155.30.172
#Real url
namecheap.url: https://api.namecheap.com/xml.response
#Sandbox url
#namecheap.url: https://api.sandbox.namecheap.xml.response
.. code-block:: yaml
namecheap.name: companyname
namecheap.key: a1b2c3d4e5f67a8b9c0d1e2f3

View file

@ -16,29 +16,7 @@ Configuration
The Namecheap username, API key and URL should be set in the minion configuration
file, or in the Pillar data.
* ``requests``
.. code-block:: bash
pip install requests
- As saltstack depends on ``requests`` this shouldn't be a problem
Prerequisite Configuration
--------------------------
- The namecheap username, api key and url should be set in a minion
configuration file or pillar
.. code-block:: yaml
namecheap.name: companyname
namecheap.key: a1b2c3d4e5f67a8b9c0d1e2f3
namecheap.client_ip: 162.155.30.172
#Real url
namecheap.url: https://api.namecheap.com/xml.response
#Sandbox url
#namecheap.url: https://api.sandbox.namecheap.xml.response
.. code-block:: yaml
namecheap.name: companyname
namecheap.key: a1b2c3d4e5f67a8b9c0d1e2f3

View file

@ -110,16 +110,23 @@ def network_create(auth=None, **kwargs):
'''
Create a network
Parameters:
Defaults: shared=False, admin_state_up=True, external=False,
provider=None, project_id=None
name
Name of the network being created
name (string): Name of the network being created.
shared (bool): Set the network as shared.
admin_state_up (bool): Set the network administrative state to up.
external (bool): Whether this network is externally accessible.
provider (dict): A dict of network provider options.
project_id (string): Specify the project ID this network will be created on.
shared : False
If ``True``, set the network as shared
admin_state_up : True
If ``True``, Set the network administrative state to "up"
external : False
Control whether or not this network is externally accessible
provider
An optional Python dictionary of network provider options
project_id
The project ID on which this network will be created
CLI Example:
@ -144,16 +151,15 @@ def network_delete(auth=None, **kwargs):
'''
Delete a network
Parameters:
name: Name or ID of the network being deleted.
name_or_id
Name or ID of the network being deleted
CLI Example:
.. code-block:: bash
salt '*' neutronng.network_delete name=network1
salt '*' neutronng.network_delete \
name=1dcac318a83b4610b7a7f7ba01465548
salt '*' neutronng.network_delete name_or_id=network1
salt '*' neutronng.network_delete name_or_id=1dcac318a83b4610b7a7f7ba01465548
'''
cloud = get_operator_cloud(auth)
@ -165,10 +171,8 @@ def list_networks(auth=None, **kwargs):
'''
List networks
Parameters:
Defaults: filters=None
filters (dict): dict of filter conditions to push down
filters
A Python dictionary of filter conditions to push down
CLI Example:
@ -188,10 +192,8 @@ def network_get(auth=None, **kwargs):
'''
Get a single network
Parameters:
Defaults: filters=None
filters (dict): dict of filter conditions to push down
filters
A Python dictionary of filter conditions to push down
CLI Example:
@ -209,18 +211,57 @@ def subnet_create(auth=None, **kwargs):
'''
Create a subnet
Parameters:
Defaults: cidr=None, ip_version=4, enable_dhcp=False, subnet_name=None,
tenant_id=None, allocation_pools=None, gateway_ip=None,
disable_gateway_ip=False, dns_nameservers=None, host_routes=None,
ipv6_ra_mode=None, ipv6_address_mode=None,
use_default_subnetpool=False
network_name_or_id
The unique name or ID of the attached network. If a non-unique name is
supplied, an exception is raised.
allocation_pools:
A list of dictionaries of the start and end addresses for allocation pools.
cidr
The CIDR
dns_nameservers: A list of DNS name servers for the subnet.
host_routes: A list of host route dictionaries for the subnet.
ip_version
The IP version, which is 4 or 6.
enable_dhcp : False
Set to ``True`` if DHCP is enabled and ``False`` if disabled
subnet_name
The name of the subnet
tenant_id
The ID of the tenant who owns the network. Only administrative users
can specify a tenant ID other than their own.
allocation_pools
A list of dictionaries of the start and end addresses for the
allocation pools.
gateway_ip
The gateway IP address. When you specify both ``allocation_pools`` and
``gateway_ip``, you must ensure that the gateway IP does not overlap
with the specified allocation pools.
disable_gateway_ip : False
Set to ``True`` if gateway IP address is disabled and ``False`` if
enabled. It is not allowed with ``gateway_ip``.
dns_nameservers
A list of DNS name servers for the subnet
host_routes
A list of host route dictionaries for the subnet
ipv6_ra_mode
IPv6 Router Advertisement mode. Valid values are ``dhcpv6-stateful``,
``dhcpv6-stateless``, or ``slaac``.
ipv6_address_mode
IPv6 address mode. Valid values are ``dhcpv6-stateful``,
``dhcpv6-stateless``, or ``slaac``.
use_default_subnetpool
If ``True``, use the default subnetpool for ``ip_version`` to obtain a
CIDR. It is required to pass ``None`` to the ``cidr`` argument when
enabling this option.
CLI Example:
@ -248,19 +289,38 @@ def subnet_update(auth=None, **kwargs):
'''
Update a subnet
Parameters:
Defaults: subnet_name=None, enable_dhcp=None, gateway_ip=None,\
disable_gateway_ip=None, allocation_pools=None, \
dns_nameservers=None, host_routes=None
name_or_id
Name or ID of the subnet to update
name: Name or ID of the subnet to update.
subnet_name: The new name of the subnet.
subnet_name
The new name of the subnet
enable_dhcp
Set to ``True`` if DHCP is enabled and ``False`` if disabled
gateway_ip
The gateway IP address. When you specify both allocation_pools and
gateway_ip, you must ensure that the gateway IP does not overlap with
the specified allocation pools.
disable_gateway_ip : False
Set to ``True`` if gateway IP address is disabled and False if enabled.
It is not allowed with ``gateway_ip``.
allocation_pools
A list of dictionaries of the start and end addresses for the
allocation pools.
dns_nameservers
A list of DNS name servers for the subnet
host_routes
A list of host route dictionaries for the subnet
.. code-block:: bash
salt '*' neutronng.subnet_update name=subnet1 subnet_name=subnet2
salt '*' neutronng.subnet_update name=subnet1\
dns_nameservers='["8.8.8.8", "8.8.8.7"]'
salt '*' neutronng.subnet_update name=subnet1 dns_nameservers='["8.8.8.8", "8.8.8.7"]'
'''
cloud = get_operator_cloud(auth)
@ -272,8 +332,8 @@ def subnet_delete(auth=None, **kwargs):
'''
Delete a subnet
Parameters:
name: Name or ID of the subnet to update.
name
Name or ID of the subnet to update
CLI Example:
@ -293,10 +353,8 @@ def list_subnets(auth=None, **kwargs):
'''
List subnets
Parameters:
Defaults: filters=None
filters (dict): dict of filter conditions to push down
filters
A Python dictionary of filter conditions to push down
CLI Example:
@ -316,10 +374,8 @@ def subnet_get(auth=None, **kwargs):
'''
Get a single subnet
Parameters:
Defaults: filters=None
filters (dict): dict of filter conditions to push down
filters
A Python dictionary of filter conditions to push down
CLI Example:
@ -337,8 +393,8 @@ def security_group_create(auth=None, **kwargs):
'''
Create a security group. Use security_group_get to create default.
Parameters:
Defaults: project_id=None
project_id
The project ID on which this security group will be created
CLI Example:
@ -360,9 +416,14 @@ def security_group_update(secgroup=None, auth=None, **kwargs):
'''
Update a security group
secgroup: Name, ID or Raw Object of the security group to update.
name: New name for the security group.
description: New description for the security group.
secgroup
Name, ID or Raw Object of the security group to update
name
New name for the security group
description
New description for the security group
CLI Example:
@ -384,14 +445,14 @@ def security_group_delete(auth=None, **kwargs):
'''
Delete a security group
Parameters:
name: The name or unique ID of the security group.
name_or_id
The name or unique ID of the security group
CLI Example:
.. code-block:: bash
salt '*' neutronng.security_group_delete name=secgroup1
salt '*' neutronng.security_group_delete name_or_id=secgroup1
'''
cloud = get_operator_cloud(auth)
@ -404,10 +465,8 @@ def security_group_get(auth=None, **kwargs):
Get a single security group. This will create a default security group
if one does not exist yet for a particular project id.
Parameters:
Defaults: filters=None
filters (dict): dict of filter conditions to push down
filters
A Python dictionary of filter conditions to push down
CLI Example:
@ -429,15 +488,48 @@ def security_group_rule_create(auth=None, **kwargs):
'''
Create a rule in a security group
Parameters:
Defaults: port_range_min=None, port_range_max=None, protocol=None,
remote_ip_prefix=None, remote_group_id=None, direction='ingress',
ethertype='IPv4', project_id=None
secgroup_name_or_id
The security group name or ID to associate with this security group
rule. If a non-unique group name is given, an exception is raised.
secgroup_name_or_id:
This is the Name or Id of security group you want to create a rule in.
However, it throws errors on non-unique security group names like
'default' even when you supply a project_id
port_range_min
The minimum port number in the range that is matched by the security
group rule. If the protocol is TCP or UDP, this value must be less than
or equal to the port_range_max attribute value. If nova is used by the
cloud provider for security groups, then a value of None will be
transformed to -1.
port_range_max
The maximum port number in the range that is matched by the security
group rule. The port_range_min attribute constrains the port_range_max
attribute. If nova is used by the cloud provider for security groups,
then a value of None will be transformed to -1.
protocol
The protocol that is matched by the security group rule. Valid values
are ``None``, ``tcp``, ``udp``, and ``icmp``.
remote_ip_prefix
The remote IP prefix to be associated with this security group rule.
This attribute matches the specified IP prefix as the source IP address
of the IP packet.
remote_group_id
The remote group ID to be associated with this security group rule
direction
Either ``ingress`` or ``egress``; the direction in which the security
group rule is applied. For a compute instance, an ingress security
group rule is applied to incoming (ingress) traffic for that instance.
An egress rule is applied to traffic leaving the instance
ethertype
Must be IPv4 or IPv6, and addresses represented in CIDR must match the
ingress or egress rules
project_id
Specify the project ID this security group will be created on
(admin-only)
CLI Example:
@ -464,15 +556,14 @@ def security_group_rule_delete(auth=None, **kwargs):
'''
Delete a security group
Parameters:
rule_id (string): The unique ID of the security group rule.
name_or_id
The unique ID of the security group rule
CLI Example:
.. code-block:: bash
salt '*' neutronng.security_group_rule_delete\
rule_id=1dcac318a83b4610b7a7f7ba01465548
salt '*' neutronng.security_group_rule_delete name_or_id=1dcac318a83b4610b7a7f7ba01465548
'''
cloud = get_operator_cloud(auth)

View file

@ -47,7 +47,7 @@ def out_format(data, out='nested', opts=None, **kwargs):
opts
Dictionary of configuration options. Default: ``__opts__``.
**kwargs
kwargs
Arguments to sent to the outputter module.
CLI Example:
@ -74,7 +74,7 @@ def string_format(data, out='nested', opts=None, **kwargs):
opts
Dictionary of configuration options. Default: ``__opts__``.
**kwargs
kwargs
Arguments to sent to the outputter module.
CLI Example:
@ -101,7 +101,7 @@ def html_format(data, out='nested', opts=None, **kwargs):
opts
Dictionary of configuration options. Default: ``__opts__``.
**kwargs
kwargs
Arguments to sent to the outputter module.
CLI Example:

View file

@ -2,22 +2,20 @@
r'''
Manage the Windows registry
-----
Hives
-----
Hives are the main sections of the registry and all begin with the word HKEY.
- HKEY_LOCAL_MACHINE
- HKEY_CURRENT_USER
- HKEY_USER
- HKEY_LOCAL_MACHINE
- HKEY_CURRENT_USER
- HKEY_USER
----
Keys
----
Keys are the folders in the registry. Keys can have many nested subkeys. Keys
can have a value assigned to them under the (Default)
-----------------
Values or Entries
-----------------
@ -25,7 +23,6 @@ Values or Entries are the name/data pairs beneath the keys and subkeys. All keys
have a default name/data pair. The name is ``(Default)`` with a displayed value
of ``(value not set)``. The actual value is Null.
-------
Example
-------

View file

@ -9059,8 +9059,7 @@ def create_vm(vm_name, cpu, memory, image, version, datacenter, datastore,
.. code-block:: bash
salt vm_minion vsphere.create_vm vm_name=vmname \
cpu='{count: 2, nested: True}' ...
salt vm_minion vsphere.create_vm vm_name=vmname cpu='{count: 2, nested: True}' ...
vm_name
Name of the virtual machine
@ -9090,7 +9089,9 @@ def create_vm(vm_name, cpu, memory, image, version, datacenter, datastore,
devices
interfaces
.. code-block:: bash
interfaces:
adapter: 'Network adapter 1'
name: vlan100
@ -9103,7 +9104,9 @@ def create_vm(vm_name, cpu, memory, image, version, datacenter, datastore,
start_connected: True
disks
.. code-block:: bash
disks:
adapter: 'Hard disk 1'
size: 16
@ -9116,14 +9119,18 @@ def create_vm(vm_name, cpu, memory, image, version, datacenter, datastore,
filename: 'vm/mydisk.vmdk'
scsi_devices
.. code-block:: bash
scsi_devices:
controller: 'SCSI controller 0'
type: paravirtual
bus_sharing: no_sharing
serial_ports
.. code-block:: bash
serial_ports:
adapter: 'Serial port 1'
type: network
@ -9138,7 +9145,9 @@ def create_vm(vm_name, cpu, memory, image, version, datacenter, datastore,
yield: False
cd_drives
.. code-block:: bash
cd_drives:
adapter: 'CD/DVD drive 0'
controller: 'IDE 0'

View file

@ -338,7 +338,7 @@ def list(unix_style=True):
Return a list of Timezones that this module supports. These can be in either
Unix or Windows format.
.. version-added:: 2018.3.2
.. versionadded:: 2018.3.2
Args:
unix_style (bool):

View file

@ -11,13 +11,14 @@ Two configurations can be set to modify the highstate outputter. These values
can be set in the master config to change the output of the ``salt`` command or
set in the minion config to change the output of the ``salt-call`` command.
state_verbose:
state_verbose
By default `state_verbose` is set to `True`, setting this to `False` will
instruct the highstate outputter to omit displaying anything in green, this
means that nothing with a result of True and no changes will not be printed
state_output:
The highstate outputter has six output modes,
``full``, ``terse``, ``mixed``, ``changes`` and ``filter``
* The default is set to ``full``, which will display many lines of detailed
information for each executed chunk.

View file

@ -5,7 +5,7 @@ Proxy Minion interface module for managing Cisco Integrated Management Controlle
.. versionadded:: 2018.3.0
:codeauthor: :email:`Spencer Ervin <spencer_ervin@hotmail.com>`
:codeauthor: ``Spencer Ervin <spencer_ervin@hotmail.com>``
:maturity: new
:depends: none
:platform: unix

View file

@ -5,7 +5,7 @@ Proxy Minion interface module for managing Palo Alto firewall devices
.. versionadded:: 2018.3.0
:codeauthor: :email:`Spencer Ervin <spencer_ervin@hotmail.com>`
:codeauthor: ``Spencer Ervin <spencer_ervin@hotmail.com>``
:maturity: new
:depends: none
:platform: unix

View file

@ -7,38 +7,44 @@ Pass Renderer for Salt
.. versionadded:: 2017.7.0
# Setup
__Note__: `<user>` needs to be replaced with the user salt-master will be
running as
Setup
-----
1. Have private gpg loaded into `user`'s gpg keyring
* Example salt code
```
load_private_gpg_key:
cmd.run:
- name: gpg --import <location_of_private_gpg_key>
- unless: gpg --list-keys '<gpg_name>'
```
1. Said private key's public key should have been used when encrypting pass
entries that are of interest for pillar data
1. Fetch and keep local pass git repo up-to-date
* Example salt code
```
update_pass:
git.latest:
- force_reset: True
- name: <git_repo>
- target: /<user>/.password-store
- identity: <location_of_ssh_private_key>
- require:
- cmd: load_private_gpg_key
```
1. Install pass binary
* Example salt code
```
pass:
pkg.installed
```
.. note::
``<user>`` needs to be replaced with the user salt-master will be running
as
1. Have private gpg loaded into `user`'s gpg keyring. Example:
.. code-block:: yaml
load_private_gpg_key:
cmd.run:
- name: gpg --import <location_of_private_gpg_key>
- unless: gpg --list-keys '<gpg_name>'
2. Said private key's public key should have been used when encrypting pass
entries that are of interest for pillar data.
3. Fetch and keep local pass git repo up-to-date
.. code-block:: yaml
update_pass:
git.latest:
- force_reset: True
- name: <git_repo>
- target: /<user>/.password-store
- identity: <location_of_ssh_private_key>
- require:
- cmd: load_private_gpg_key
4. Install pass binary
.. code-block:: yaml
pass:
pkg.installed
'''
# Import python libs

View file

@ -1017,7 +1017,7 @@ def running(name,
labels
Add metadata to the container. Labels can be set both with and without
values, and labels with values can be passed either as ``key=value`` or
``key: value `` pairs. For example, while the below would be very
``key: value`` pairs. For example, while the below would be very
confusing to read, it is technically valid, and demonstrates the
different ways in which labels can be passed:
@ -2137,11 +2137,12 @@ def run(name,
CLI Examples:
.. code-block:: bash
salt myminion docker.run_container myuser/myimage command=/usr/local/bin/myscript.sh
**USAGE EXAMPLE**
.. code-block:: yaml
.. code-block:: jinja
{% set pkg_version = salt.pillar.get('pkg_version', '1.0-1') %}
build_package:

View file

@ -299,7 +299,7 @@ def present(name,
labels
Add metadata to the network. Labels can be set both with and without
values, and labels with values can be passed either as ``key=value`` or
``key: value `` pairs. For example, while the below would be very
``key: value`` pairs. For example, while the below would be very
confusing to read, it is technically valid, and demonstrates the
different ways in which labels can be passed:
@ -346,7 +346,7 @@ def present(name,
get an error unless you have set up a fixed IPv6 subnet. Consult
the `Docker IPv6 docs`_ for information on how to do this.
.. _`Doocker IPv6 docs`: https://docs.docker.com/engine/userguide/networking/default_network/ipv6/
.. _`Docker IPv6 docs`: https://docs.docker.com/v17.09/engine/userguide/networking/default_network/ipv6/
attachable : False
If ``True``, and the network is in the global scope, non-service

View file

@ -1031,29 +1031,31 @@ def diskgroups_configured(name, diskgroups, erase_disks=False):
'''
Configures the disk groups to use for vsan.
It will do the following:
(1) checks for if all disks in the diskgroup spec exist and errors if they
don't
(2) creates diskgroups with the correct disk configurations if diskgroup
(identified by the cache disk canonical name) doesn't exist
(3) adds extra capacity disks to the existing diskgroup
This function will do the following:
State input example
-------------------
1. Check whether or not all disks in the diskgroup spec exist, and raises
and errors if they do not.
2. Create diskgroups with the correct disk configurations if diskgroup
(identified by the cache disk canonical name) doesn't exist
3. Adds extra capacity disks to the existing diskgroup
Example:
.. code:: python
{
'cache_scsi_addr': 'vmhba1:C0:T0:L0',
'capacity_scsi_addrs': [
'vmhba2:C0:T0:L0',
'vmhba3:C0:T0:L0',
'vmhba4:C0:T0:L0',
]
}
{
'cache_scsi_addr': 'vmhba1:C0:T0:L0',
'capacity_scsi_addrs': [
'vmhba2:C0:T0:L0',
'vmhba3:C0:T0:L0',
'vmhba4:C0:T0:L0',
]
}
name
Mandatory state name.
Mandatory state name
diskgroups
Disk group representation containing scsi disk addresses.
@ -1310,47 +1312,49 @@ def host_cache_configured(name, enabled, datastore, swap_size='100%',
Configures the host cache used for swapping.
It will do the following:
(1) checks if backing disk exists
(2) creates the VMFS datastore if doesn't exist (datastore partition will
be created and use the entire disk
(3) raises an error if dedicated_backing_disk is True and partitions
already exist on the backing disk
(4) configures host_cache to use a portion of the datastore for caching
(either a specific size or a percentage of the datastore)
State input examples
--------------------
1. Checks if backing disk exists
2. Creates the VMFS datastore if doesn't exist (datastore partition will be
created and use the entire disk)
3. Raises an error if ``dedicated_backing_disk`` is ``True`` and partitions
already exist on the backing disk
4. Configures host_cache to use a portion of the datastore for caching
(either a specific size or a percentage of the datastore)
Examples
Percentage swap size (can't be 100%)
.. code:: python
{
'enabled': true,
'datastore': {
'backing_disk_scsi_addr': 'vmhba0:C0:T0:L0',
'vmfs_version': 5,
'name': 'hostcache'
}
'dedicated_backing_disk': false
'swap_size': '98%',
}
.. code:: python
{
'enabled': true,
'datastore': {
'backing_disk_scsi_addr': 'vmhba0:C0:T0:L0',
'vmfs_version': 5,
'name': 'hostcache'
}
'dedicated_backing_disk': false
'swap_size': '98%',
}
Fixed sized swap size
{
'enabled': true,
'datastore': {
'backing_disk_scsi_addr': 'vmhba0:C0:T0:L0',
'vmfs_version': 5,
'name': 'hostcache'
}
'dedicated_backing_disk': true
'swap_size': '10GiB',
}
.. code:: python
{
'enabled': true,
'datastore': {
'backing_disk_scsi_addr': 'vmhba0:C0:T0:L0',
'vmfs_version': 5,
'name': 'hostcache'
}
'dedicated_backing_disk': true
'swap_size': '10GiB',
}
name
Mandatory state name.

View file

@ -5,7 +5,7 @@ Apache Libcloud Load Balancer State
Manage load balancers using libcloud
:codeauthor: :email:`Anthony Shaw <anthonyshaw@apache.org>`
:codeauthor: ``Anthony Shaw <anthonyshaw@apache.org>``
Apache Libcloud load balancer management for a full list
of supported clouds, see http://libcloud.readthedocs.io/en/latest/loadbalancer/supported_providers.html

View file

@ -5,7 +5,7 @@ Apache Libcloud Storage State
Manage cloud storage using libcloud
:codeauthor: :email:`Anthony Shaw <anthonyshaw@apache.org>`
:codeauthor: ``Anthony Shaw <anthonyshaw@apache.org>``
Apache Libcloud Storage (object/blob) management for a full list
of supported clouds, see http://libcloud.readthedocs.io/en/latest/storage/supported_providers.html

View file

@ -51,7 +51,8 @@ def rotate(name, **kwargs):
name : string
alias for entryname
**kwargs : boolean|string|int
kwargs : boolean|string|int
optional additional flags and parameters
'''

View file

@ -61,12 +61,11 @@ def present(name, auth=None, **kwargs):
Set the network administrative state to up.
vlan
Vlan ID. Alias for
provider:
- physical_network: provider
- network_type: vlan
- segmentation_id: (vlan id)
Vlan ID. Alias for provider
- physical_network: provider
- network_type: vlan
- segmentation_id: (vlan id)
'''
ret = {'name': name,
'changes': {},

View file

@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
'''
Management of OpenStack Neutron Security Groups
=========================================
===============================================
.. versionadded:: 2018.3.0

View file

@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
'''
Management of OpenStack Neutron Security Group Rules
=========================================
====================================================
.. versionadded:: 2018.3.0

View file

@ -403,7 +403,7 @@ def key_absent(name, use_32bit_registry=False):
CLI Example:
The following example will delete the ``SOFTWARE\DeleteMe`` key in the
``HKEY_LOCAL_MACHINE` hive including all its subkeys and value pairs.
``HKEY_LOCAL_MACHINE`` hive including all its subkeys and value pairs.
.. code-block:: yaml

View file

@ -3,8 +3,6 @@ r'''
Manage Vagrant VMs
==================
.. index:: Vagrant state function
Manange execution of Vagrant virtual machines on Salt minions.
Vagrant_ is a tool for building and managing virtual machine environments.