Skip to content

Commit ac507e3

Browse files
authored
Merge pull request #162 from PaloAltoNetworks/feature/add-source_to_granter-and-granter_to_dest
add source_to_granter and granter_to_dest for IAM Search
2 parents feebf8c + 84d6bd5 commit ac507e3

3 files changed

Lines changed: 34 additions & 10 deletions

File tree

.github/workflows/pypi.yml

Lines changed: 25 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,42 @@
22

33
name: Upload Python Package
44

5-
#on:
6-
# push:
7-
# branches: [ main ]
8-
# tags:
9-
# - '*'
10-
115
on:
126
release:
137
types: [published]
8+
pull_request:
9+
types:
10+
- closed
1411

1512
jobs:
13+
create-github-release:
14+
if: github.event.pull_request.merged == true
15+
runs-on: ubuntu-latest
16+
permissions: write-all
17+
steps:
18+
- name: Check out code
19+
uses: actions/checkout@v3
20+
21+
- name: Extract version from prismacloud/cli/version.py
22+
run: |
23+
version=$(grep 'version = ' prismacloud/api/version.py | sed -E "s/version = \"([^\"]+)\"/\1/")
24+
echo "PRISMA_CLOUD_API_VERSION=$version" >> $GITHUB_ENV
25+
26+
- name: Create GitHub Release
27+
run: |
28+
gh release create ${{ env.PRISMA_CLOUD_API_VERSION }} --generate-notes --latest
29+
env:
30+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
31+
1632
deploy:
1733
runs-on: ubuntu-latest
34+
needs:
35+
- create-github-release
1836

1937
steps:
2038
- uses: actions/checkout@v3
2139
- name: Set up Python
22-
uses: actions/setup-python@v3
40+
uses: actions/setup-python@v4
2341
with:
2442
python-version: '3.9'
2543
- name: Install Dependencies

prismacloud/api/cspm/_endpoints.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -538,6 +538,14 @@ def search_iam_read(self, search_params):
538538
next_page_token = api_response.pop('nextPageToken', None)
539539
return result
540540

541+
def search_iam_source_to_granter(self, search_params):
542+
search_url = 'api/v1/permission/graph/source_to_granter'
543+
return self.execute('POST', search_url, body_params=search_params)
544+
545+
def search_iam_granter_to_dest(self, search_params):
546+
search_url = 'api/v1/permission/graph/granter_to_dest'
547+
return self.execute('POST', search_url, body_params=search_params)
548+
541549
def search_suggest_list_read(self, query_to_suggest):
542550
return self.execute('POST', 'search/suggest', body_params=query_to_suggest)
543551

prismacloud/api/version.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
1-
""" version file """
2-
3-
version = '5.2.8'
1+
version = "5.2.9"

0 commit comments

Comments
 (0)