Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion airflow/providers/microsoft/psrp/hooks/psrp.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,14 @@ class PsrpHook(BaseHook):
You can provide an alternative `configuration_name` using either `runspace_options`
or by setting this key as the extra fields of your connection.
"""
conn_name_attr = "psrp_conn_id"
default_conn_name = "psrp_default"
conn_type = "psrp"
hook_name = "PSRP"

_conn: RunspacePool | None = None
_wsman_ref: WeakKeyDictionary[RunspacePool, WSMan] = WeakKeyDictionary()

def __init__(
self,
psrp_conn_id: str,
Expand Down Expand Up @@ -281,3 +285,8 @@ def _log_record(self, log, record):
log(INFO, "Progress: %s (%s)", record.activity, record.description)
else:
log(WARNING, "Unsupported message type: %s", message_type)

def test_connection(self):
"""Test PSRP Connection."""
# To be implemented.
pass
4 changes: 4 additions & 0 deletions airflow/providers/microsoft/psrp/provider.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,7 @@ hooks:
- integration-name: Windows PowerShell Remoting Protocol
python-modules:
- airflow.providers.microsoft.psrp.hooks.psrp

connection-types:
- hook-class-name: airflow.providers.microsoft.psrp.hooks.PsrpHook
connection-type: psrp