Skip to content

Commit 281a480

Browse files
committed
Upgrade OpenVPN software version
Upgrade requirements and bump micro version Improve linting and runbook UI
1 parent 6c18bc8 commit 281a480

15 files changed

Lines changed: 253 additions & 147 deletions

.github/workflows/markdown-validation.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,7 @@ on:
1111

1212
jobs:
1313
none-shall-pass:
14-
runs-on:
15-
- self-hosted
16-
- Ubuntu
14+
runs-on: thevickypedia-default
1715
steps:
1816
- uses: thevickypedia/none-shall-pass@v5
1917
with:
Lines changed: 6 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,14 @@
1-
# This workflow will upload a Python Package using Twine when a release is created
2-
31
name: pypi-publish
42

5-
# Controls when the workflow will run
63
on:
7-
workflow_dispatch: {}
4+
workflow_dispatch:
85
release:
96
types: [ published ]
107

118
jobs:
12-
deploy:
13-
runs-on: self-hosted
9+
pypi-publisher:
10+
runs-on: thevickypedia-default
1411
steps:
15-
- uses: actions/checkout@v4
16-
- name: Set up Python
17-
uses: actions/setup-python@v5
18-
with:
19-
python-version: '3.x'
20-
- name: Install dependencies
21-
run: |
22-
python -m pip install --upgrade pip
23-
pip install build twine
24-
- name: Create packages
25-
run: python -m build
26-
- name: Run twine check
27-
run: twine check dist/*
28-
- name: Upload to pypi
29-
env:
30-
TWINE_USERNAME: ${{ secrets.PYPI_USER }}
31-
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
32-
run: twine upload dist/*.whl
12+
- uses: thevickypedia/pypi-publisher@v3
13+
env:
14+
token: ${{ secrets.PYPI_TOKEN }}

.pre-commit-config.yaml

Lines changed: 42 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,46 @@
1+
---
12
fail_fast: true
2-
exclude: ^docs/
3+
exclude: ^(notebooks/|scripts/|.github/|docs/)
34
repos:
4-
- repo: https://github.com/pre-commit/pre-commit-hooks
5-
rev: v4.4.0
6-
hooks:
7-
- id: check-added-large-files
8-
- id: check-ast
9-
- id: check-byte-order-marker
10-
- id: check-builtin-literals
11-
- id: check-case-conflict
12-
- id: check-docstring-first
13-
- id: check-executables-have-shebangs
14-
- id: check-shebang-scripts-are-executable
15-
- id: check-merge-conflict
16-
- id: check-toml
17-
- id: check-vcs-permalinks
18-
- id: check-xml
19-
- id: debug-statements
20-
- id: destroyed-symlinks
21-
- id: detect-aws-credentials
22-
- id: detect-private-key
23-
- id: end-of-file-fixer
24-
- id: fix-byte-order-marker
25-
- id: mixed-line-ending
26-
- id: name-tests-test
27-
- id: requirements-txt-fixer
28-
- id: trailing-whitespace
5+
- repo: https://github.com/pre-commit/pre-commit-hooks
6+
rev: v4.4.0
7+
hooks:
8+
- id: check-yaml
9+
- id: check-json
10+
- id: check-added-large-files
11+
- id: check-ast
12+
- id: check-byte-order-marker
13+
- id: check-builtin-literals
14+
- id: check-case-conflict
15+
- id: check-docstring-first
16+
- id: check-executables-have-shebangs
17+
- id: check-shebang-scripts-are-executable
18+
- id: check-merge-conflict
19+
- id: check-toml
20+
- id: check-vcs-permalinks
21+
- id: check-xml
22+
- id: debug-statements
23+
- id: destroyed-symlinks
24+
- id: detect-aws-credentials
25+
- id: detect-private-key
26+
- id: end-of-file-fixer
27+
- id: fix-byte-order-marker
28+
- id: mixed-line-ending
29+
- id: name-tests-test
30+
- id: requirements-txt-fixer
31+
- id: trailing-whitespace
2932

30-
- repo: https://github.com/PyCQA/isort
31-
rev: 5.12.0
32-
hooks:
33-
- id: isort
33+
- repo: https://github.com/PyCQA/isort
34+
rev: 5.12.0
35+
hooks:
36+
- id: isort
3437

35-
- repo: local
36-
hooks:
37-
-
38-
id: docs
39-
name: docs
40-
entry: /bin/bash pre_commit.sh
41-
language: system
42-
pass_filenames: false
43-
always_run: true
38+
- repo: local
39+
hooks:
40+
-
41+
id: docs
42+
name: docs
43+
entry: /bin/bash pre_commit.sh
44+
language: system
45+
pass_filenames: false
46+
always_run: true

doc_gen/static.css

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.sphinxsidebarwrapper {
2+
overflow-y: scroll;
3+
}

docs/_static/static.css

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.sphinxsidebarwrapper {
2+
overflow-y: scroll;
3+
}

docs/index.html

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -439,6 +439,16 @@ <h1>Configuration<a class="headerlink" href="#configuration" title="Permalink to
439439
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">AMIBase</span>
440440
</pre></div>
441441
</div>
442+
<div class="admonition seealso">
443+
<p class="admonition-title">See also</p>
444+
<ul class="simple">
445+
<li><p>Subscription Home Page: <a class="reference external" href="https:/">https:/</a>/{REGION}.console.aws.amazon.com/marketplace/home#/subscriptions/{_PRODUCT_ID}</p></li>
446+
<li><p>Product ID: Found in the home page URL under Summary as ‘Product ID’</p></li>
447+
<li><p>Product Code: Offer ID in the home page URL</p></li>
448+
<li><p>AMI Alias: Found in configuration page (_BASE_URL) as ‘Ami Alias’</p></li>
449+
<li><p>Product Code: Found in configuration page (_BASE_URL) as ‘Product Code’</p></li>
450+
</ul>
451+
</div>
442452
<p>Create a new model by parsing and validating input data from keyword arguments.</p>
443453
<p>Raises [<cite>ValidationError</cite>][pydantic_core.ValidationError] if the input data cannot be
444454
validated to form a valid model.</p>

docs/searchindex.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

release_notes.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
Release Notes
22
=============
33

4+
1.7.1 (05/26/2024)
5+
------------------
6+
- Upgrades ``OpenVPN`` software version and dependencies
7+
- Improves linting and runbook UI
8+
49
1.7 (01/30/2024)
510
----------------
611
- Improved accuracy for validating alias record

vpn/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"""Place holder for package."""
22

33
from vpn.main import VPNServer # noqa: F401
4-
from vpn.models import (config, exceptions, image_factory, # noqa: F401
5-
logger, route53, server, util)
4+
from vpn.models import image_factory # noqa: F401
5+
from vpn.models import config, exceptions, logger, route53, server, util
66

7-
version = "1.7"
7+
version = "1.7.1"

vpn/main.py

Lines changed: 30 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -190,26 +190,36 @@ def _authorize_security_group(self,
190190
security_group = self.ec2_resource.SecurityGroup(security_group_id)
191191
security_group.authorize_ingress(
192192
IpPermissions=[
193-
{'IpProtocol': 'tcp',
194-
'FromPort': 22,
195-
'ToPort': 22,
196-
'IpRanges': [{'CidrIp': '0.0.0.0/0'}]},
197-
{'IpProtocol': 'tcp',
198-
'FromPort': 443,
199-
'ToPort': 443,
200-
'IpRanges': [{'CidrIp': '0.0.0.0/0'}]},
201-
{'IpProtocol': 'tcp',
202-
'FromPort': config.env.vpn_port,
203-
'ToPort': config.env.vpn_port,
204-
'IpRanges': [{'CidrIp': '0.0.0.0/0'}]},
205-
{'IpProtocol': 'tcp',
206-
'FromPort': 945,
207-
'ToPort': 945,
208-
'IpRanges': [{'CidrIp': '0.0.0.0/0'}]},
209-
{'IpProtocol': 'udp',
210-
'FromPort': 1194,
211-
'ToPort': 1194,
212-
'IpRanges': [{'CidrIp': '0.0.0.0/0'}]}
193+
{
194+
'IpProtocol': 'tcp',
195+
'FromPort': 22,
196+
'ToPort': 22,
197+
'IpRanges': [{'CidrIp': '0.0.0.0/0'}]
198+
},
199+
{
200+
'IpProtocol': 'tcp',
201+
'FromPort': 443,
202+
'ToPort': 443,
203+
'IpRanges': [{'CidrIp': '0.0.0.0/0'}]
204+
},
205+
{
206+
'IpProtocol': 'tcp',
207+
'FromPort': config.env.vpn_port,
208+
'ToPort': config.env.vpn_port,
209+
'IpRanges': [{'CidrIp': '0.0.0.0/0'}]
210+
},
211+
{
212+
'IpProtocol': 'tcp',
213+
'FromPort': 945,
214+
'ToPort': 945,
215+
'IpRanges': [{'CidrIp': '0.0.0.0/0'}]
216+
},
217+
{
218+
'IpProtocol': 'udp',
219+
'FromPort': 1194,
220+
'ToPort': 1194,
221+
'IpRanges': [{'CidrIp': '0.0.0.0/0'}]
222+
}
213223
])
214224
except ClientError as error:
215225
error = str(error)

0 commit comments

Comments
 (0)