Skip to content

Commit 7d9298f

Browse files
author
Martin Neubert
authored
Merge pull request #5 from T-Systems-MMS/bugfix/missing-methods
Bugfix/missing methods
2 parents 6fe9e6f + 7e3cad5 commit 7d9298f

4 files changed

Lines changed: 13 additions & 5 deletions

File tree

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,10 @@ jobs:
3333
run: poetry version ${{ steps.version.outputs.next-version }}
3434

3535
- name: Update Version in init
36-
run: sed -i "s/^__version__ = '.*'/__version__ = '${{ steps.version.outputs.next-version }}'/g" fortilib/__init__.py
36+
run: sed -i "s/^__version__ = \".*\"/__version__ = \"${{ steps.version.outputs.next-version }}\"/g" fortilib/__init__.py
3737

3838
- name: Update Version in docs
39-
run: sed -i "s/^release = '.*'/release = '${{ steps.version.outputs.next-version }}'/g" docs/source/conf.py
39+
run: sed -i "s/^release = \".*\"/release = \"${{ steps.version.outputs.next-version }}\"/g" docs/source/conf.py
4040

4141
- name: Generate changelog
4242
uses: charmixer/auto-changelog-action@v1

docs/source/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
author = "NOC ZED"
2424

2525
# The full version, including alpha/beta/rc tags
26-
release = '0.1.1'
26+
release = "0.1.1"
2727

2828

2929
# -- General configuration ---------------------------------------------------

fortilib/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
__version__ = '0.1.1'
1+
__version__ = "0.1.1"
22

33
from typing import (
44
Dict,
@@ -16,7 +16,7 @@ def get_by(attrname, attrvalue, haystack):
1616
def get_fortigate_member_array(source: List, attrname="name") -> List[Dict]:
1717
ret = []
1818
for member in sorted(
19-
source, key=lambda _source: getattr(_source, attrname)
19+
source, key=lambda _source: getattr(_source, attrname)
2020
):
2121
ret.append(
2222
{

fortilib/fortigateapi.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1029,3 +1029,11 @@ def delete_proxy_address_group(self, group_name: str):
10291029
return self.query_api_delete(
10301030
FortiGateApi.ENDPOINT_FIREWALL_PROXY_ADDRESS_GROUP, group_name
10311031
)
1032+
1033+
def get_write_operations(self):
1034+
filtered: List[FortiGateOperation] = []
1035+
for operation in self.operations:
1036+
if operation.query_type != FortiGateQueryType.GET:
1037+
filtered.append(operation)
1038+
1039+
return filtered

0 commit comments

Comments
 (0)