Skip to content

Commit d32098c

Browse files
authored
Update get_access_policy_for_resource no policy test (#317)
* Update get_access_policy_for_resource no policy test to account for Registry body on no policy * Change PUT to POST for update_flow_version_with_http_info
1 parent 12dd615 commit d32098c

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

nipyapi/nifi/apis/versions_api.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -479,7 +479,7 @@ def delete_version_control_request_with_http_info(self, id, **kwargs):
479479
def export_flow_version(self, id, **kwargs):
480480
"""
481481
Gets the latest version of a Process Group for download
482-
482+
483483
This method makes a synchronous HTTP request by default. To make an
484484
asynchronous HTTP request, please define a `callback` function
485485
to be invoked when receiving the response.
@@ -505,7 +505,7 @@ def export_flow_version(self, id, **kwargs):
505505
def export_flow_version_with_http_info(self, id, **kwargs):
506506
"""
507507
Gets the latest version of a Process Group for download
508-
508+
509509
This method makes a synchronous HTTP request by default. To make an
510510
asynchronous HTTP request, please define a `callback` function
511511
to be invoked when receiving the response.
@@ -1455,7 +1455,7 @@ def update_flow_version_with_http_info(self, id, body, **kwargs):
14551455
# Authentication setting
14561456
auth_settings = ['tokenAuth']
14571457

1458-
return self.api_client.call_api('/versions/process-groups/{id}', 'PUT',
1458+
return self.api_client.call_api('/versions/process-groups/{id}', 'POST',
14591459
path_params,
14601460
query_params,
14611461
header_params,

nipyapi/security.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -638,7 +638,7 @@ def get_access_policy_for_resource(resource,
638638
nipyapi.utils.bypass_slash_encoding(service, False)
639639
return response
640640
except nipyapi.nifi.rest.ApiException as e:
641-
if 'Unable to find access policy' in e.body:
641+
if any(pol_string in e.body for pol_string in ['Unable to find access policy', 'No policy found']):
642642
log.info("Access policy not found")
643643
if not auto_create:
644644
return None

0 commit comments

Comments
 (0)