NetApp Community Update
This site will enter Read Only mode on July 23 as we prepare to move to a new platform. You will still be able to view content, but posting and replying will be temporarily disabled.
We're excited to launch our new Community experience on July 30 and more information will follow soon.
Stay connected during the transition - Join our Discord community today.

ONTAP Rest API Discussions

Setting type: async in snapmirror/policies POST, configures mirror_vault in ONTAP.

MOHANRAJB
1,991 Views

Hi,

 

verb - POST

api - snapmirror/policies

body - {'name': 'ansible_policy', 'svm': {'name': 'ansible_snap'}, 'type': 'async'}

my assumption was async is async-mirror, but it's configured in ONTAP as mirror-vault.

ontap97::> snapmirror policy show -vserver ansible_snap
Vserver Policy             Policy Number         Transfer
Name    Name               Type   Of Rules Tries Priority Comment
------- ------------------ ------ -------- ----- -------- ----------
ansible_snap
        ansible_policy     mirror-vault  1     8  normal  -
  SnapMirror Label: sm_created                         Keep:       1
                                                 Total Keep:       1

is async in REST is mirror-vault?

Thanks,

Mohan

1 ACCEPTED SOLUTION

RobertBlackhart
1,955 Views

The ONTAP REST API docs have this table mapping the policy types from CLI to REST:

 

Mapping of SnapMirror policies from CLI to REST

CLIREST 
mirror-vaultasync 
async-mirror w/
all_source_snapshots
async w/
copy_all_source_snapshots
 
async-mirror w/o
all_source_snapshots
async w/
copy_latest_source_snapshot
 
vaultasync w/
create_snapshot_on_source
 
---------------------------------------------------- 
  sync_type
  ----------------------
sync-mirrorsyncsync
strict-sync-mirrorsyncstrict_sync
automated-failoversyncautomated_failover

 

So to get your desired result, you'll want to either pass {copy_all_source_snapshots: true} or (newly added in 9.12) {copy_latest_source_snapshot: true} and it should then report async-mirror on the CLI.

View solution in original post

1 REPLY 1

RobertBlackhart
1,956 Views

The ONTAP REST API docs have this table mapping the policy types from CLI to REST:

 

Mapping of SnapMirror policies from CLI to REST

CLIREST 
mirror-vaultasync 
async-mirror w/
all_source_snapshots
async w/
copy_all_source_snapshots
 
async-mirror w/o
all_source_snapshots
async w/
copy_latest_source_snapshot
 
vaultasync w/
create_snapshot_on_source
 
---------------------------------------------------- 
  sync_type
  ----------------------
sync-mirrorsyncsync
strict-sync-mirrorsyncstrict_sync
automated-failoversyncautomated_failover

 

So to get your desired result, you'll want to either pass {copy_all_source_snapshots: true} or (newly added in 9.12) {copy_latest_source_snapshot: true} and it should then report async-mirror on the CLI.

Public