Skip to content

Commit

Permalink
Merge 0.15.0 release from Next to Master (#228)
Browse files Browse the repository at this point in the history
* Add greedy control to get_processor to support exact matching on get operation
Add basicAuth support to nifi client and security module

* Add greedy control to several get_ functions to support exact matching on operation
Add basicAuth support to nifi client and security module
Updated test containers to 1.11.4
Added special case for 'root' to get_processor
Corrected list_invalid_processors to correctly report an empty list
update_controller now has a refresh option
get_template now correctly returns None if Template not found
is_endpoint_up now has a reasonable default timeout
automatically trim API endpoint URLs of trailing slash to avoid really really annoying errors

* Added configuration control for NiFi Authentication mode, either tokenAuth or basicAuth
Improved Linting and Logging statements in security.py

* Adding vscode to gitignore because OSX is bloody stupid and invasive

* Bump version: 0.14.1 → 0.14.2

* Bump version: 0.14.2 → 0.14.3

* Add greedy control to get_processor to support exact matching on get operation
Add basicAuth support to nifi client and security module

* Added configuration control for NiFi Authentication mode, either tokenAuth or basicAuth
Improved Linting and Logging statements in security.py

* Update base clients to NiFi-1.12.1 and Registry-0.7.0

* Add greedy control to get_processor to support exact matching on get operation
Add basicAuth support to nifi client and security module

* Added configuration control for NiFi Authentication mode, either tokenAuth or basicAuth
Improved Linting and Logging statements in security.py

* Update base clients to NiFi-1.12.1 and Registry-0.7.0

* Updated contributing.rst to include guidance on new features going into Next branch
Added create and delete port to _all_ in canvas.py. Fixes #192
Coding style fixes.

* Bump version: 0.14.3 → 0.15.0

* Doc fixes for release
Update history for release
  • Loading branch information
Chaffelson committed Nov 6, 2020
1 parent c655aae commit 1353624
Show file tree
Hide file tree
Showing 440 changed files with 32,238 additions and 1,063 deletions.
1 change: 1 addition & 0 deletions docs/contributing.rst
Expand Up @@ -118,3 +118,4 @@ Before you submit a pull request, check that it meets these guidelines:
3. The pull request should work for Python 2.7 and 3.6, and for PyPy. Check
https://travis-ci.org/Chaffelson/nipyapi/pull_requests
and make sure that the tests pass for all supported Python versions.
4. Pull requests should be created against the 'next' branch for new features, or 'master' for critical patches to current functionality.
13 changes: 13 additions & 0 deletions docs/history.rst
Expand Up @@ -2,6 +2,19 @@
History
=======

0.15.0 (2020-11-06)
-------------------

| Updated NiFi client and helpers to 1.12.1, Registry client to 0.7.0
| Release to include new fixes and features in baseline, work continues on improving different Authentication methods

* Added new Parameter contexts API to docs
* Resolved bug where funnel position did not honour requested location (thanks @geocali)
* Fixed issue where users expected exact search by default but some functions were silently using greedy search (thanks @razdob15)
* Change deploy_template to use floats for deployment instead of int (thanks @bgeisberger)
* Fixed creation of empty user groups (thanks @razdob15)

0.14.0 (2019-11-06)
-------------------

Expand Down
4 changes: 2 additions & 2 deletions docs/nipyapi-docs/nipyapi.nifi.apis.rst
Expand Up @@ -101,13 +101,13 @@ nipyapi.nifi.apis.output\_ports\_api module
:show-inheritance:

nipyapi.nifi.apis.parameter\_contexts\_api module
--------------------------------------
-------------------------------------------------

.. automodule:: nipyapi.nifi.apis.parameter_contexts_api
:members:
:undoc-members:
:show-inheritance:

nipyapi.nifi.apis.policies\_api module
--------------------------------------

Expand Down
24 changes: 0 additions & 24 deletions docs/nipyapi-docs/nipyapi.nifi.models.rst
Expand Up @@ -900,14 +900,6 @@ nipyapi.nifi.models.lineage\_results\_dto module
:undoc-members:
:show-inheritance:

nipyapi.nifi.models.link module
-------------------------------

.. automodule:: nipyapi.nifi.models.link
:members:
:undoc-members:
:show-inheritance:

nipyapi.nifi.models.listing\_request\_dto module
------------------------------------------------

Expand Down Expand Up @@ -1756,14 +1748,6 @@ nipyapi.nifi.models.tenants\_entity module
:undoc-members:
:show-inheritance:

nipyapi.nifi.models.the\_position\_of\_a\_component\_on\_the\_graph module
--------------------------------------------------------------------------

.. automodule:: nipyapi.nifi.models.the_position_of_a_component_on_the_graph
:members:
:undoc-members:
:show-inheritance:

nipyapi.nifi.models.transaction\_result\_entity module
------------------------------------------------------

Expand All @@ -1780,14 +1764,6 @@ nipyapi.nifi.models.update\_controller\_service\_reference\_request\_entity modu
:undoc-members:
:show-inheritance:

nipyapi.nifi.models.uri\_builder module
---------------------------------------

.. automodule:: nipyapi.nifi.models.uri_builder
:members:
:undoc-members:
:show-inheritance:

nipyapi.nifi.models.user\_dto module
------------------------------------

Expand Down
24 changes: 0 additions & 24 deletions docs/nipyapi-docs/nipyapi.registry.models.rst
Expand Up @@ -84,14 +84,6 @@ nipyapi.registry.models.fields module
:undoc-members:
:show-inheritance:

nipyapi.registry.models.link module
-----------------------------------

.. automodule:: nipyapi.registry.models.link
:members:
:undoc-members:
:show-inheritance:

nipyapi.registry.models.permissions module
------------------------------------------

Expand Down Expand Up @@ -124,22 +116,6 @@ nipyapi.registry.models.tenant module
:undoc-members:
:show-inheritance:

nipyapi.registry.models.the\_position\_of\_a\_component\_on\_the\_graph module
------------------------------------------------------------------------------

.. automodule:: nipyapi.registry.models.the_position_of_a_component_on_the_graph
:members:
:undoc-members:
:show-inheritance:

nipyapi.registry.models.uri\_builder module
-------------------------------------------

.. automodule:: nipyapi.registry.models.uri_builder
:members:
:undoc-members:
:show-inheritance:

nipyapi.registry.models.user module
-----------------------------------

Expand Down
2 changes: 1 addition & 1 deletion nipyapi/__init__.py
Expand Up @@ -9,7 +9,7 @@

__author__ = """Daniel Chaffelson"""
__email__ = 'chaffelson@gmail.com'
__version__ = '0.14.3'
__version__ = '0.15.0'
__all__ = ['canvas', 'system', 'templates', 'config', 'nifi', 'registry',
'versioning', 'demo', 'utils', 'security']

Expand Down
15 changes: 5 additions & 10 deletions nipyapi/canvas.py
Expand Up @@ -26,7 +26,8 @@
'list_all_funnels', 'list_all_remote_process_groups', 'delete_funnel',
'get_remote_process_group', 'update_process_group', 'create_funnel',
'create_remote_process_group', 'delete_remote_process_group',
'set_remote_process_group_transmission', 'get_pg_parents_ids'
'set_remote_process_group_transmission', 'get_pg_parents_ids',
'delete_port', 'create_port'
]

log = logging.getLogger(__name__)
Expand Down Expand Up @@ -1169,15 +1170,14 @@ def _del_cont(cont_id):
return result


def update_controller(controller, update, refresh=True):
def update_controller(controller, update):
"""
Updates the Configuration of a Controller Service
Args:
controller (ControllerServiceEntity): Target Controller to update
update (ControllerServiceDTO): Controller Service configuration object
containing the new config params and properties
refresh (bool): True to refresh before applying
Returns:
(ControllerServiceEntity)
Expand All @@ -1186,8 +1186,6 @@ def update_controller(controller, update, refresh=True):
assert isinstance(controller, nipyapi.nifi.ControllerServiceEntity)
assert isinstance(update, nipyapi.nifi.ControllerServiceDTO)
# Insert the ID into the update
if refresh:
controller = get_controller(controller.id, 'id')
update.id = controller.id
return nipyapi.nifi.ControllerServicesApi().update_controller_service(
id=controller.id,
Expand Down Expand Up @@ -1258,8 +1256,7 @@ def _schedule_controller_state(cont_id, tgt_state):
raise ValueError("Scheduling request timed out")


def get_controller(identifier, identifier_type='name',
bool_response=False, greedy=True):
def get_controller(identifier, identifier_type='name', bool_response=False):
"""
Retrieve a given Controller
Expand All @@ -1268,7 +1265,6 @@ def get_controller(identifier, identifier_type='name',
identifier_type (str): 'id' or 'name', defaults to name
bool_response (bool): If True, will return False if the Controller is
not found - useful when testing for deletion completion
greedy (bool): True for partial match, False for exact match
Returns:
Expand All @@ -1281,8 +1277,7 @@ def get_controller(identifier, identifier_type='name',
out = handle.get_controller_service(identifier)
else:
obj = list_all_controllers()
out = nipyapi.utils.filter_obj(
obj, identifier, identifier_type, greedy=greedy)
out = nipyapi.utils.filter_obj(obj, identifier, identifier_type)
except nipyapi.nifi.rest.ApiException as e:
if bool_response:
return False
Expand Down
10 changes: 9 additions & 1 deletion nipyapi/nifi/__init__.py
Expand Up @@ -5,7 +5,7 @@
The Rest Api provides programmatic access to command and control a NiFi instance in real time. Start and stop processors, monitor queues, query provenance data, and more. Each endpoint below includes a description, definitions of the expected input and output, potential response codes, and the authorizations required to invoke each service.
OpenAPI spec version: 1.11.1-SNAPSHOT
OpenAPI spec version: 1.12.1
Contact: dev@nifi.apache.org
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
Expand Down Expand Up @@ -187,7 +187,10 @@
from .models.process_group_entity import ProcessGroupEntity
from .models.process_group_flow_dto import ProcessGroupFlowDTO
from .models.process_group_flow_entity import ProcessGroupFlowEntity
from .models.process_group_import_entity import ProcessGroupImportEntity
from .models.process_group_name_dto import ProcessGroupNameDTO
from .models.process_group_replace_request_dto import ProcessGroupReplaceRequestDTO
from .models.process_group_replace_request_entity import ProcessGroupReplaceRequestEntity
from .models.process_group_status_dto import ProcessGroupStatusDTO
from .models.process_group_status_entity import ProcessGroupStatusEntity
from .models.process_group_status_snapshot_dto import ProcessGroupStatusSnapshotDTO
Expand All @@ -196,13 +199,16 @@
from .models.processor_config_dto import ProcessorConfigDTO
from .models.processor_dto import ProcessorDTO
from .models.processor_entity import ProcessorEntity
from .models.processor_run_status_details_dto import ProcessorRunStatusDetailsDTO
from .models.processor_run_status_details_entity import ProcessorRunStatusDetailsEntity
from .models.processor_run_status_entity import ProcessorRunStatusEntity
from .models.processor_status_dto import ProcessorStatusDTO
from .models.processor_status_entity import ProcessorStatusEntity
from .models.processor_status_snapshot_dto import ProcessorStatusSnapshotDTO
from .models.processor_status_snapshot_entity import ProcessorStatusSnapshotEntity
from .models.processor_types_entity import ProcessorTypesEntity
from .models.processors_entity import ProcessorsEntity
from .models.processors_run_status_details_entity import ProcessorsRunStatusDetailsEntity
from .models.property_descriptor_dto import PropertyDescriptorDTO
from .models.property_descriptor_entity import PropertyDescriptorEntity
from .models.property_history_dto import PropertyHistoryDTO
Expand Down Expand Up @@ -243,6 +249,8 @@
from .models.resource_dto import ResourceDTO
from .models.resources_entity import ResourcesEntity
from .models.revision_dto import RevisionDTO
from .models.revision_info import RevisionInfo
from .models.run_status_details_request_entity import RunStatusDetailsRequestEntity
from .models.schedule_components_entity import ScheduleComponentsEntity
from .models.search_result_group_dto import SearchResultGroupDTO
from .models.search_results_dto import SearchResultsDTO
Expand Down
4 changes: 2 additions & 2 deletions nipyapi/nifi/api_client.py
Expand Up @@ -4,7 +4,7 @@
The Rest Api provides programmatic access to command and control a NiFi instance in real time. Start and stop processors, monitor queues, query provenance data, and more. Each endpoint below includes a description, definitions of the expected input and output, potential response codes, and the authorizations required to invoke each service.
OpenAPI spec version: 1.11.1-SNAPSHOT
OpenAPI spec version: 1.12.1
Contact: dev@nifi.apache.org
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
Expand Down Expand Up @@ -628,6 +628,6 @@ def __deserialize_model(self, data, klass):
value = data[klass.attribute_map[attr]]
kwargs[attr] = self.__deserialize(value, attr_type)

instance = klass(**kwargs)
instance = klass(**kwargs)

return instance
6 changes: 3 additions & 3 deletions nipyapi/nifi/apis/access_api.py
Expand Up @@ -5,7 +5,7 @@
The Rest Api provides programmatic access to command and control a NiFi instance in real time. Start and stop processors, monitor queues, query provenance data, and more. Each endpoint below includes a description, definitions of the expected input and output, potential response codes, and the authorizations required to invoke each service.
OpenAPI spec version: 1.11.1-SNAPSHOT
OpenAPI spec version: 1.12.1
Contact: dev@nifi.apache.org
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
Expand Down Expand Up @@ -542,7 +542,7 @@ def get_access_status_with_http_info(self, **kwargs):
def get_login_config(self, **kwargs):
"""
Retrieves the access configuration for this NiFi
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
Expand All @@ -567,7 +567,7 @@ def get_login_config(self, **kwargs):
def get_login_config_with_http_info(self, **kwargs):
"""
Retrieves the access configuration for this NiFi
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
Expand Down
14 changes: 7 additions & 7 deletions nipyapi/nifi/apis/connections_api.py
Expand Up @@ -5,7 +5,7 @@
The Rest Api provides programmatic access to command and control a NiFi instance in real time. Start and stop processors, monitor queues, query provenance data, and more. Each endpoint below includes a description, definitions of the expected input and output, potential response codes, and the authorizations required to invoke each service.
OpenAPI spec version: 1.11.1-SNAPSHOT
OpenAPI spec version: 1.12.1
Contact: dev@nifi.apache.org
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
Expand Down Expand Up @@ -43,7 +43,7 @@ def __init__(self, api_client=None):
def delete_connection(self, id, **kwargs):
"""
Deletes a connection
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
Expand Down Expand Up @@ -72,7 +72,7 @@ def delete_connection(self, id, **kwargs):
def delete_connection_with_http_info(self, id, **kwargs):
"""
Deletes a connection
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
Expand Down Expand Up @@ -161,7 +161,7 @@ def delete_connection_with_http_info(self, id, **kwargs):
def get_connection(self, id, **kwargs):
"""
Gets a connection
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
Expand All @@ -187,7 +187,7 @@ def get_connection(self, id, **kwargs):
def get_connection_with_http_info(self, id, **kwargs):
"""
Gets a connection
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
Expand Down Expand Up @@ -267,7 +267,7 @@ def get_connection_with_http_info(self, id, **kwargs):
def update_connection(self, id, body, **kwargs):
"""
Updates a connection
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
Expand All @@ -294,7 +294,7 @@ def update_connection(self, id, body, **kwargs):
def update_connection_with_http_info(self, id, body, **kwargs):
"""
Updates a connection
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
Expand Down

0 comments on commit 1353624

Please sign in to comment.