Skip to content

Commit

Permalink
Update dev docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Shyue Ping Ong committed Jun 5, 2023
1 parent 62683fe commit f3303d0
Show file tree
Hide file tree
Showing 48 changed files with 439 additions and 403 deletions.
2 changes: 1 addition & 1 deletion custodian/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
"""

__author__ = "Shyue Ping Ong, William Davidson Richards, Stephen Dacek, Xiaohui Qu, Matthew Horton, Samuel M. Blau"
__version__ = "2023.5.12"
__version__ = "2023.6.5"

from .custodian import Custodian
40 changes: 20 additions & 20 deletions docs/_modules/custodian/ansible/actions.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>custodian.ansible.actions &#8212; custodian 2023.5.12 documentation</title>
<title>custodian.ansible.actions &#8212; custodian 2023.6.5 documentation</title>
<link rel="stylesheet" type="text/css" href="../../../_static/pygments.css" />
<link rel="stylesheet" type="text/css" href="../../../_static/flasky.css" />
<script data-url_root="../../../" id="documentation_options" src="../../../_static/documentation_options.js"></script>
Expand Down Expand Up @@ -34,7 +34,7 @@ <h3>Navigation</h3>
<li class="right" >
<a href="../../../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="nav-item nav-item-0"><a href="../../../index.html">custodian 2023.5.12 documentation</a> &#187;</li>
<li class="nav-item nav-item-0"><a href="../../../index.html">custodian 2023.6.5 documentation</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="../../index.html" accesskey="U">Module code</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">custodian.ansible.actions</a></li>
</ul>
Expand All @@ -57,7 +57,7 @@ <h1>Source code for custodian.ansible.actions</h1><div class="highlight"><pre>


<div class="viewcode-block" id="get_nested_dict"><a class="viewcode-back" href="../../../custodian.ansible.html#custodian.ansible.actions.get_nested_dict">[docs]</a><span class="k">def</span> <span class="nf">get_nested_dict</span><span class="p">(</span><span class="n">input_dict</span><span class="p">,</span> <span class="n">key</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Helper function to interpret a nested dict input.</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="n">current</span> <span class="o">=</span> <span class="n">input_dict</span>
Expand All @@ -73,7 +73,7 @@ <h1>Source code for custodian.ansible.actions</h1><div class="highlight"><pre>


<div class="viewcode-block" id="DictActions"><a class="viewcode-back" href="../../../custodian.ansible.html#custodian.ansible.actions.DictActions">[docs]</a><span class="k">class</span> <span class="nc">DictActions</span><span class="p">:</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Class to implement the supported mongo-like modifications on a dict.</span>
<span class="sd"> Supported keywords include the following Mongo-based keywords, with the</span>
<span class="sd"> usual meanings (refer to Mongo documentation for information):</span>
Expand All @@ -97,7 +97,7 @@ <h1>Source code for custodian.ansible.actions</h1><div class="highlight"><pre>

<div class="viewcode-block" id="DictActions.set"><a class="viewcode-back" href="../../../custodian.ansible.html#custodian.ansible.actions.DictActions.set">[docs]</a> <span class="nd">@staticmethod</span>
<span class="k">def</span> <span class="nf">set</span><span class="p">(</span><span class="n">input_dict</span><span class="p">,</span> <span class="n">settings</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Sets a value using MongoDB syntax.</span>

<span class="sd"> Args:</span>
Expand All @@ -110,7 +110,7 @@ <h1>Source code for custodian.ansible.actions</h1><div class="highlight"><pre>

<div class="viewcode-block" id="DictActions.unset"><a class="viewcode-back" href="../../../custodian.ansible.html#custodian.ansible.actions.DictActions.unset">[docs]</a> <span class="nd">@staticmethod</span>
<span class="k">def</span> <span class="nf">unset</span><span class="p">(</span><span class="n">input_dict</span><span class="p">,</span> <span class="n">settings</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Unsets a value using MongoDB syntax.</span>

<span class="sd"> Args:</span>
Expand All @@ -123,7 +123,7 @@ <h1>Source code for custodian.ansible.actions</h1><div class="highlight"><pre>

<div class="viewcode-block" id="DictActions.push"><a class="viewcode-back" href="../../../custodian.ansible.html#custodian.ansible.actions.DictActions.push">[docs]</a> <span class="nd">@staticmethod</span>
<span class="k">def</span> <span class="nf">push</span><span class="p">(</span><span class="n">input_dict</span><span class="p">,</span> <span class="n">settings</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Push to a list using MongoDB syntax.</span>

<span class="sd"> Args:</span>
Expand All @@ -139,7 +139,7 @@ <h1>Source code for custodian.ansible.actions</h1><div class="highlight"><pre>

<div class="viewcode-block" id="DictActions.push_all"><a class="viewcode-back" href="../../../custodian.ansible.html#custodian.ansible.actions.DictActions.push_all">[docs]</a> <span class="nd">@staticmethod</span>
<span class="k">def</span> <span class="nf">push_all</span><span class="p">(</span><span class="n">input_dict</span><span class="p">,</span> <span class="n">settings</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Push multiple items to a list using MongoDB syntax.</span>

<span class="sd"> Args:</span>
Expand All @@ -155,7 +155,7 @@ <h1>Source code for custodian.ansible.actions</h1><div class="highlight"><pre>

<div class="viewcode-block" id="DictActions.inc"><a class="viewcode-back" href="../../../custodian.ansible.html#custodian.ansible.actions.DictActions.inc">[docs]</a> <span class="nd">@staticmethod</span>
<span class="k">def</span> <span class="nf">inc</span><span class="p">(</span><span class="n">input_dict</span><span class="p">,</span> <span class="n">settings</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Increment a value using MongdoDB syntax.</span>

<span class="sd"> Args:</span>
Expand All @@ -171,7 +171,7 @@ <h1>Source code for custodian.ansible.actions</h1><div class="highlight"><pre>

<div class="viewcode-block" id="DictActions.rename"><a class="viewcode-back" href="../../../custodian.ansible.html#custodian.ansible.actions.DictActions.rename">[docs]</a> <span class="nd">@staticmethod</span>
<span class="k">def</span> <span class="nf">rename</span><span class="p">(</span><span class="n">input_dict</span><span class="p">,</span> <span class="n">settings</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Rename a key using MongoDB syntax.</span>

<span class="sd"> Args:</span>
Expand All @@ -185,7 +185,7 @@ <h1>Source code for custodian.ansible.actions</h1><div class="highlight"><pre>

<div class="viewcode-block" id="DictActions.add_to_set"><a class="viewcode-back" href="../../../custodian.ansible.html#custodian.ansible.actions.DictActions.add_to_set">[docs]</a> <span class="nd">@staticmethod</span>
<span class="k">def</span> <span class="nf">add_to_set</span><span class="p">(</span><span class="n">input_dict</span><span class="p">,</span> <span class="n">settings</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Add to set using MongoDB syntax.</span>

<span class="sd"> Args:</span>
Expand All @@ -203,7 +203,7 @@ <h1>Source code for custodian.ansible.actions</h1><div class="highlight"><pre>

<div class="viewcode-block" id="DictActions.pull"><a class="viewcode-back" href="../../../custodian.ansible.html#custodian.ansible.actions.DictActions.pull">[docs]</a> <span class="nd">@staticmethod</span>
<span class="k">def</span> <span class="nf">pull</span><span class="p">(</span><span class="n">input_dict</span><span class="p">,</span> <span class="n">settings</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Pull an item using MongoDB syntax.</span>

<span class="sd"> Args:</span>
Expand All @@ -219,7 +219,7 @@ <h1>Source code for custodian.ansible.actions</h1><div class="highlight"><pre>

<div class="viewcode-block" id="DictActions.pull_all"><a class="viewcode-back" href="../../../custodian.ansible.html#custodian.ansible.actions.DictActions.pull_all">[docs]</a> <span class="nd">@staticmethod</span>
<span class="k">def</span> <span class="nf">pull_all</span><span class="p">(</span><span class="n">input_dict</span><span class="p">,</span> <span class="n">settings</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Pull multiple items to a list using MongoDB syntax.</span>

<span class="sd"> Args:</span>
Expand All @@ -234,7 +234,7 @@ <h1>Source code for custodian.ansible.actions</h1><div class="highlight"><pre>

<div class="viewcode-block" id="DictActions.pop"><a class="viewcode-back" href="../../../custodian.ansible.html#custodian.ansible.actions.DictActions.pop">[docs]</a> <span class="nd">@staticmethod</span>
<span class="k">def</span> <span class="nf">pop</span><span class="p">(</span><span class="n">input_dict</span><span class="p">,</span> <span class="n">settings</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Pop item from a list using MongoDB syntax.</span>

<span class="sd"> Args:</span>
Expand All @@ -252,15 +252,15 @@ <h1>Source code for custodian.ansible.actions</h1><div class="highlight"><pre>


<div class="viewcode-block" id="FileActions"><a class="viewcode-back" href="../../../custodian.ansible.html#custodian.ansible.actions.FileActions">[docs]</a><span class="k">class</span> <span class="nc">FileActions</span><span class="p">:</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Class of supported file actions. For FileActions, the modder class takes in</span>
<span class="sd"> a filename as a string. The filename should preferably be a full path to</span>
<span class="sd"> avoid ambiguity.</span>
<span class="sd"> &quot;&quot;&quot;</span>

<div class="viewcode-block" id="FileActions.file_create"><a class="viewcode-back" href="../../../custodian.ansible.html#custodian.ansible.actions.FileActions.file_create">[docs]</a> <span class="nd">@staticmethod</span>
<span class="k">def</span> <span class="nf">file_create</span><span class="p">(</span><span class="n">filename</span><span class="p">,</span> <span class="n">settings</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Creates a file.</span>

<span class="sd"> Args:</span>
Expand All @@ -276,7 +276,7 @@ <h1>Source code for custodian.ansible.actions</h1><div class="highlight"><pre>

<div class="viewcode-block" id="FileActions.file_move"><a class="viewcode-back" href="../../../custodian.ansible.html#custodian.ansible.actions.FileActions.file_move">[docs]</a> <span class="nd">@staticmethod</span>
<span class="k">def</span> <span class="nf">file_move</span><span class="p">(</span><span class="n">filename</span><span class="p">,</span> <span class="n">settings</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Moves a file. {&#39;_file_move&#39;: {&#39;dest&#39;: &#39;new_file_name&#39;}}</span>

<span class="sd"> Args:</span>
Expand All @@ -291,7 +291,7 @@ <h1>Source code for custodian.ansible.actions</h1><div class="highlight"><pre>

<div class="viewcode-block" id="FileActions.file_delete"><a class="viewcode-back" href="../../../custodian.ansible.html#custodian.ansible.actions.FileActions.file_delete">[docs]</a> <span class="nd">@staticmethod</span>
<span class="k">def</span> <span class="nf">file_delete</span><span class="p">(</span><span class="n">filename</span><span class="p">,</span> <span class="n">settings</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Deletes a file. {&#39;_file_delete&#39;: {&#39;mode&#39;: &quot;actual&quot;}}</span>

<span class="sd"> Args:</span>
Expand All @@ -313,7 +313,7 @@ <h1>Source code for custodian.ansible.actions</h1><div class="highlight"><pre>

<div class="viewcode-block" id="FileActions.file_copy"><a class="viewcode-back" href="../../../custodian.ansible.html#custodian.ansible.actions.FileActions.file_copy">[docs]</a> <span class="nd">@staticmethod</span>
<span class="k">def</span> <span class="nf">file_copy</span><span class="p">(</span><span class="n">filename</span><span class="p">,</span> <span class="n">settings</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Copies a file. {&#39;_file_copy&#39;: {&#39;dest&#39;: &#39;new_file_name&#39;}}</span>

<span class="sd"> Args:</span>
Expand All @@ -326,7 +326,7 @@ <h1>Source code for custodian.ansible.actions</h1><div class="highlight"><pre>

<div class="viewcode-block" id="FileActions.file_modify"><a class="viewcode-back" href="../../../custodian.ansible.html#custodian.ansible.actions.FileActions.file_modify">[docs]</a> <span class="nd">@staticmethod</span>
<span class="k">def</span> <span class="nf">file_modify</span><span class="p">(</span><span class="n">filename</span><span class="p">,</span> <span class="n">settings</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Modifies file access</span>

<span class="sd"> Args:</span>
Expand Down
Loading

0 comments on commit f3303d0

Please sign in to comment.