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

[NetAppFiles] Add missing features, quotaLimits and Rotterdam networkFeatures to API version 2021-06-02 #15850

Merged
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{
"parameters": {
"subscriptionId": "D633CC2E-722B-4AE1-B636-BBD9E4C60ED9",
"location": "eastus",
"api-version": "2021-06-01"
},
"responses": {
"200": {
"body": {
"subscriptionId": "D633CC2E-722B-4AE1-B636-BBD9E4C60ED9",
"accountsPerSubscription": {
"current": 10,
"default": 10
},
"poolsPerAccount": {
"current": 25,
"default": 25
},
"volumesPerPool": {
"current": 500,
"default": 500
},
"snapshotsPerVolume": {
"current": 255,
"default": 255
},
"totalTiBsPerSubscription": {
"current": 1000,
"default": 25
},
"totalDPVolumesPerSubscription": {
"current": 10,
"default": 10
},
"totalVolumesPerSubscription": {
"current": 500,
"default": 500
},
"totalCoolAccessVolumesPerSubscription": {
"current": 10,
"default": 10
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@
"serviceLevel": "Premium",
"provisioningState": "Succeeded",
"throughputMibps": 128,
"subnetId": "/subscriptions/9760acf5-4638-11e7-9bdb-020073ca7778/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3"
"subnetId": "/subscriptions/9760acf5-4638-11e7-9bdb-020073ca7778/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3",
"networkFeatures": "Standard",
"networkSiblingSetId": "0f434a03-ce0b-4935-81af-d98652ffb1c4",
"storageToNetworkProximity": "T2"
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@
"serviceLevel": "Premium",
"provisioningState": "Succeeded",
"throughputMibps": 128,
"subnetId": "/subscriptions/9760acf5-4638-11e7-9bdb-020073ca7778/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3"
"subnetId": "/subscriptions/9760acf5-4638-11e7-9bdb-020073ca7778/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3",
"networkFeatures": "Standard",
"networkSiblingSetId": "0f434a03-ce0b-4935-81af-d98652ffb1c4",
"storageToNetworkProximity": "T2"
}
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@
"provisioningState": "Succeeded",
"throughputMibps": 128,
"subnetId": "/subscriptions/9760acf5-4638-11e7-9bdb-020073ca7778/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3",
"networkFeatures": "Standard",
"networkSiblingSetId": "0f434a03-ce0b-4935-81af-d98652ffb1c4",
"storageToNetworkProximity": "T2",
"dataProtection": {
"snapshot": {
"snapshotPolicyId": "/subscriptions/D633CC2E-722B-4AE1-B636-BBD9E4C60ED9/resourceGroups/myRP/providers/Microsoft.NetApp/netAppAccounts/account1/snapshotPolicies/snapshotPolicy1"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,43 @@
}
}
},
"/subscriptions/{subscriptionId}/providers/Microsoft.NetApp/locations/{location}/quotaLimits": {
Copy link
Contributor

Choose a reason for hiding this comment

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

quotaLimits

Per API contract this API must return a collection GET and expose another API to return a single item (singleton), see here: https://github.com/Azure/azure-resource-manager-rpc/blob/770933ab2af1ece1eba2835f7a03bbfde47bb793/v1.0/common-api-contracts.md#singleton-resources

Copy link
Member Author

@audunn audunn Aug 31, 2021

Choose a reason for hiding this comment

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

Looks like this will require a service side change. As that would likely delay the release of SDK's, Azure CLI, Powershell etc. is is possible to add collection GET in the new api version ? Or perhaps change this API to return collection as noted and add the single GET in next api-version as that would include more work presumably (additional manifest change).

Copy link
Member Author

Choose a reason for hiding this comment

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

@jorgecotillo We have updated the spec with proposed implementation to address this. Can you take another look?

"get": {
"tags": [
"NetApp Resource"
],
"summary": "Get quota limits",
"description": "Get the default and current limits for quotas",
"operationId": "NetAppResourceQuotaLimits_Get",
"parameters": [
{
"$ref": "#/parameters/SubscriptionId"
},
{
"$ref": "#/parameters/location"
},
{
"$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/QuotaLimitsResponse"
}
},
"default": {
"description": "Error response describing why the operation failed."
}
},
"x-ms-examples": {
"QuotaLimits": {
"$ref": "examples/QuotaLimits.json"
}
}
}
},
"/subscriptions/{subscriptionId}/providers/Microsoft.NetApp/netAppAccounts": {
"get": {
"summary": "Describe all NetApp Accounts in a subscription",
Expand Down Expand Up @@ -3040,6 +3077,75 @@
}
}
},
"SubscriptionQuotaItem": {
Copy link
Member

Choose a reason for hiding this comment

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

SubscriptionQuotaItem

Why isn't this a standard ARM resource payload. You should have id, name, type properties and a properties property at a minimum.

Copy link
Member Author

@audunn audunn Sep 9, 2021

Choose a reason for hiding this comment

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

That is why I am wondering as this is not strictly a "resource" if a POST to list the quota values would be a better fit here?

"/subscriptions/{subscriptionId}/providers/Microsoft.NetApp/locations/{location}/quotaLimits": {
   "post": {
      "tags": [
        "NetApp Resource"
      ],
      "summary": "Get quota limits",
      "description": "Get the default and current limits for quotas",
      "operationId": "NetAppResourceQuotaLimits_List",
      "parameters": [
        {
          "$ref": "#/parameters/SubscriptionId"
        },
        {
          "$ref": "#/parameters/location"
        },
        {
          "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter"
        }
      ],
      "responses": {
        "200": {
          "description": "OK",
          "schema": {
            "$ref": "#/definitions/SubscriptionQuotaItemList"
          }
        },
        "default": {
          "description": "Error response describing why the operation failed."
        }
      },
      "x-ms-examples": {
        "QuotaLimits": {
          "$ref": "examples/QuotaLimits_List.json"
        }
      }
    }
  },

If that does not fit this scenario I will make those changes you suggest.

Copy link
Member Author

Choose a reason for hiding this comment

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

Hi, @majastrz can you take another look?

Copy link
Member

Choose a reason for hiding this comment

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

The problem with POST is that identities with Reader role aren't able to invoke them, which causes some frustration. It's also harder to discover POST actions like that. My suggestion would be to stick with GET and just adjust the payloads to match ARM resources. It should be a pretty minor change.

Copy link
Member Author

@audunn audunn Sep 10, 2021

Choose a reason for hiding this comment

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

@majastrz , @jorgecotillo yes I was thinking it used along with authorizationActionMappings.
Note we have updated GET in the spec with regards to your comment.

"description": "Information regarding Subscription Quota Item",
"type": "object",
"properties": {
"current": {
"description": "The current quota value.",
"readOnly": true,
"type": "integer",
"format": "int32"
},
"default": {
"description": "The default quota value.",
"readOnly": true,
"type": "integer",
"format": "int32"
}
}
},
"QuotaLimitsResponse": {
"description": "Information regarding quota limits on subscription",
"type": "object",
"properties": {
"subscriptionId": {
"description": "Subscription identifier.",
"readOnly": true,
"type": "string"
},
"accountsPerSubscription": {
"description": "The quota for maximum number of accounts per subscription.",
"type": "object",
"$ref": "#/definitions/SubscriptionQuotaItem"
},
"poolsPerAccount": {
"description": "The quota for maximum number of capacity pools per account.",
"type": "object",
"$ref": "#/definitions/SubscriptionQuotaItem"
},
"volumesPerPool": {
"description": "The quota for maximum number of volumes per capacity pool.",
"type": "object",
"$ref": "#/definitions/SubscriptionQuotaItem"
},
"snapshotsPerVolume": {
"description": "The quota for maximum number of snapshots per volume",
"type": "object",
"$ref": "#/definitions/SubscriptionQuotaItem"
},
"totalTiBsPerSubscription": {
"description": "The quota for maximum number of Tebibytes per subscription",
"type": "object",
"$ref": "#/definitions/SubscriptionQuotaItem"
},
"totalDPVolumesPerSubscription": {
"description": "The quota for maximum number of data protection volumes per subscription.",
"type": "object",
"$ref": "#/definitions/SubscriptionQuotaItem"
},
"totalVolumesPerSubscription": {
"description": "The quota for maximum number of volumes per subscription.",
"type": "object",
"$ref": "#/definitions/SubscriptionQuotaItem"
},
"totalCoolAccessVolumesPerSubscription": {
"description": "The quota for maximum number of cool access volumes per subscription",
"type": "object",
"$ref": "#/definitions/SubscriptionQuotaItem"
}
}
},
"netAppAccountList": {
"description": "List of NetApp account resources",
"type": "object",
Expand Down Expand Up @@ -3783,6 +3889,71 @@
"type": "string",
"description": "The Azure Resource URI for a delegated subnet. Must have the delegation Microsoft.NetApp/volumes"
},
"networkFeatures": {
"title": "Network features",
"description": "Basic network, or Standard features available to the volume.",
"type": "string",
"enum": [
"Basic",
"Standard"
],
"x-ms-enum": {
"name": "NetworkFeatures",
"modelAsString": true,
"values": [
{
"value": "Basic",
"description": "Basic network feature."
},
{
"value": "Standard",
"description": "Standard network feature."
}
]
},
"example": "Standard",
"default": "Basic"
},
"networkSiblingSetId": {
"title": "Network Sibling Set ID",
"description": "Network Sibling Set ID for the the group of volumes sharing networking resources.",
"type": "string",
"readOnly": true,
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$",
"maxLength": 36,
"minLength": 36,
"example": "9760acf5-4638-11e7-9bdb-020073ca3333"
},
"storageToNetworkProximity": {
"title": "Storage to Network Proximity",
"description": "Provides storage to network proximity information for the volume.",
"type": "string",
"enum": [
"Default",
"T1",
"T2"
],
"readOnly": true,
"x-ms-enum": {
"name": "VolumeStorageToNetworkProximity",
"modelAsString": true,
"values": [
{
"value": "Default",
"description": "Basic storage to network connectivity."
},
{
"value": "T1",
"description": "Standard T1 storage to network connectivity."
},
{
"value": "T2",
"description": "Standard T2 storage to network connectivity."
}
]
},
"example": "T1"
},
"mountTargets": {
"title": "mountTargets",
"type": "array",
Expand Down