Skip to content

Commit

Permalink
[ADLA - ADLS] - Adding pageable extension for Catalog ACL APIs and re…
Browse files Browse the repository at this point in the history
…moving childrenNum property (#2353)

* Adding paging for ListAcls and ListAclsByDatabase

* Although paging is not supported for these operations, the design
decision that we took was to provide support at the client side just in
case we need to add it from the server side.

* Removing default response from Swagger for Acl APIs

* Removing childrenNum property from FileStatusProperties

* This property is always null as brought up by this issue:
Azure/azure-sdk-for-net#3770

* Fixing examples for childrenNum

* Fixing oav validate-example errors
  • Loading branch information
ro-joowan authored and anuchandy committed Jan 30, 2018
1 parent 142af24 commit d3af35e
Show file tree
Hide file tree
Showing 70 changed files with 207 additions and 96 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2553,11 +2553,11 @@
"schema": {
"$ref": "#/definitions/AclList"
}
},
"default": {
"description": "404 - Not found."
}
},
"x-ms-pageable": {
"nextLinkName": "nextLink"
},
"x-ms-odata": "#/definitions/Acl"
}
},
Expand Down Expand Up @@ -2628,11 +2628,11 @@
"schema": {
"$ref": "#/definitions/AclList"
}
},
"default": {
"description": "404 - Not found."
}
},
"x-ms-pageable": {
"nextLinkName": "nextLink"
},
"x-ms-odata": "#/definitions/Acl"
}
},
Expand Down Expand Up @@ -2745,32 +2745,25 @@
}
},
"x-ms-paths": {
"/catalog/usql/databases/{databaseName}/acl?op=GRANTACE": {
"/catalog/usql/acl?op=GRANTACE": {
"post": {
"tags": [
"Catalog"
],
"operationId": "Catalog_GrantAclToDatabase",
"description": "Grants an access control list (ACL) entry to the database from the Data Lake Analytics catalog.",
"operationId": "Catalog_GrantAcl",
"description": "Grants an access control list (ACL) entry to the Data Lake Analytics catalog.",
"x-ms-examples": {
"Grants an access control list (ACL) entry to the database from the Data Lake Analytics catalog": { "$ref": "./examples/Adla_Catalog_GrantAclToDatabase.json" }
"Grants an access control list (ACL) entry to the Data Lake Analytics catalog": { "$ref": "./examples/Adla_Catalog_GrantAcl.json" }
},
"parameters": [
{
"name": "databaseName",
"in": "path",
"required": true,
"type": "string",
"description": "The name of the database."
},
{
"name": "parameters",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/AclCreateOrUpdateParameters"
},
"description": "Parameters supplied to create or update an access control list (ACL) entry for a database."
"description": "Parameters supplied to create or update an access control list (ACL) entry for a Data Lake Analytics catalog."
},
{
"name": "op",
Expand All @@ -2788,23 +2781,20 @@
],
"responses": {
"200": {
"description": "Successfully granted the access control list (ACL) entry to the specified database."
},
"default": {
"description": "404 - Not found."
"description": "Successfully granted the access control list (ACL) entry to the Data Lake Analytics catalog."
}
}
}
},
"/catalog/usql/databases/{databaseName}/acl?op=REVOKEACE": {
"/catalog/usql/databases/{databaseName}/acl?op=GRANTACE": {
"post": {
"tags": [
"Catalog"
],
"operationId": "Catalog_RevokeAclFromDatabase",
"description": "Revokes an access control list (ACL) entry for the database from the Data Lake Analytics catalog.",
"operationId": "Catalog_GrantAclToDatabase",
"description": "Grants an access control list (ACL) entry to the database from the Data Lake Analytics catalog.",
"x-ms-examples": {
"Revokes an access control list (ACL) entry for the database from the Data Lake Analytics catalog": { "$ref": "./examples/Adla_Catalog_RevokeAclFromDatabase.json" }
"Grants an access control list (ACL) entry to the database from the Data Lake Analytics catalog": { "$ref": "./examples/Adla_Catalog_GrantAclToDatabase.json" }
},
"parameters": [
{
Expand All @@ -2819,9 +2809,9 @@
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/AclDeleteParameters"
"$ref": "#/definitions/AclCreateOrUpdateParameters"
},
"description": "Parameters supplied to delete an access control list (ACL) entry for a database."
"description": "Parameters supplied to create or update an access control list (ACL) entry for a database."
},
{
"name": "op",
Expand All @@ -2830,7 +2820,7 @@
"type": "string",
"description": "The constant value for the operation.",
"enum": [
"REVOKEACE"
"GRANTACE"
]
},
{
Expand All @@ -2839,33 +2829,30 @@
],
"responses": {
"200": {
"description": "Successfully revoked the access control list (ACL) entry from the specified database."
},
"default": {
"description": "404 - Not found."
"description": "Successfully granted the access control list (ACL) entry to the specified database."
}
}
}
},
"/catalog/usql/acl?op=GRANTACE": {
"/catalog/usql/acl?op=REVOKEACE": {
"post": {
"tags": [
"Catalog"
],
"operationId": "Catalog_GrantAcl",
"description": "Grants an access control list (ACL) entry to the Data Lake Analytics catalog.",
"operationId": "Catalog_RevokeAcl",
"description": "Revokes an access control list (ACL) entry from the Data Lake Analytics catalog.",
"x-ms-examples": {
"Grants an access control list (ACL) entry to the Data Lake Analytics catalog": { "$ref": "./examples/Adla_Catalog_GrantAcl.json" }
"Revokes an access control list (ACL) entry from the Data Lake Analytics catalog": { "$ref": "./examples/Adla_Catalog_RevokeAcl.json" }
},
"parameters": [
{
"name": "parameters",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/AclCreateOrUpdateParameters"
"$ref": "#/definitions/AclDeleteParameters"
},
"description": "Parameters supplied to create or update an access control list (ACL) entry for a Data Lake Analytics catalog."
"description": "Parameters supplied to delete an access control list (ACL) entry from a Data Lake Analytics catalog."
},
{
"name": "op",
Expand All @@ -2874,7 +2861,7 @@
"type": "string",
"description": "The constant value for the operation.",
"enum": [
"GRANTACE"
"REVOKEACE"
]
},
{
Expand All @@ -2883,33 +2870,37 @@
],
"responses": {
"200": {
"description": "Successfully granted the access control list (ACL) entry to the Data Lake Analytics catalog."
},
"default": {
"description": "404 - Not found."
"description": "Successfully revoked the access control list (ACL) entry from the Data Lake Analytics catalog."
}
}
}
},
"/catalog/usql/acl?op=REVOKEACE": {
"/catalog/usql/databases/{databaseName}/acl?op=REVOKEACE": {
"post": {
"tags": [
"Catalog"
],
"operationId": "Catalog_RevokeAcl",
"description": "Revokes an access control list (ACL) entry from the Data Lake Analytics catalog.",
"operationId": "Catalog_RevokeAclFromDatabase",
"description": "Revokes an access control list (ACL) entry for the database from the Data Lake Analytics catalog.",
"x-ms-examples": {
"Revokes an access control list (ACL) entry from the Data Lake Analytics catalog": { "$ref": "./examples/Adla_Catalog_RevokeAcl.json" }
"Revokes an access control list (ACL) entry for the database from the Data Lake Analytics catalog": { "$ref": "./examples/Adla_Catalog_RevokeAclFromDatabase.json" }
},
"parameters": [
{
"name": "databaseName",
"in": "path",
"required": true,
"type": "string",
"description": "The name of the database."
},
{
"name": "parameters",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/AclDeleteParameters"
},
"description": "Parameters supplied to delete an access control list (ACL) entry from a Data Lake Analytics catalog."
"description": "Parameters supplied to delete an access control list (ACL) entry for a database."
},
{
"name": "op",
Expand All @@ -2927,10 +2918,7 @@
],
"responses": {
"200": {
"description": "Successfully revoked the access control list (ACL) entry from the Data Lake Analytics catalog."
},
"default": {
"description": "404 - Not found."
"description": "Successfully revoked the access control list (ACL) entry from the specified database."
}
}
}
Expand Down Expand Up @@ -3059,6 +3047,11 @@
"description": "A Data Lake Analytics catalog access control list (ACL) entry."
},
"AclList": {
"allOf": [
{
"$ref": "#/definitions/CatalogItemList"
}
],
"properties": {
"value": {
"type": "array",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{
"parameters": {
"api-version": "2016-11-01",
"accountName": "contosoadla",
"adlaCatalogDnsSuffix": "azuredatalakeanalytics.net",
"databaseName": "master",
"credentialName": "test_credential_name",
"parameters": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{
"parameters": {
"api-version": "2016-11-01",
"accountName": "contosoadla",
"adlaCatalogDnsSuffix": "azuredatalakeanalytics.net",
"databaseName": "master",
"secretName": "test_secret_name",
"parameters": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{
"parameters": {
"api-version": "2016-11-01",
"accountName": "contosoadla",
"adlaCatalogDnsSuffix": "azuredatalakeanalytics.net",
"databaseName": "master"
},
"responses": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{
"parameters": {
"api-version": "2016-11-01",
"accountName": "contosoadla",
"adlaCatalogDnsSuffix": "azuredatalakeanalytics.net",
"databaseName": "master",
"credentialName": "test_credential_name",
"parameters": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{
"parameters": {
"api-version": "2016-11-01",
"accountName": "contosoadla",
"adlaCatalogDnsSuffix": "azuredatalakeanalytics.net",
"databaseName": "master",
"secretName": "test_secret_name"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{
"parameters": {
"api-version": "2016-11-01",
"accountName": "contosoadla",
"adlaCatalogDnsSuffix": "azuredatalakeanalytics.net",
"databaseName": "master",
"assemblyName": "test_assembly_name"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{
"parameters": {
"api-version": "2016-11-01",
"accountName": "contosoadla",
"adlaCatalogDnsSuffix": "azuredatalakeanalytics.net",
"databaseName": "master",
"credentialName": "test_credential_name"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{
"parameters": {
"api-version": "2016-11-01",
"accountName": "contosoadla",
"adlaCatalogDnsSuffix": "azuredatalakeanalytics.net",
"databaseName": "master"
},
"responses": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{
"parameters": {
"api-version": "2016-11-01",
"accountName": "contosoadla",
"adlaCatalogDnsSuffix": "azuredatalakeanalytics.net",
"databaseName": "master",
"externalDataSourceName": "test_external_data_source_name"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{
"parameters": {
"api-version": "2016-11-01",
"accountName": "contosoadla",
"adlaCatalogDnsSuffix": "azuredatalakeanalytics.net",
"databaseName": "master",
"schemaName": "dbo",
"packageName": "test_package_name"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{
"parameters": {
"api-version": "2016-11-01",
"accountName": "contosoadla",
"adlaCatalogDnsSuffix": "azuredatalakeanalytics.net",
"databaseName": "master",
"schemaName": "dbo",
"procedureName": "test_procedure_name"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{
"parameters": {
"api-version": "2016-11-01",
"accountName": "contosoadla",
"adlaCatalogDnsSuffix": "azuredatalakeanalytics.net",
"databaseName": "master",
"schemaName": "dbo"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{
"parameters": {
"api-version": "2016-11-01",
"accountName": "contosoadla",
"adlaCatalogDnsSuffix": "azuredatalakeanalytics.net",
"databaseName": "master",
"secretName": "test_secret_name"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{
"parameters": {
"api-version": "2016-11-01",
"accountName": "contosoadla",
"adlaCatalogDnsSuffix": "azuredatalakeanalytics.net",
"databaseName": "master",
"schemaName": "dbo",
"tableName": "test_table_name"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{
"parameters": {
"api-version": "2016-11-01",
"accountName": "contosoadla",
"adlaCatalogDnsSuffix": "azuredatalakeanalytics.net",
"databaseName": "master",
"schemaName": "dbo",
"tableName": "test_table_name",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{
"parameters": {
"api-version": "2016-11-01",
"accountName": "contosoadla",
"adlaCatalogDnsSuffix": "azuredatalakeanalytics.net",
"databaseName": "master",
"schemaName": "dbo",
"tableName": "test_table_name",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{
"parameters": {
"api-version": "2016-11-01",
"accountName": "contosoadla",
"adlaCatalogDnsSuffix": "azuredatalakeanalytics.net",
"databaseName": "master",
"schemaName": "dbo",
"tableTypeName": "test_table_type_name"
Expand Down
Loading

2 comments on commit d3af35e

@AutorestCI
Copy link

Choose a reason for hiding this comment

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

Did a commit to Azure/azure-sdk-for-python:
Azure/azure-sdk-for-python@7396427

@AutorestCI
Copy link

Choose a reason for hiding this comment

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

Did a commit to Azure/azure-sdk-for-go:
Azure/azure-sdk-for-go@a6204f2

Please sign in to comment.