diff --git a/azure-mgmt-resourcegraph/HISTORY.rst b/azure-mgmt-resourcegraph/HISTORY.rst index 63d28455418b..877de0d2fd28 100644 --- a/azure-mgmt-resourcegraph/HISTORY.rst +++ b/azure-mgmt-resourcegraph/HISTORY.rst @@ -3,6 +3,11 @@ Release History =============== +1.0.0 (2019-03-28) +++++++++++++++++++ + +* Increment the version to show it as GA version no change in the contract. + 0.1.0 (2018-09-07) ++++++++++++++++++ diff --git a/azure-mgmt-resourcegraph/MANIFEST.in b/azure-mgmt-resourcegraph/MANIFEST.in index bb37a2723dae..e4884efef41b 100644 --- a/azure-mgmt-resourcegraph/MANIFEST.in +++ b/azure-mgmt-resourcegraph/MANIFEST.in @@ -1 +1,5 @@ +recursive-include tests *.py *.yaml include *.rst +include azure/__init__.py +include azure/mgmt/__init__.py + diff --git a/azure-mgmt-resourcegraph/README.rst b/azure-mgmt-resourcegraph/README.rst index fc61f57f06b5..eac5fcf7dc63 100644 --- a/azure-mgmt-resourcegraph/README.rst +++ b/azure-mgmt-resourcegraph/README.rst @@ -14,25 +14,6 @@ For the older Azure Service Management (ASM) libraries, see For a more complete set of Azure libraries, see the `azure `__ bundle package. -Compatibility -============= - -**IMPORTANT**: If you have an earlier version of the azure package -(version < 1.0), you should uninstall it before installing this package. - -You can check the version using pip: - -.. code:: shell - - pip freeze - -If you see azure==0.11.0 (or any version below 1.0), uninstall it first: - -.. code:: shell - - pip uninstall azure - - Usage ===== diff --git a/azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/models/facet_request_options.py b/azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/models/facet_request_options.py index 4ea94a3bd963..cb6d44fdbec0 100644 --- a/azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/models/facet_request_options.py +++ b/azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/models/facet_request_options.py @@ -15,9 +15,15 @@ class FacetRequestOptions(Model): """The options for facet evaluation. - :param sort_order: The sorting order by the hit count. Possible values - include: 'asc', 'desc'. Default value: "desc" . + :param sort_by: The column name or query expression to sort on. Defaults + to count if not present. + :type sort_by: str + :param sort_order: The sorting order by the selected column (count by + default). Possible values include: 'asc', 'desc'. Default value: "desc" . :type sort_order: str or ~azure.mgmt.resourcegraph.models.FacetSortOrder + :param filter: Specifies the filter condition for the 'where' clause which + will be run on main query's result, just before the actual faceting. + :type filter: str :param top: The maximum number of facet rows that should be returned. :type top: int """ @@ -27,11 +33,15 @@ class FacetRequestOptions(Model): } _attribute_map = { + 'sort_by': {'key': 'sortBy', 'type': 'str'}, 'sort_order': {'key': 'sortOrder', 'type': 'FacetSortOrder'}, + 'filter': {'key': 'filter', 'type': 'str'}, 'top': {'key': '$top', 'type': 'int'}, } def __init__(self, **kwargs): super(FacetRequestOptions, self).__init__(**kwargs) + self.sort_by = kwargs.get('sort_by', None) self.sort_order = kwargs.get('sort_order', "desc") + self.filter = kwargs.get('filter', None) self.top = kwargs.get('top', None) diff --git a/azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/models/facet_request_options_py3.py b/azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/models/facet_request_options_py3.py index 677fda8ce26c..ed06f25c8a2d 100644 --- a/azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/models/facet_request_options_py3.py +++ b/azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/models/facet_request_options_py3.py @@ -15,9 +15,15 @@ class FacetRequestOptions(Model): """The options for facet evaluation. - :param sort_order: The sorting order by the hit count. Possible values - include: 'asc', 'desc'. Default value: "desc" . + :param sort_by: The column name or query expression to sort on. Defaults + to count if not present. + :type sort_by: str + :param sort_order: The sorting order by the selected column (count by + default). Possible values include: 'asc', 'desc'. Default value: "desc" . :type sort_order: str or ~azure.mgmt.resourcegraph.models.FacetSortOrder + :param filter: Specifies the filter condition for the 'where' clause which + will be run on main query's result, just before the actual faceting. + :type filter: str :param top: The maximum number of facet rows that should be returned. :type top: int """ @@ -27,11 +33,15 @@ class FacetRequestOptions(Model): } _attribute_map = { + 'sort_by': {'key': 'sortBy', 'type': 'str'}, 'sort_order': {'key': 'sortOrder', 'type': 'FacetSortOrder'}, + 'filter': {'key': 'filter', 'type': 'str'}, 'top': {'key': '$top', 'type': 'int'}, } - def __init__(self, *, sort_order="desc", top: int=None, **kwargs) -> None: + def __init__(self, *, sort_by: str=None, sort_order="desc", filter: str=None, top: int=None, **kwargs) -> None: super(FacetRequestOptions, self).__init__(**kwargs) + self.sort_by = sort_by self.sort_order = sort_order + self.filter = filter self.top = top diff --git a/azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/operations/operations.py b/azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/operations/operations.py index d8ee6f0a57a1..a941a2bff7c9 100644 --- a/azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/operations/operations.py +++ b/azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/operations/operations.py @@ -23,7 +23,7 @@ class Operations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: API version. Constant value: "2018-09-01-preview". + :ivar api_version: API version. Constant value: "2019-04-01". """ models = models @@ -33,7 +33,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-09-01-preview" + self.api_version = "2019-04-01" self.config = config diff --git a/azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/resource_graph_client.py b/azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/resource_graph_client.py index 6f5ff0e93e33..e45d61791545 100644 --- a/azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/resource_graph_client.py +++ b/azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/resource_graph_client.py @@ -69,7 +69,7 @@ def __init__( super(ResourceGraphClient, self).__init__(self.config.credentials, self.config) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self.api_version = '2018-09-01-preview' + self.api_version = '2019-04-01' self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) diff --git a/azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/version.py b/azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/version.py index e0ec669828cb..a39916c162ce 100644 --- a/azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/version.py +++ b/azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/version.py @@ -9,5 +9,5 @@ # regenerated. # -------------------------------------------------------------------------- -VERSION = "0.1.0" +VERSION = "1.0.0" diff --git a/azure-mgmt-resourcegraph/tests/recordings/test_mgmt_resourcegraph.test_resources_basic_query.yaml b/azure-mgmt-resourcegraph/tests/recordings/test_mgmt_resourcegraph.test_resources_basic_query.yaml index cad4b4aa7722..20e66d1a794f 100644 --- a/azure-mgmt-resourcegraph/tests/recordings/test_mgmt_resourcegraph.test_resources_basic_query.yaml +++ b/azure-mgmt-resourcegraph/tests/recordings/test_mgmt_resourcegraph.test_resources_basic_query.yaml @@ -12,7 +12,7 @@ interactions: msrest_azure/0.4.34 azure-mgmt-resourcegraph/0.6.0 Azure-SDK-For-Python] accept-language: [en-US] method: POST - uri: https://management.azure.com/providers/Microsoft.ResourceGraph/resources?api-version=2018-09-01-preview + uri: https://management.azure.com/providers/Microsoft.ResourceGraph/resources?api-version=2019-04-01 response: body: {string: '{"totalRecords":2,"count":2,"data":{"columns":[{"name":"id","type":"string"},{"name":"tags","type":"object"},{"name":"properties","type":"object"}],"rows":[["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/zarttest1faaede5-14b9-43b9-8836-3b8df81aa6f2/providers/Microsoft.StreamAnalytics/streamingjobs/zarttest28000000",{},{"provisioningState":"Succeeded","sku":{"name":"Standard"},"eventsLateArrivalMaxDelayInSeconds":5,"createdDate":"2018-07-26T01:17:29.3470000Z","compatibilityLevel":"1.0","outputErrorPolicy":"Stop","dataLocale":"en-US","jobState":"Created","package":null,"jobType":"Cloud","jobId":"00000000-0000-0000-0000-000000000000"}],["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/newzarttestefd4b1a7-6480-40bb-bac5-f23376ebb04d/providers/Microsoft.Storage/storageAccounts/zarttest9b000000",{},{"provisioningState":"Succeeded","creationTime":"2018-08-04T19:23:48.4690000Z","supportsHttpsTrafficOnly":true,"trustedDirectories":["72f988bf-86f1-41af-91ab-2d7cd011db47"],"primaryEndpoints":{"blob":"https://zarttest9b000000.blob.core.windows.net/","file":"https://zarttest9b000000.file.core.windows.net/","table":"https://zarttest9b000000.table.core.windows.net/","queue":"https://zarttest9b000000.queue.core.windows.net/"},"statusOfPrimary":"available","primaryLocation":"eastus","networkAcls":{"virtualNetworkRules":[],"defaultAction":"Allow","ipRules":[],"bypass":"AzureServices"},"encryption":{"services":{"blob":{"lastEnabledTime":"2018-08-04T19:23:48.5940000Z","enabled":true},"file":{"lastEnabledTime":"2018-08-04T19:23:48.5940000Z","enabled":true}},"keySource":"Microsoft.Storage"}}]]},"facets":[],"resultTruncated":"false"}'} headers: diff --git a/azure-mgmt-resourcegraph/tests/recordings/test_mgmt_resourcegraph.test_resources_facet_query.yaml b/azure-mgmt-resourcegraph/tests/recordings/test_mgmt_resourcegraph.test_resources_facet_query.yaml index fe886a974d58..b3b73b09cdda 100644 --- a/azure-mgmt-resourcegraph/tests/recordings/test_mgmt_resourcegraph.test_resources_facet_query.yaml +++ b/azure-mgmt-resourcegraph/tests/recordings/test_mgmt_resourcegraph.test_resources_facet_query.yaml @@ -14,7 +14,7 @@ interactions: msrest_azure/0.4.34 azure-mgmt-resourcegraph/0.6.0 Azure-SDK-For-Python] accept-language: [en-US] method: POST - uri: https://management.azure.com/providers/Microsoft.ResourceGraph/resources?api-version=2018-09-01-preview + uri: https://management.azure.com/providers/Microsoft.ResourceGraph/resources?api-version=2019-04-01 response: body: {string: '{"totalRecords":10,"count":10,"data":{"columns":[{"name":"id","type":"string"},{"name":"location","type":"string"}],"rows":[["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/zarttest1f000000-14b9-43b9-8836-3b8df81aa6f2/providers/Microsoft.StreamAnalytics/streamingjobs/zarttest28000000","southcentralus"],["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test/providers/Microsoft.Storage/storageAccounts/testsouthcentralus","southcentralus"],["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/newzarttest30000000-5d0c-432c-8652-102e3aa336b6/providers/Microsoft.Storage/storageAccounts/zarttest93000000","eastus"],["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/backup/providers/Microsoft.ClassicCompute/domainNames/rp-a","westcentralus"],["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test/providers/Microsoft.Storage/storageAccounts/test1","southcentralus"],["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/k8stest_centralus/providers/Microsoft.Compute/virtualMachines/aks-default-34000000-0/extensions/cse-agent-0","centralus"],["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/pere/providers/Microsoft.Network/networkSecurityGroups/shouldFail-nsg","eastus"],["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/newzarttestdd000000-bfc5-44f1-b6a9-aabdc7a1e614/providers/Microsoft.Storage/storageAccounts/zarttest43000000","eastus"],["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/newzarttest60000000-3713-4c51-9e6b-c96a30f0fbb7/providers/Microsoft.Storage/storageAccounts/zarttestd2000000","eastus"],["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ManageRG/providers/Microsoft.EventHub/namespaces/resourceuse","eastus"]]},"facets":[{"expression":"location","totalRecords":4,"count":4,"data":{"columns":[{"name":"location","type":"string"},{"name":"count","type":"integer"}],"rows":[["eastus",5],["southcentralus",3],["centralus",1],["westcentralus",1]]},"resultType":"FacetResult"},{"expression":"nonExistingColumn","errors":[{"code":"NoValidColumns","message":"No valid columns in facet expression."},{"code":"InvalidColumnNames","message":"Invalid diff --git a/azure-mgmt-resourcegraph/tests/recordings/test_mgmt_resourcegraph.test_resources_malformed_query.yaml b/azure-mgmt-resourcegraph/tests/recordings/test_mgmt_resourcegraph.test_resources_malformed_query.yaml index 135e7af84eeb..b632d683546e 100644 --- a/azure-mgmt-resourcegraph/tests/recordings/test_mgmt_resourcegraph.test_resources_malformed_query.yaml +++ b/azure-mgmt-resourcegraph/tests/recordings/test_mgmt_resourcegraph.test_resources_malformed_query.yaml @@ -12,7 +12,7 @@ interactions: msrest_azure/0.4.34 azure-mgmt-resourcegraph/0.6.0 Azure-SDK-For-Python] accept-language: [en-US] method: POST - uri: https://management.azure.com/providers/Microsoft.ResourceGraph/resources?api-version=2018-09-01-preview + uri: https://management.azure.com/providers/Microsoft.ResourceGraph/resources?api-version=2019-04-01 response: body: {string: "{\"error\":{\"code\":\"InvalidQuery\",\"message\":\"Query validation error\",\"details\":[{\"code\":\"ParserFailure\",\"message\":\"Parser failure\",\"line\":1,\"characterPositionInLine\":34,\"token\":\"\",\"expectedToken\":\"\u0178\"}]}}"} diff --git a/azure-mgmt-resourcegraph/tests/recordings/test_mgmt_resourcegraph.test_resources_query_options.yaml b/azure-mgmt-resourcegraph/tests/recordings/test_mgmt_resourcegraph.test_resources_query_options.yaml index 96d998889cc4..dce01e97eb35 100644 --- a/azure-mgmt-resourcegraph/tests/recordings/test_mgmt_resourcegraph.test_resources_query_options.yaml +++ b/azure-mgmt-resourcegraph/tests/recordings/test_mgmt_resourcegraph.test_resources_query_options.yaml @@ -13,7 +13,7 @@ interactions: msrest_azure/0.4.34 azure-mgmt-resourcegraph/0.6.0 Azure-SDK-For-Python] accept-language: [en-US] method: POST - uri: https://management.azure.com/providers/Microsoft.ResourceGraph/resources?api-version=2018-09-01-preview + uri: https://management.azure.com/providers/Microsoft.ResourceGraph/resources?api-version=2019-04-01 response: body: {string: '{"totalRecords":743,"count":4,"data":{"columns":[{"name":"id","type":"string"}],"rows":[["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/backup/providers/Microsoft.ClassicCompute/domainNames/admin-a"],["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/backup/providers/Microsoft.ClassicCompute/domainNames/admin-b"],["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/backup/providers/Microsoft.Network/trafficmanagerprofiles/admin"],["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/RP/providers/Microsoft.ClassicCompute/domainNames/rp-a"]]},"facets":[],"resultTruncated":"false","$skipToken":"ceXHDV/5yajn1stYtSCyQ32ULLF0jGv9oazG14qvdgwdAQNDUPHjt6MIlJZ2Y/K8z7fb+qo9wguegf8QYW0c7rqwtXUghJvKkPBENcn1O17nQxtjXeq6s8sD64D8t5P9NIHntl70D95yuVUjHF6/dsvVK33wKyvORwPTCbZrSj+pfz2yd5spa93izzOu06PcyFvcvCJAzZ5scImnVDqS700hR63izVwyETJtQluoqSPYkhxAOVk/+ThWlN0DKy9OfUE34M9PZSQz2QTWXKpUK1+okRfH/B2RVdXro60ZnNMrdPtglA5w7oEs5Ivq20IE4RtPfg97UEbkfyMP9huC="}'} headers: