Skip to content

Commit

Permalink
Merge pull request #162 from PaloAltoNetworks/feature/add-source_to_g…
Browse files Browse the repository at this point in the history
…ranter-and-granter_to_dest

add source_to_granter and granter_to_dest for IAM Search
  • Loading branch information
SimOnPanw committed Dec 21, 2023
2 parents feebf8c + 84d6bd5 commit ac507e3
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 10 deletions.
32 changes: 25 additions & 7 deletions .github/workflows/pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,42 @@

name: Upload Python Package

#on:
# push:
# branches: [ main ]
# tags:
# - '*'

on:
release:
types: [published]
pull_request:
types:
- closed

jobs:
create-github-release:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
permissions: write-all
steps:
- name: Check out code
uses: actions/checkout@v3

- name: Extract version from prismacloud/cli/version.py
run: |
version=$(grep 'version = ' prismacloud/api/version.py | sed -E "s/version = \"([^\"]+)\"/\1/")
echo "PRISMA_CLOUD_API_VERSION=$version" >> $GITHUB_ENV
- name: Create GitHub Release
run: |
gh release create ${{ env.PRISMA_CLOUD_API_VERSION }} --generate-notes --latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

deploy:
runs-on: ubuntu-latest
needs:
- create-github-release

steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
uses: actions/setup-python@v4
with:
python-version: '3.9'
- name: Install Dependencies
Expand Down
8 changes: 8 additions & 0 deletions prismacloud/api/cspm/_endpoints.py
Original file line number Diff line number Diff line change
Expand Up @@ -538,6 +538,14 @@ def search_iam_read(self, search_params):
next_page_token = api_response.pop('nextPageToken', None)
return result

def search_iam_source_to_granter(self, search_params):
search_url = 'api/v1/permission/graph/source_to_granter'
return self.execute('POST', search_url, body_params=search_params)

def search_iam_granter_to_dest(self, search_params):
search_url = 'api/v1/permission/graph/granter_to_dest'
return self.execute('POST', search_url, body_params=search_params)

def search_suggest_list_read(self, query_to_suggest):
return self.execute('POST', 'search/suggest', body_params=query_to_suggest)

Expand Down
4 changes: 1 addition & 3 deletions prismacloud/api/version.py
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
""" version file """

version = '5.2.8'
version = "5.2.9"

0 comments on commit ac507e3

Please sign in to comment.