Skip to content

When Repliction_mode is Async allow RPO to be Set #55

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

Merged
merged 1 commit into from
Jul 14, 2025
Merged
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
39 changes: 18 additions & 21 deletions .github/workflows/ansible-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
strategy:
fail-fast: false
matrix:
ansible-version: [stable-2.14, stable-2.15, stable-2.16, devel]
ansible-version: [stable-2.18]
steps:
- name: Check out code
uses: actions/checkout@v3
Expand All @@ -31,7 +31,7 @@ jobs:
run: ansible-galaxy collection build --output-path "${GITHUB_WORKSPACE}/.cache/collection-tarballs"

- name: Store migrated collection artifacts
uses: actions/upload-artifact@v1
uses: actions/upload-artifact@v4.4.0
with:
name: collection
path: .cache/collection-tarballs
Expand All @@ -50,15 +50,16 @@ jobs:
matrix:
python: ['3.9', '3.10', '3.11']
ansible:
- stable-2.14
- stable-2.15
- stable-2.16
- stable-2.17
- stable-2.18
- devel
exclude:
- ansible: stable-2.16
python: '3.9'
- ansible: stable-2.18
python: '3.10'
- ansible: devel
python: '3.9'
python: '3.10'

steps:
- name: Perform unit testing with ansible-test
Expand All @@ -76,21 +77,23 @@ jobs:

sanity:
name: Sanity (Ⓐ${{ matrix.ansible }} with ${{ matrix.python }} python)
runs-on: ubuntu-latest
needs: [build]
strategy:
fail-fast: false
matrix:
python: ['3.9', '3.10', '3.11']
python: ['3.10', '3.11']
ansible:
- stable-2.14
- stable-2.15
- stable-2.16
- stable-2.17
- stable-2.18
- devel
exclude:
- ansible: stable-2.16
python: '3.9'
- ansible: stable-2.18
python: '3.10'
- ansible: devel
python: '3.9'
runs-on: ubuntu-latest
python: '3.10'
steps:
- name: Perform sanity testing
uses: ansible-community/ansible-test-gh-action@release/v1
Expand All @@ -108,14 +111,8 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.10", "3.11"]
ansible-version: [stable-2.14, stable-2.15, stable-2.16, devel]
exclude:
# Ansible-core 2.16 is supported only from Python 3.10 onwards
- python-version: "3.9"
ansible-version: stable-2.16
- python-version: '3.9'
ansible-version: devel
python-version: ["3.11"]
ansible-version: [stable-2.18, devel]

steps:
# Important: This sets up your GITHUB_WORKSPACE environment variable
Expand All @@ -136,7 +133,7 @@ jobs:
run: pip install ansible-lint --disable-pip-version-check

- name: Download migrated collection artifacts
uses: actions/download-artifact@v1
uses: actions/download-artifact@v4.1.8
with:
name: collection
path: .cache/collection-tarballs
Expand Down
44 changes: 44 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
output

# Byte-compiled Python files
*.pyc
*.pyo
__pycache__/

# Virtual environment directories
venv/
.env/

# Distribution packages
dist/
build/
*.egg-info/

# Ansible-related temporary files
*.retry
.cache/

# Test coverage reports
htmlcov/
.coverage
.tox/

# Editor-specific files
.idea/
.vscode/
*.swp
*~

# System-specific files
.DS_Store
Thumbs.db

# Log files
*.log

# Ignore secrets or configuration files
secrets.yml
config.yml

# ansible-galaxy build output files
*.tar.gz
2 changes: 1 addition & 1 deletion playbooks/modules/cifsserver.yml
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@
state: "absent"
check_mode: true

- name: Delete CIFS server
- name: Delete CIFS server with domain
dellemc.unity.cifsserver:
unispherehost: "{{ unispherehost }}"
username: "{{ username }}"
Expand Down
13 changes: 0 additions & 13 deletions playbooks/modules/filesystem.yml
Original file line number Diff line number Diff line change
Expand Up @@ -140,19 +140,6 @@
is_smb_notify_on_access_enabled: true
state: "present"

- name: Modify FileSystem smb_properties - Idempotency
dellemc.unity.filesystem:
unispherehost: "{{ unispherehost }}"
username: "{{ username }}"
password: "{{ password }}"
validate_certs: "{{ validate_certs }}"
filesystem_id: "{{ filesystem_id }}"
smb_properties:
is_smb_op_locks_enabled: true
smb_notify_on_change_dir_depth: 5
is_smb_notify_on_access_enabled: true
state: "present"

- name: Modify FileSystem snap schedule
dellemc.unity.filesystem:
unispherehost: "{{ unispherehost }}"
Expand Down
2 changes: 1 addition & 1 deletion playbooks/modules/host.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
description: "ansible-test-host-1"
state: "present"

- name: Set host_id
- name: Set host_id empty host
ansible.builtin.set_fact:
host_id_1: "{{ result.host_details.id }}"

Expand Down
2 changes: 1 addition & 1 deletion playbooks/modules/nfsserver.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
nas_server_name: "dummy_nas"
state: "present"

- name: Delete NFS server
- name: Delete NFS server with windows kdctype
dellemc.unity.nfsserver:
unispherehost: "{{ unispherehost }}"
username: "{{ username }}"
Expand Down
4 changes: 2 additions & 2 deletions playbooks/modules/replication_session.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@
session_name: "test-session"

tasks:
- name: Get replication session details
- name: Get replication session details using name
dellemc.unity.replication_session:
unispherehost: "{{ unispherehost }}"
username: "{{ username }}"
password: "{{ password }}"
validate_certs: "{{ validate_certs }}"
session_name: "{{ session_name }}"

- name: Get replication session details
- name: Get replication session details using ID
dellemc.unity.replication_session:
unispherehost: "{{ unispherehost }}"
username: "{{ username }}"
Expand Down
8 changes: 4 additions & 4 deletions playbooks/modules/smbshare.yml
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@
is_encryption_enabled: true
state: "present"

- name: Set Snapshot SMB Share ID
- name: Set Snapshot SMB Share ID for Snapshot
ansible.builtin.set_fact:
snap_share_id: "{{ smb_result.smb_share_details.id }}"

Expand All @@ -165,7 +165,7 @@
is_encryption_enabled: true
state: "present"

- name: Get SMB Share Details using Name
- name: Get SMB Share Details using Name for Snapshot
dellemc.unity.smbshare:
unispherehost: "{{ unispherehost }}"
username: "{{ username }}"
Expand All @@ -175,7 +175,7 @@
snapshot_name: "{{ snapshot_name }}"
state: "present"

- name: Update the details of the SMB share
- name: Update the details of the SMB share for Snapshot
dellemc.unity.smbshare:
unispherehost: "{{ unispherehost }}"
username: "{{ username }}"
Expand All @@ -192,7 +192,7 @@
is_encryption_enabled: false
state: "present"

- name: Update the details of the SMB share Idempotency
- name: Update the details of the SMB share for Snapshot Idempotency
dellemc.unity.smbshare:
unispherehost: "{{ unispherehost }}"
username: "{{ username }}"
Expand Down
2 changes: 1 addition & 1 deletion playbooks/modules/snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
host_state: "mapped"
state: "present"

- name: Set snapshot id
- name: Set snapshot id for LUN
ansible.builtin.set_fact:
vol_snapshot_id: "{{ result.snapshot_details.id }}"

Expand Down
8 changes: 4 additions & 4 deletions playbooks/modules/snapshotschedule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@
id: "{{ id }}"
state: "{{ state_absent }}"

- name: Delete snapshot schedule using name
- name: Delete snapshot schedule using name for day
dellemc.unity.snapshotschedule:
unispherehost: "{{ unispherehost }}"
validate_certs: "{{ validate_certs }}"
Expand All @@ -166,7 +166,7 @@
name: "Ansible_Every_Day_Testing"
state: "{{ state_absent }}"

- name: Delete snapshot schedule using name
- name: Delete snapshot schedule using name for N days
dellemc.unity.snapshotschedule:
unispherehost: "{{ unispherehost }}"
validate_certs: "{{ validate_certs }}"
Expand All @@ -175,7 +175,7 @@
name: "Ansible_Every_N_Day_Testing"
state: "{{ state_absent }}"

- name: Delete snapshot schedule using name
- name: Delete snapshot schedule using name for week
dellemc.unity.snapshotschedule:
unispherehost: "{{ unispherehost }}"
validate_certs: "{{ validate_certs }}"
Expand All @@ -184,7 +184,7 @@
name: "Ansible_Every_Week_Testing"
state: "{{ state_absent }}"

- name: Delete snapshot schedule using name
- name: Delete snapshot schedule using name for month
dellemc.unity.snapshotschedule:
unispherehost: "{{ unispherehost }}"
validate_certs: "{{ validate_certs }}"
Expand Down
4 changes: 2 additions & 2 deletions playbooks/modules/storagepool.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
pool_type: "DYNAMIC"

tasks:
- name: Get the details of Storage pool by name
- name: Get the details of the full storage pool by name
dellemc.unity.storagepool:
unispherehost: "{{ unispherehost }}"
username: "{{ username }}"
Expand Down Expand Up @@ -124,7 +124,7 @@
fast_cache: "{{ fast_cache_enabled }}"
state: "present"

- name: Rename Storage pool by name
- name: Rename Storage pool by name back to original
dellemc.unity.storagepool:
unispherehost: "{{ unispherehost }}"
username: "{{ username }}"
Expand Down
2 changes: 1 addition & 1 deletion playbooks/modules/user_quota.yml
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@
hard_limit: "2"
state: "{{ state_present }}"

- name: Set user_quota_id
- name: Set user_quota_id for tree
ansible.builtin.set_fact:
user_quota_id: "{{ result_user_quota.get_user_quota_details.id }}"

Expand Down
5 changes: 2 additions & 3 deletions plugins/modules/cifsserver.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#!/usr/bin/python
# Copyright: (c) 2022, Dell Technologies

# Apache License version 2.0 (see MODULE-LICENSE or http://www.apache.org/licenses/LICENSE-2.0.txt)
# Copyright: (c) 2022-2025, Dell Technologies
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)

"""Ansible module for managing CIFS server on Unity"""

Expand Down
5 changes: 2 additions & 3 deletions plugins/modules/consistencygroup.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#!/usr/bin/python
# Copyright: (c) 2020, Dell Technologies

# Apache License version 2.0 (see MODULE-LICENSE or http://www.apache.org/licenses/LICENSE-2.0.txt)
# Copyright: (c) 2020-2025, Dell Technologies
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)

"""Ansible module for managing consistency group on Unity"""

Expand Down
8 changes: 5 additions & 3 deletions plugins/modules/filesystem.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#!/usr/bin/python
# Copyright: (c) 2020, Dell Technologies

# Apache License version 2.0 (see MODULE-LICENSE or http://www.apache.org/licenses/LICENSE-2.0.txt)
# Copyright: (c) 2020-2025, Dell Technologies
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)

"""Ansible module for managing FileSystem on Unity"""

Expand Down Expand Up @@ -1467,11 +1466,14 @@ def modify_replication_session(self, obj_fs, repl_session, replication_params):
try:
LOG.info("Modifying replication session of filesystem %s", obj_fs.name)
modify_payload = {}
rpo = 0
if replication_params['replication_mode']:
if replication_params['replication_mode'] == 'manual':
rpo = -1
elif replication_params['replication_mode'] == 'synchronous':
rpo = 0
elif replication_params['replication_mode'] == 'asynchronous':
rpo = replication_params.get('rpo', 0)
elif replication_params['rpo']:
rpo = replication_params['rpo']
name = repl_session.name
Expand Down
5 changes: 2 additions & 3 deletions plugins/modules/filesystem_snapshot.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#!/usr/bin/python
# Copyright: (c) 2020, Dell Technologies

# Apache License version 2.0 (see MODULE-LICENSE or http://www.apache.org/licenses/LICENSE-2.0.txt)
# Copyright: (c) 2020-2025, Dell Technologies
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)

""" Ansible module for managing Filesystem Snapshots on Unity"""

Expand Down
5 changes: 2 additions & 3 deletions plugins/modules/host.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#!/usr/bin/python
# Copyright: (c) 2020, Dell Technologies

# Apache License version 2.0 (see MODULE-LICENSE or http://www.apache.org/licenses/LICENSE-2.0.txt)
# Copyright: (c) 2020-2025, Dell Technologies
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)

"""Ansible module for managing host on Unity"""

Expand Down
5 changes: 2 additions & 3 deletions plugins/modules/info.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#!/usr/bin/python
# Copyright: (c) 2020, Dell Technologies

# Apache License version 2.0 (see MODULE-LICENSE or http://www.apache.org/licenses/LICENSE-2.0.txt)
# Copyright: (c) 2020-2025, Dell Technologies
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)

"""Ansible module for Gathering information about Unity"""

Expand Down
5 changes: 2 additions & 3 deletions plugins/modules/interface.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#!/usr/bin/python
# Copyright: (c) 2022, Dell Technologies

# Apache License version 2.0 (see MODULE-LICENSE or http://www.apache.org/licenses/LICENSE-2.0.txt)
# Copyright: (c) 2022-2025, Dell Technologies
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)

"""Ansible module for managing Interfaces on Unity"""

Expand Down
Loading