ONTAP Rest API Discussions

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

MOHANRAJB
879 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
843 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
844 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