Skip to content

Commit

Permalink
Update return types and docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
dormant-user committed Jan 10, 2022
1 parent a46741a commit 5d572cf
Show file tree
Hide file tree
Showing 10 changed files with 52 additions and 33 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
Change Log
==========

0.4.8 (01/09/2022)
------------------
- Update return types and docstrings

0.4.7 (01/09/2022)
------------------
- Remove AMI_ID from mandatory args
Expand Down
12 changes: 5 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,20 @@
[![docs](https://github.com/thevickypedia/vpn-server/actions/workflows/docs.yml/badge.svg)](https://thevickypedia.github.io/vpn-server/)

# VPN Server
Create on demand VPN Server running with `OpenVPN` using `AWS EC2` and `Python`.
Create an on demand VPN Server running with `OpenVPN` using `AWS EC2` and `Python`.

### ENV Variables
Environment variables are loaded from a `.env` file using the `python_dotenv` module.
If a `.env` file is present (with the required variables) in current working directory, there is no need for env vars,
as [`vpn-server`](https://github.com/thevickypedia/vpn-server) loads `.env` files during start up.

<details>
<summary><strong>More on Environment variables</strong></summary>

Use [cloudping.info](https://www.cloudping.info/) to pick the fastest (from current location) available region.

**Default args:**<br>
- **AMI_ID_{REGION_NAME}** - AMI ID in a region. Looks for `AMI_ID_us-west-2` since `us-west-2` is the default region.

AMI IDs are got from `OpenVPN Access Server Community Images` per region.
> AMI IDs are got from `OpenVPN Access Server Community Images` per region.
**Additional args:**<br>
- **AMI_ID_{REGION_NAME}** - AMI ID in a region. Looks for `AMI_ID_us-west-2` since `us-west-2` is the default region.
- **VPN_USERNAME** - Username to access VPN Server once, configuration is done. If `null`, looks for the env var `USER`.
Defaults to `openvpn`
- **VPN_PASSWORD** - Password to access VPN Server once, configuration is done. Defaults to `awsVPN2021`
Expand Down
13 changes: 6 additions & 7 deletions docs/README.html
Original file line number Diff line number Diff line change
Expand Up @@ -60,19 +60,18 @@ <h1>Deployments<a class="headerlink" href="#deployments" title="Permalink to thi
</section>
<section id="vpn-server">
<h1>VPN Server<a class="headerlink" href="#vpn-server" title="Permalink to this headline"></a></h1>
<p>Create on demand VPN Server running with <code class="docutils literal notranslate"><span class="pre">OpenVPN</span></code> using <code class="docutils literal notranslate"><span class="pre">AWS</span> <span class="pre">EC2</span></code> and <code class="docutils literal notranslate"><span class="pre">Python</span></code>.</p>
<p>Create an on demand VPN Server running with <code class="docutils literal notranslate"><span class="pre">OpenVPN</span></code> using <code class="docutils literal notranslate"><span class="pre">AWS</span> <span class="pre">EC2</span></code> and <code class="docutils literal notranslate"><span class="pre">Python</span></code>.</p>
<section id="env-variables">
<h2>ENV Variables<a class="headerlink" href="#env-variables" title="Permalink to this headline"></a></h2>
<p>Environment variables are loaded from a <code class="docutils literal notranslate"><span class="pre">.env</span></code> file using the <code class="docutils literal notranslate"><span class="pre">python_dotenv</span></code> module.</p>
<p>If a <code class="docutils literal notranslate"><span class="pre">.env</span></code> file is present (with the required variables) in current working directory, there is no need for env vars,
as <a class="reference external" href="https://github.com/thevickypedia/vpn-server"><code class="docutils literal notranslate"><span class="pre">vpn-server</span></code></a> loads <code class="docutils literal notranslate"><span class="pre">.env</span></code> files during start up.</p>
<details>
<summary><strong>More on Environment variables</strong></summary><p>Use <a class="reference external" href="https://www.cloudping.info/">cloudping.info</a> to pick the fastest (from current location) available region.</p>
<p><strong>Default args:</strong><br></p>
<blockquote>
<div><p>AMI IDs are got from <code class="docutils literal notranslate"><span class="pre">OpenVPN</span> <span class="pre">Access</span> <span class="pre">Server</span> <span class="pre">Community</span> <span class="pre">Images</span></code> per region.</p>
</div></blockquote>
<ul class="simple">
<li><p><strong>AMI_ID_{REGION_NAME}</strong> - AMI ID in a region. Looks for <code class="docutils literal notranslate"><span class="pre">AMI_ID_us-west-2</span></code> since <code class="docutils literal notranslate"><span class="pre">us-west-2</span></code> is the default region.</p></li>
</ul>
<p>AMI IDs are got from <code class="docutils literal notranslate"><span class="pre">OpenVPN</span> <span class="pre">Access</span> <span class="pre">Server</span> <span class="pre">Community</span> <span class="pre">Images</span></code> per region.</p>
<p><strong>Additional args:</strong><br></p>
<ul class="simple">
<li><p><strong>VPN_USERNAME</strong> - Username to access VPN Server once, configuration is done. If <code class="docutils literal notranslate"><span class="pre">null</span></code>, looks for the env var <code class="docutils literal notranslate"><span class="pre">USER</span></code>.
Defaults to <code class="docutils literal notranslate"><span class="pre">openvpn</span></code></p></li>
<li><p><strong>VPN_PASSWORD</strong> - Password to access VPN Server once, configuration is done. Defaults to <code class="docutils literal notranslate"><span class="pre">awsVPN2021</span></code></p></li>
Expand Down
12 changes: 5 additions & 7 deletions docs/_sources/README.md.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,20 @@
[![docs](https://github.com/thevickypedia/vpn-server/actions/workflows/docs.yml/badge.svg)](https://thevickypedia.github.io/vpn-server/)

# VPN Server
Create on demand VPN Server running with `OpenVPN` using `AWS EC2` and `Python`.
Create an on demand VPN Server running with `OpenVPN` using `AWS EC2` and `Python`.

### ENV Variables
Environment variables are loaded from a `.env` file using the `python_dotenv` module.
If a `.env` file is present (with the required variables) in current working directory, there is no need for env vars,
as [`vpn-server`](https://github.com/thevickypedia/vpn-server) loads `.env` files during start up.

<details>
<summary><strong>More on Environment variables</strong></summary>

Use [cloudping.info](https://www.cloudping.info/) to pick the fastest (from current location) available region.

**Default args:**<br>
- **AMI_ID_{REGION_NAME}** - AMI ID in a region. Looks for `AMI_ID_us-west-2` since `us-west-2` is the default region.

AMI IDs are got from `OpenVPN Access Server Community Images` per region.
> AMI IDs are got from `OpenVPN Access Server Community Images` per region.

**Additional args:**<br>
- **AMI_ID_{REGION_NAME}** - AMI ID in a region. Looks for `AMI_ID_us-west-2` since `us-west-2` is the default region.
- **VPN_USERNAME** - Username to access VPN Server once, configuration is done. If `null`, looks for the env var `USER`.
Defaults to `openvpn`
- **VPN_PASSWORD** - Password to access VPN Server once, configuration is done. Defaults to `awsVPN2021`
Expand Down
10 changes: 8 additions & 2 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -363,13 +363,13 @@ <h1>Welcome to VPN Server’s documentation!<a class="headerlink" href="#welcome

<dl class="py method">
<dt class="sig sig-object py" id="vpn.controller.VPNServer.reconfigure_vpn">
<span class="sig-name descname"><span class="pre">reconfigure_vpn</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#vpn.controller.VPNServer.reconfigure_vpn" title="Permalink to this definition"></a></dt>
<span class="sig-name descname"><span class="pre">reconfigure_vpn</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">None</span></span></span><a class="headerlink" href="#vpn.controller.VPNServer.reconfigure_vpn" title="Permalink to this definition"></a></dt>
<dd><p>Runs the configuration on an existing VPN server.</p>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="vpn.controller.VPNServer.test_vpn">
<span class="sig-name descname"><span class="pre">test_vpn</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#vpn.controller.VPNServer.test_vpn" title="Permalink to this definition"></a></dt>
<span class="sig-name descname"><span class="pre">test_vpn</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">None</span></span></span><a class="headerlink" href="#vpn.controller.VPNServer.test_vpn" title="Permalink to this definition"></a></dt>
<dd><p>Tests the <code class="docutils literal notranslate"><span class="pre">GET</span></code> and <code class="docutils literal notranslate"><span class="pre">SSH</span></code> connections to an existing VPN server.</p>
</dd></dl>

Expand All @@ -394,6 +394,12 @@ <h1>Welcome to VPN Server’s documentation!<a class="headerlink" href="#welcome
<li><p><strong>timeout</strong> – Default session timeout.</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>Flag to indicate whether the interactive session has completed successfully.</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>bool</p>
</dd>
</dl>
</dd></dl>

Expand Down
Loading

0 comments on commit 5d572cf

Please sign in to comment.