Skip to content

Commit

Permalink
nifi add update property
Browse files Browse the repository at this point in the history
  • Loading branch information
marceloarocha committed Dec 12, 2024
1 parent 6b85379 commit 6a44324
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions models/enums.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ class NifiQueueActionTypeEnum(Enum):
TERMINATE_PROCESS = "TERMINATE_PROCESS"
CUSTOM_CALLBACK = "CUSTOM_CALLBACK"
REFRESH_TEMPLATE = "REFRESH_TEMPLATE"
UPDATE_PROPERTY = "UPDATE_PROPERTY"


class DrugAlertTypeEnum(Enum):
Expand Down
7 changes: 7 additions & 0 deletions services/admin/admin_integration_remote_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,13 @@ def _get_new_queue(id_processor: str, action_type: str, data: dict):
elif NifiQueueActionTypeEnum.REFRESH_TEMPLATE.value == action_type:
queue.url = f"nifi-api/system-diagnostics"
queue.method = "GET"
elif NifiQueueActionTypeEnum.UPDATE_PROPERTY.value == action_type:
queue.url = f"nifi-api/processors/{escape(id_processor)}"
queue.method = "PUT"
queue.body = {
"id": id_processor,
"config": {"properties": data["properties"]},
}

return queue

Expand Down

0 comments on commit 6a44324

Please sign in to comment.