Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Session added as optional parameter to enable tls communication … #249

Conversation

djs0109
Copy link
Contributor

@djs0109 djs0109 commented Feb 21, 2024

close #248



def clear_context_broker(url: str, fiware_header: FiwareHeader):
def clear_context_broker(url: str, fiware_header: FiwareHeader, session: Session = None ):
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of adding Session as a parameter, I will suggest to use cb_client: ContextBrokerClient = None. And then reuse the given client below. This can be beneficial for maintenance, because if later we add or fix something in the client class, then we don't need to change here again

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And maybe make url no more as required variable

@@ -45,20 +47,21 @@ def clear_context_broker(url: str, fiware_header: FiwareHeader):
assert len(client.get_registration_list()) == 0


def clear_iot_agent(url: Union[str, AnyHttpUrl], fiware_header: FiwareHeader):
def clear_iot_agent(url: Union[str, AnyHttpUrl], fiware_header: FiwareHeader, session: Session = None):
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above, iota_client

@@ -72,12 +75,13 @@ def clear_iot_agent(url: Union[str, AnyHttpUrl], fiware_header: FiwareHeader):
assert len(client.get_group_list()) == 0


def clear_quantumleap(url: str, fiware_header: FiwareHeader):
def clear_quantumleap(url: str, fiware_header: FiwareHeader, session: Session = None):
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above, ql_client



def clean_test(*,
fiware_service: str,
fiware_servicepath: str,
cb_url: str = None,
iota_url: Union[str, List[str]] = None,
ql_url: str = None) -> Callable:
ql_url: str = None,
session: Session = None) -> Callable:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above, three clients

…enable TLS connections for self-signed certificates.
…bility-in-all-cleanup-py-functions' into 248-support-tls-connection-possibility-in-all-cleanup-py-functions
filip/utils/cleanup.py Outdated Show resolved Hide resolved
filip/utils/cleanup.py Outdated Show resolved Hide resolved
filip/utils/cleanup.py Outdated Show resolved Hide resolved
filip/utils/cleanup.py Outdated Show resolved Hide resolved
@djs0109
Copy link
Contributor Author

djs0109 commented Apr 16, 2024

@mwr-ebc it looks good to me for now. If you see no problem in the last commit I just made, then we can merge it

@djs0109 djs0109 requested a review from mwr-ebc April 17, 2024 13:03
@mwr-ebc mwr-ebc merged commit c388e2f into master Apr 17, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

support tls connection possibility in all cleanup.py functions
2 participants