ONTAP Rest API Discussions

snapmirror relationship group type, missing in rest

RobertSimac
1,341 Views

Hello team,

 

In REST apis, the snapmirror relationship group type is no longer existing. (https://docs.netapp.com/us-en/ontap-restmap-98/snapmirror.html#snapmirror-get)

 

Some of our code relies on checking if the snapmirror relations group type is  'vserver'.

 

I did some prototyping and testing and confirmed the rest apis, when getting the entire snapmirror relationship collection for given source volume do NOT return the `vserver` relationships - which is good for our use case.

 

Our current/old code using ontapis/zapis do return all group types relationships and code does  skip the 'vserver' ones...

 

I wanted to check with this group if my testing and assumption is safe to use in production.

 

Can I safely assume rest apis will not return any relationships with 'vserver' group type? Can the ontap-restmap document be updated to reflect this fact?

 

Thanks

 

Robert Simac

1 ACCEPTED SOLUTION

RobertBlackhart
1,306 Views

I looked at the REST documentation for the relationships endpoint: https://library.netapp.com/ecmdocs/ECMLP2882307/html/index.html#/snapmirror/snapmirror_relationship_get.

 

It looks like the group_type field was added in ONTAP 9.11.1:

RobertBlackhart_0-1670600270878.png

The mapping document doesn't seem like it was updated to say that this is the equivalent to the relationship-group-type attribute though. You can submit a request to have the mapping document updated by going to the "let us know" link from this page: https://docs.netapp.com/us-en/ontap-restmap-98/overview.html

View solution in original post

3 REPLIES 3

RobertBlackhart
1,307 Views

I looked at the REST documentation for the relationships endpoint: https://library.netapp.com/ecmdocs/ECMLP2882307/html/index.html#/snapmirror/snapmirror_relationship_get.

 

It looks like the group_type field was added in ONTAP 9.11.1:

RobertBlackhart_0-1670600270878.png

The mapping document doesn't seem like it was updated to say that this is the equivalent to the relationship-group-type attribute though. You can submit a request to have the mapping document updated by going to the "let us know" link from this page: https://docs.netapp.com/us-en/ontap-restmap-98/overview.html

RobertSimac
1,230 Views

Thanks Robert that is useful info. Unfortunately our production is currently at ontap 9.7 and will take a while to get it up to date with 9.11.

 

I did additional testing on 9.7 and confirmed the new REST apis do NOT return any `svm_dr` or `vserver` relationships when queried by `destination_path` like this . Note below query returns only two relationships, to vservers devzzy and devzzz

curl --insecure --user user:pass "https://devcd1/api/snapmirror/relationships/?list_destinations_only=true&destination.path=RSSIMPLE&fields=destination,source"

{
"records": [
{
"uuid": "d03f4484-540e-11ec-be53-00a098d065b0",
"source": {
"path": "devcd1:RSSIMPLE",
"svm": {
"uuid": "dadfc8e4-478c-11e8-a818-00a098d480e5",
"name": "devcd1",
"_links": {
"self": {
"href": "/api/svm/svms/dadfc8e4-478c-11e8-a818-00a098d480e5"
}
}
}
},
"destination": {
"path": "devzzy:RSSIMPLE",
"svm": {
"uuid": "781b0694-52db-11e8-81cb-00a098d480f3",
"name": "devzzy",
"_links": {
"self": {
"href": "/api/svm/peers/f110ec2b-52dc-11e8-81cb-00a098d480f3"
}
}
},
"cluster": {
"name": "rt1mgb-stor",
"uuid": "eaa185de-c94d-11eb-a271-00a098997e7f",
"_link": {
"self": {
"href": "/api/cluster/peers/eaa185de-c94d-11eb-a271-00a098997e7f"
}
}
}
},
"_links": {
"self": {
"href": "/api/snapmirror/relationships/d03f4484-540e-11ec-be53-00a098d065b0/?list_destinations_only=true"
}
}
},
{
"uuid": "d2ebc59d-4ec1-11eb-8c5c-00a098d065b0",
"source": {
"path": "devcd1:RSSIMPLE",
"svm": {
"uuid": "dadfc8e4-478c-11e8-a818-00a098d480e5",
"name": "devcd1",
"_links": {
"self": {
"href": "/api/svm/svms/dadfc8e4-478c-11e8-a818-00a098d480e5"
}
}
}
},
"destination": {
"path": "devzzz:RSSIMPLE",
"svm": {
"uuid": "bc0a9645-4d6f-11e8-a818-00a098d480e5",
"name": "devzzz",
"_links": {
"self": {
"href": "/api/svm/peers/a6acfcf6-4eeb-11e8-81cb-00a098d480f3"
}
}
},
"cluster": {
"name": "rt1mgb-stor",
"uuid": "eaa185de-c94d-11eb-a271-00a098997e7f",
"_link": {
"self": {
"href": "/api/cluster/peers/eaa185de-c94d-11eb-a271-00a098997e7f"
}
}
}
},
"_links": {
"self": {
"href": "/api/snapmirror/relationships/d2ebc59d-4ec1-11eb-8c5c-00a098d065b0/?list_destinations_only=true"
}
}
}
],
"num_records": 2,
"_links": {
"self": {
"href": "/api/snapmirror/relationships/?list_destinations_only=true&destination.path=RSSIMPLE&fields=destination,source"
}
}

 

Note above volume RSSIMPLE volume does have svm dr (vserver) relationship when queried by ontap CLI like this. Note the destination path vserver is devcd1_SVMDR, not returned in above rest api output...

devcd1::> snapmirror list-destinations -destination-path RSSIMPLE
              Source Path: devcd1:RSSIMPLE
         Destination Path: devcd1_SVMDR:RSSIMPLE
        Relationship Type: XDP
  Relationship Group Type: vserver
   SnapMirror Policy Type: async-mirror
      Relationship Status: Idle
        Transfer Progress: -
    Progress Last Updated: -
       Source Volume Node: dev-stor-01
          Relationship ID: c6e59f45-2799-11ec-b628-00a098997ee7

 

While above 'works for me'... I would still like to hear some words of confirmation / encouragement or reference to the document stating the REST querying by destination path will return only normal snapmirror relationships, not the SVM DR ones, at least on ontap 9.7..

RobertBlackhart
1,211 Views

I understand what you're looking for and that's a reasonable ask. I don't see it explicitly stated in the documentation though and I don't have enough expertise on the feature to know. You may want to reach out to support to try and get a more detailed answer from an expert on snapmirror.

Public