Skip to content

Commit

Permalink
Move microsoft winrm to new provider structure (apache#46469)
Browse files Browse the repository at this point in the history
* refactor: Moved microsoft winrm provider

* refactor: fixed static checks
  • Loading branch information
dabla authored and ambika-garg committed Feb 13, 2025
1 parent 84f039b commit 97cd448
Show file tree
Hide file tree
Showing 35 changed files with 499 additions and 41 deletions.
5 changes: 1 addition & 4 deletions .github/boring-cyborg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -205,10 +205,7 @@ labelPRBasedOnFilePath:
- providers/microsoft/psrp/**

provider:microsoft-winrm:
- providers/src/airflow/providers/microsoft/winrm/**/*
- docs/apache-airflow-providers-microsoft-winrm/**/*
- providers/tests/microsoft/winrm/**/*
- providers/tests/system/microsoft/winrm/**/*
- providers/microsoft/winrm/**

provider:mongo:
- providers/mongo/**
Expand Down
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -641,11 +641,11 @@ repos:
^providers/google/src/airflow/providers/google/cloud/operators/dataproc.py$|
^providers/google/src/airflow/providers/google/cloud/operators/mlengine.py$|
^providers/src/airflow/providers/microsoft/azure/hooks/cosmos.py$|
^providers/src/airflow/providers/microsoft/winrm/hooks/winrm.py$|
^providers/microsoft/winrm/src/airflow/providers/microsoft/winrm/hooks/winrm.py$|
^airflow/www/fab_security/manager.py$|
^docs/.*commits.rst$|
^docs/apache-airflow-providers-apache-cassandra/connections/cassandra.rst$|
^providers/src/airflow/providers/microsoft/winrm/operators/winrm.py$|
^providers/microsoft/winrm/src/airflow/providers/microsoft/winrm/operators/winrm.py$|
^providers/opsgenie/src/airflow/providers/opsgenie/hooks/opsgenie.py$|
^providers/redis/src/airflow/providers/redis/provider.yaml$|
^airflow/serialization/serialized_objects.py$|
Expand Down
1 change: 1 addition & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ apache-airflow-providers-jdbc
apache-airflow-providers-influxdb
apache-airflow-providers-microsoft-mssql
apache-airflow-providers-microsoft-psrp
apache-airflow-providers-microsoft-winrm
apache-airflow-providers-mongo
apache-airflow-providers-openlineage
apache-airflow-providers-hashicorp
Expand Down
25 changes: 0 additions & 25 deletions docs/apache-airflow-providers-microsoft-winrm/changelog.rst

This file was deleted.

62 changes: 62 additions & 0 deletions providers/microsoft/winrm/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@

.. Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
.. http://www.apache.org/licenses/LICENSE-2.0
.. Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
.. NOTE! THIS FILE IS AUTOMATICALLY GENERATED AND WILL BE OVERWRITTEN!
.. IF YOU WANT TO MODIFY TEMPLATE FOR THIS FILE, YOU SHOULD MODIFY THE TEMPLATE
`PROVIDER_README_TEMPLATE.rst.jinja2` IN the `dev/breeze/src/airflow_breeze/templates` DIRECTORY
Package ``apache-airflow-providers-microsoft-winrm``

Release: ``3.7.0``


`Windows Remote Management (WinRM) <https://docs.microsoft.com/windows/win32/winrm/portal>`__


Provider package
----------------

This is a provider package for ``microsoft.winrm`` provider. All classes for this provider package
are in ``airflow.providers.microsoft.winrm`` python package.

You can find package information and changelog for the provider
in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-microsoft-winrm/3.7.0/>`_.

Installation
------------

You can install this package on top of an existing Airflow 2 installation (see ``Requirements`` below
for the minimum Airflow version supported) via
``pip install apache-airflow-providers-microsoft-winrm``

The package supports the following python versions: 3.9,3.10,3.11,3.12

Requirements
------------

================== ==================
PIP package Version required
================== ==================
``apache-airflow`` ``>=2.9.0``
``pywinrm`` ``>=0.4``
================== ==================

The changelog for the provider package can be found in the
`changelog <https://airflow.apache.org/docs/apache-airflow-providers-microsoft-winrm/3.7.0/changelog.html>`_.
File renamed without changes.
File renamed without changes.
File renamed without changes
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@ use the WinRMOperator to execute commands on a given remote host using the winrm

create a hook

.. exampleinclude:: /../../providers/tests/system/microsoft/winrm/example_winrm.py
.. exampleinclude:: /../../providers/microsoft/winrm/tests/system/microsoft/winrm/example_winrm.py
:language: python
:dedent: 4
:start-after: [START create_hook]
:end-before: [END create_hook]

Run the operator, pass the hook, and pass a command to do something

.. exampleinclude:: /../../providers/tests/system/microsoft/winrm/example_winrm.py
.. exampleinclude:: /../../providers/microsoft/winrm/tests/system/microsoft/winrm/example_winrm.py
:language: python
:dedent: 4
:start-after: [START run_operator]
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,10 @@ versions:
- 1.0.1
- 1.0.0

dependencies:
- apache-airflow>=2.9.0
- pywinrm>=0.4

integrations:
- integration-name: Windows Remote Management (WinRM)
external-doc-url: https://docs.microsoft.com/en-us/windows/win32/winrm/portal
logo: /integration-logos/winrm/WinRM.png
logo: /docs/integration-logos/WinRM.png
how-to-guide:
- /docs/apache-airflow-providers-microsoft-winrm/operators.rst
tags: [protocol]
Expand Down
78 changes: 78 additions & 0 deletions providers/microsoft/winrm/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

# NOTE! THIS FILE IS AUTOMATICALLY GENERATED AND WILL BE OVERWRITTEN!

# IF YOU WANT TO MODIFY THIS FILE EXCEPT DEPENDENCIES, YOU SHOULD MODIFY THE TEMPLATE
# `pyproject_TEMPLATE.toml.jinja2` IN the `dev/breeze/src/airflow_breeze/templates` DIRECTORY
[build-system]
requires = ["flit_core==3.10.1"]
build-backend = "flit_core.buildapi"

[project]
name = "apache-airflow-providers-microsoft-winrm"
version = "3.7.0"
description = "Provider package apache-airflow-providers-microsoft-winrm for Apache Airflow"
readme = "README.rst"
authors = [
{name="Apache Software Foundation", email="[email protected]"},
]
maintainers = [
{name="Apache Software Foundation", email="[email protected]"},
]
keywords = [ "airflow-provider", "microsoft.winrm", "airflow", "integration" ]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Environment :: Console",
"Environment :: Web Environment",
"Intended Audience :: Developers",
"Intended Audience :: System Administrators",
"Framework :: Apache Airflow",
"Framework :: Apache Airflow :: Provider",
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: System :: Monitoring",
]
requires-python = "~=3.9"

# The dependencies should be modified in place in the generated file
# Any change in the dependencies is preserved when the file is regenerated
dependencies = [
"apache-airflow>=2.9.0",
"pywinrm>=0.4",
]

[project.urls]
"Documentation" = "https://airflow.apache.org/docs/apache-airflow-providers-microsoft-winrm/3.7.0"
"Changelog" = "https://airflow.apache.org/docs/apache-airflow-providers-microsoft-winrm/3.7.0/changelog.html"
"Bug Tracker" = "https://github.com/apache/airflow/issues"
"Source Code" = "https://github.com/apache/airflow"
"Slack Chat" = "https://s.apache.org/airflow-slack"
"Twitter" = "https://x.com/ApacheAirflow"
"YouTube" = "https://www.youtube.com/channel/UCSXwxpWZQ7XZ1WL3wqevChA/"

[project.entry-points."apache_airflow_provider"]
provider_info = "airflow.providers.microsoft.winrm.get_provider_info:get_provider_info"

[tool.flit.module]
name = "airflow.providers.microsoft.winrm"

[tool.pytest.ini_options]
ignore = "tests/system/"
Loading

0 comments on commit 97cd448

Please sign in to comment.