Skip to content
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

Anf 7859 2020 06 01 api bugfix snapshot policy list volume #11220

Closed
Show file tree
Hide file tree
Changes from 6 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
Original file line number Diff line number Diff line change
Expand Up @@ -978,7 +978,7 @@
"Volumes Replication"
],
"summary": "Resync volume replication",
"description": "Resync the connection on the destination volume. If the operation is ran on the source volume it will reverse-resync the connection and sync from source to destination.",
"description": "Resync the connection on the destination volume. If the operation is ran on the source volume it will reverse-resync the connection and sync from destination to source.",
"operationId": "Volumes_ResyncReplication",
"parameters": [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1040,7 +1040,7 @@
"Volumes Replication"
],
"summary": "Resync volume replication",
"description": "Resync the connection on the destination volume. If the operation is ran on the source volume it will reverse-resync the connection and sync from source to destination.",
"description": "Resync the connection on the destination volume. If the operation is ran on the source volume it will reverse-resync the connection and sync from destination to source.",
"operationId": "Volumes_ResyncReplication",
"parameters": [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1047,7 +1047,7 @@
"Volumes Replication"
],
"summary": "Resync volume replication",
"description": "Resync the connection on the destination volume. If the operation is ran on the source volume it will reverse-resync the connection and sync from source to destination.",
"description": "Resync the connection on the destination volume. If the operation is ran on the source volume it will reverse-resync the connection and sync from destination to source.",
"operationId": "Volumes_ResyncReplication",
"parameters": [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1047,7 +1047,7 @@
"Volumes Replication"
],
"summary": "Resync volume replication",
"description": "Resync the connection on the destination volume. If the operation is ran on the source volume it will reverse-resync the connection and sync from source to destination.",
"description": "Resync the connection on the destination volume. If the operation is ran on the source volume it will reverse-resync the connection and sync from destination to source.",
"operationId": "Volumes_ResyncReplication",
"parameters": [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,28 @@
},
"responses": {
"200": {
"body": {
"value": [
{
"id": "/subscriptions/D633CC2E-722B-4AE1-B636-BBD9E4C60ED9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1/volumes/volume1"
"body": [
{
"id": "/subscriptions/D633CC2E-722B-4AE1-B636-BBD9E4C60ED9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1/volumes/volume1",
"name": "account1/pool1/volume1",
"type": "Microsoft.NetApp/netAppAccounts/capacityPools/volumes",
"location": "eastus",
"properties": {
"dataProtection": {
"snapshot": {
"snapshotPolicyId": "/subscriptions/D633CC2E-722B-4AE1-B636-BBD9E4C60ED9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/snapshotPolicies/snapshotPolicy-1"
}
},
"fileSystemId": "9760acf5-4638-11e7-9bdb-020073ca7778",
"creationToken": "some-amazing-filepath",
"usageThreshold": 107374182400,
"serviceLevel": "Premium",
"provisioningState": "Succeeded",
"throughputMibps": 128,
"subnetId": "/subscriptions/9760acf5-4638-11e7-9bdb-020073ca7778/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3"
}
]
}
}
]
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -1103,7 +1103,7 @@
"Volumes Replication"
],
"summary": "Resync volume replication",
"description": "Resync the connection on the destination volume. If the operation is ran on the source volume it will reverse-resync the connection and sync from source to destination.",
"description": "Resync the connection on the destination volume. If the operation is ran on the source volume it will reverse-resync the connection and sync from destination to source.",
"operationId": "Volumes_ResyncReplication",
"parameters": [
{
Expand Down Expand Up @@ -3466,12 +3466,10 @@
}
},
"throughputMibps": {
"title": "Maximum throughput in Mibps that can be achieved by this volume",
"title": "Maximum throughput in Mibps that can be achieved by this volume, value between 1 and 4500",
"type": "number",
"example": "128.22",
"maximum": 4500,
"minimum": 1,
"multipleOf": 0.001
"format": "double",
"example": "128.22"
}
}
},
Expand Down Expand Up @@ -3768,12 +3766,10 @@
}
},
"throughputMibps": {
"title": "Maximum throughput in Mibps that can be achieved by this volume",
"title": "Maximum throughput in Mibps that can be achieved by this volume, value between 1 and 4500",
"type": "number",
"example": "128.22",
"maximum": 4500,
"minimum": 1,
"multipleOf": 0.001
"format": "double",
"example": "128.22"
},
"dataProtection": {
"title": "DataProtection",
Expand Down Expand Up @@ -4128,18 +4124,11 @@
}
},
"snapshotPolicyVolumeList": {
"description": "Volumes associated with snapshot policy",
"type": "object",
"properties": {
"value": {
"description": "List of volumes",
"type": "array",
"items": {
"type": "object",
"readOnly": true,
"description": "Associated volume resource Id"
}
}
"description": "List of volumes",
"type": "array",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a significant breaking change to what existed before and doesn't meet the RPC defined collection response. It should be { "value": [{yourObject1}, {yourObject2}] }.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, this was to match the actual response from the service as SDK's where having deserialization issues.
Probably we would need to update the service to produce { "value": [{yourObject1}, {yourObject2}] } type response. Is this a hard requirement and something that what we should do here?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated spec

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The collection response is a standard contract that everyone should follow for collection GETs.

"readOnly": true,
"items": {
"$ref": "#/definitions/volume"
}
},
"hourlySchedule": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,36 @@
"resourceGroupName": "myRG",
"accountName": "account1",
"snapshotPolicyName": "snapshotPolicyName",
"api-version": "2020-07-01",
"api-version": "2020-06-01",
"body": {
"location": "eastus",
"properties": {}
}
},
"responses": {
"200": {
"body": {
"value": [
{
"id": "/subscriptions/D633CC2E-722B-4AE1-B636-BBD9E4C60ED9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1/volumes/volume1"
"body": [
{
"id": "/subscriptions/D633CC2E-722B-4AE1-B636-BBD9E4C60ED9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1/volumes/volume1",
"name": "account1/pool1/volume1",
"type": "Microsoft.NetApp/netAppAccounts/capacityPools/volumes",
"location": "eastus",
"properties": {
"dataProtection": {
"snapshot": {
"snapshotPolicyId": "/subscriptions/D633CC2E-722B-4AE1-B636-BBD9E4C60ED9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/snapshotPolicies/snapshotPolicy-1"
}
},
"fileSystemId": "9760acf5-4638-11e7-9bdb-020073ca7778",
"creationToken": "some-amazing-filepath",
"usageThreshold": 107374182400,
"serviceLevel": "Premium",
"provisioningState": "Succeeded",
"throughputMibps": 128,
"subnetId": "/subscriptions/9760acf5-4638-11e7-9bdb-020073ca7778/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3"
}
]
}
}
]
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -1103,7 +1103,7 @@
"Volumes Replication"
],
"summary": "Resync volume replication",
"description": "Resync the connection on the destination volume. If the operation is ran on the source volume it will reverse-resync the connection and sync from source to destination.",
"description": "Resync the connection on the destination volume. If the operation is ran on the source volume it will reverse-resync the connection and sync from destination to source.",
"operationId": "Volumes_ResyncReplication",
"parameters": [
{
Expand Down Expand Up @@ -3470,12 +3470,10 @@
}
},
"throughputMibps": {
"title": "Maximum throughput in Mibps that can be achieved by this volume",
"title": "Maximum throughput in Mibps that can be achieved by this volume, value between 1 and 4500",
"type": "number",
"example": "128.22",
"maximum": 4500,
"minimum": 1,
"multipleOf": 0.001
"format": "double",
"example": "128.22"
}
}
},
Expand Down Expand Up @@ -3772,12 +3770,10 @@
}
},
"throughputMibps": {
"title": "Maximum throughput in Mibps that can be achieved by this volume",
"title": "Maximum throughput in Mibps that can be achieved by this volume, value between 1 and 4500",
"type": "number",
"example": "128.22",
"maximum": 4500,
"minimum": 1,
"multipleOf": 0.001
"format": "double",
"example": "128.22"
},
"dataProtection": {
"title": "DataProtection",
Expand Down Expand Up @@ -4132,18 +4128,11 @@
}
},
"snapshotPolicyVolumeList": {
"description": "Volumes associated with snapshot policy",
"type": "object",
"properties": {
"value": {
"description": "List of volumes",
"type": "array",
"items": {
"type": "object",
"readOnly": true,
"description": "Associated volume resource Id"
}
}
"description": "List of volumes",
"type": "array",
"readOnly": true,
"items": {
"$ref": "#/definitions/volume"
}
},
"hourlySchedule": {
Expand Down