diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml deleted file mode 100644 index a60288b8..00000000 --- a/.github/workflows/python-package.yml +++ /dev/null @@ -1,32 +0,0 @@ -# This workflow will install Python dependencies, run tests and lint with a variety of Python versions -# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions - -name: Python package - -on: - push: - branches: [external] - pull_request: - branches: [external] - -jobs: - build: - runs-on: ubuntu-latest - strategy: - matrix: - python-version: [3.7, 3.8, 3.9] - - steps: - - uses: actions/checkout@v2 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 - with: - python-version: ${{ matrix.python-version }} - - name: Install dependencies - run: | - python -m pip install --upgrade pip - python -m pip install astroid>=2.0 pylint~=2.5.3 - pip install -e . - - name: Lint with pylint - run: | - pylint --rcfile=.pylintrc infinisdk setup.py diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml index 49f03047..09f56d20 100644 --- a/.github/workflows/python-publish.yml +++ b/.github/workflows/python-publish.yml @@ -9,27 +9,26 @@ on: jobs: deploy: - runs-on: ubuntu-latest environment: pypi steps: - - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - name: Set up Python - uses: actions/setup-python@v2 - with: - python-version: '3.x' - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install setuptools wheel twine - - name: Build and publish - env: - TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} - TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} - run: | - python setup.py sdist bdist_wheel - twine upload dist/* + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: "3.x" + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install setuptools wheel twine + - name: Build and publish + env: + TWINE_USERNAME: "__token__" + TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} + run: | + python setup.py sdist bdist_wheel + twine upload dist/* diff --git a/.github/workflows/python-test-publish.yml b/.github/workflows/python-test-publish.yml deleted file mode 100644 index c2ca608d..00000000 --- a/.github/workflows/python-test-publish.yml +++ /dev/null @@ -1,38 +0,0 @@ -# This workflow will install Python dependencies, run tests and lint with a variety of Python versions -# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions - -name: Python test publish - -on: - push: - branches: [external] - pull_request: - branches: [external] - -jobs: - build: - runs-on: ubuntu-latest - - environment: pypi - - steps: - - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 - with: - python-version: "3.9" - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install setuptools wheel twine - - name: Test build and publish - env: - TWINE_USERNAME: ${{ secrets.TEST_PYPI_USERNAME }} - TWINE_PASSWORD: ${{ secrets.TEST_PYPI_PASSWORD }} - run: | - python setup.py sdist bdist_wheel - twine upload --verbose --non-interactive --repository-url https://test.pypi.org/legacy/ dist/* - python -m pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple infinisdk - python -c "import infinisdk" diff --git a/CHANGELOG b/CHANGELOG index 5e655e8d..c5350c29 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,7 @@ +Version 240.1.2 (Released 2024-02-08) +------------------------------------- +* #16384: Add documentation for snapshot replication when creating async replica + Version 240.1.1 (Released 2024-01-31) ------------------------------------- * #16462: Add pagination for the new metadata of get all assigned entities diff --git a/Makefile b/Makefile index 0ab4b80c..1dccace0 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,7 @@ all: @exit 2 lint: - pylint --rcfile .pylintrc -j $(shell nproc) infinisdk scripts tests doc/*.doctest_context + pylint --rcfile .pylintrc -j $(shell nproc) infinisdk check_format: black --check infinisdk diff --git a/doc/replication.rst b/doc/replication.rst index 626f172a..7d6fd87c 100644 --- a/doc/replication.rst +++ b/doc/replication.rst @@ -37,7 +37,20 @@ As for the remote entity, it depends on the scenario being used to create the re * Creating a new entity on the remote side (`_create_target` or default) requires the remote pool to be provided * Creating over an existing, formatted target (`_existing_target`) requires the remote target to be provided via ``remote_entity`` parameter +To allow for snapshot replication you would use something like the following: +.. code-block:: python + + from datetime import timedelta + + replica = primary_system.replicas.replicate_entity(vol, link=link, remote_pool=remote_pool, + including_snapshots=True, snapshots_retention=3600, + lock_remote_snapshot_retention=timedelta(seconds=3600), + rpo=timedelta(seconds=4), sync_interval=timedelta(seconds=4)) + +`lock_remote_snapshot_retention` is an optional parameter. It places a lock on the exposed snapshot +for a duration defined by the parameter's value (number of seconds since the original snapshot was created). +For an explanation about `rpo` and `sync_interval` parameters please see section below on RgReplica. .. seealso:: :class:`infinisdk.infinibox.replica.Replica` diff --git a/infinisdk/infinibox/compatibility.py b/infinisdk/infinibox/compatibility.py index 799304d8..58135d65 100644 --- a/infinisdk/infinibox/compatibility.py +++ b/infinisdk/infinibox/compatibility.py @@ -260,7 +260,6 @@ def has_standard_counts(self): def has_vvol_counts(self): return self.get_parsed_system_version() >= "7.0" and self.has_vvol() - def has_ethernet_interface_state(self): return self.get_parsed_system_version() >= "7.3.10"