Skip to content

Commit 83e33b4

Browse files
AutorestCIlmazuel
authored andcommitted
[AutoPR] resourcegraph/resource-manager (Azure#3744)
* [AutoPR resourcegraph/resource-manager] Add facet sortBy and filter to ResourceGraph swagger (Azure#3738) * Generated from dd213453f196443a8edde7b8458c186441a1dc52 Add facet sortBy and filter to ResourceGraph swagger * Packaging update of azure-mgmt-resourcegraph * [AutoPR resourcegraph/resource-manager] [Hub Generated] Review request for Microsoft.ResourceGraph to add version 2019-04-01 (Azure#4619) * Generated from 65ba1e622bf3e1d524713c38c322eea38b4b1af1 Updates API version in new specs and examples * Packaging update of azure-mgmt-resourcegraph * Fixing the test and incrementing version (Azure#4703) * Rebuild by Azure#3744 * updated versioning and changelog * Generated from 440a0b836938e77d182ced5a2678413f5fc24de1 (Azure#4719) add resourcegraph to Go SDK * Fixing the test and incrementing version * Update HISTORY.rst
1 parent 682885e commit 83e33b4

12 files changed

+42
-32
lines changed

azure-mgmt-resourcegraph/HISTORY.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@
33
Release History
44
===============
55

6+
1.0.0 (2019-03-28)
7+
++++++++++++++++++
8+
9+
* Increment the version to show it as GA version no change in the contract.
10+
611
0.1.0 (2018-09-07)
712
++++++++++++++++++
813

azure-mgmt-resourcegraph/MANIFEST.in

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
1+
recursive-include tests *.py *.yaml
12
include *.rst
3+
include azure/__init__.py
4+
include azure/mgmt/__init__.py
5+

azure-mgmt-resourcegraph/README.rst

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -14,25 +14,6 @@ For the older Azure Service Management (ASM) libraries, see
1414
For a more complete set of Azure libraries, see the `azure <https://pypi.python.org/pypi/azure>`__ bundle package.
1515

1616

17-
Compatibility
18-
=============
19-
20-
**IMPORTANT**: If you have an earlier version of the azure package
21-
(version < 1.0), you should uninstall it before installing this package.
22-
23-
You can check the version using pip:
24-
25-
.. code:: shell
26-
27-
pip freeze
28-
29-
If you see azure==0.11.0 (or any version below 1.0), uninstall it first:
30-
31-
.. code:: shell
32-
33-
pip uninstall azure
34-
35-
3617
Usage
3718
=====
3819

azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/models/facet_request_options.py

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,15 @@
1515
class FacetRequestOptions(Model):
1616
"""The options for facet evaluation.
1717
18-
:param sort_order: The sorting order by the hit count. Possible values
19-
include: 'asc', 'desc'. Default value: "desc" .
18+
:param sort_by: The column name or query expression to sort on. Defaults
19+
to count if not present.
20+
:type sort_by: str
21+
:param sort_order: The sorting order by the selected column (count by
22+
default). Possible values include: 'asc', 'desc'. Default value: "desc" .
2023
:type sort_order: str or ~azure.mgmt.resourcegraph.models.FacetSortOrder
24+
:param filter: Specifies the filter condition for the 'where' clause which
25+
will be run on main query's result, just before the actual faceting.
26+
:type filter: str
2127
:param top: The maximum number of facet rows that should be returned.
2228
:type top: int
2329
"""
@@ -27,11 +33,15 @@ class FacetRequestOptions(Model):
2733
}
2834

2935
_attribute_map = {
36+
'sort_by': {'key': 'sortBy', 'type': 'str'},
3037
'sort_order': {'key': 'sortOrder', 'type': 'FacetSortOrder'},
38+
'filter': {'key': 'filter', 'type': 'str'},
3139
'top': {'key': '$top', 'type': 'int'},
3240
}
3341

3442
def __init__(self, **kwargs):
3543
super(FacetRequestOptions, self).__init__(**kwargs)
44+
self.sort_by = kwargs.get('sort_by', None)
3645
self.sort_order = kwargs.get('sort_order', "desc")
46+
self.filter = kwargs.get('filter', None)
3747
self.top = kwargs.get('top', None)

azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/models/facet_request_options_py3.py

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,15 @@
1515
class FacetRequestOptions(Model):
1616
"""The options for facet evaluation.
1717
18-
:param sort_order: The sorting order by the hit count. Possible values
19-
include: 'asc', 'desc'. Default value: "desc" .
18+
:param sort_by: The column name or query expression to sort on. Defaults
19+
to count if not present.
20+
:type sort_by: str
21+
:param sort_order: The sorting order by the selected column (count by
22+
default). Possible values include: 'asc', 'desc'. Default value: "desc" .
2023
:type sort_order: str or ~azure.mgmt.resourcegraph.models.FacetSortOrder
24+
:param filter: Specifies the filter condition for the 'where' clause which
25+
will be run on main query's result, just before the actual faceting.
26+
:type filter: str
2127
:param top: The maximum number of facet rows that should be returned.
2228
:type top: int
2329
"""
@@ -27,11 +33,15 @@ class FacetRequestOptions(Model):
2733
}
2834

2935
_attribute_map = {
36+
'sort_by': {'key': 'sortBy', 'type': 'str'},
3037
'sort_order': {'key': 'sortOrder', 'type': 'FacetSortOrder'},
38+
'filter': {'key': 'filter', 'type': 'str'},
3139
'top': {'key': '$top', 'type': 'int'},
3240
}
3341

34-
def __init__(self, *, sort_order="desc", top: int=None, **kwargs) -> None:
42+
def __init__(self, *, sort_by: str=None, sort_order="desc", filter: str=None, top: int=None, **kwargs) -> None:
3543
super(FacetRequestOptions, self).__init__(**kwargs)
44+
self.sort_by = sort_by
3645
self.sort_order = sort_order
46+
self.filter = filter
3747
self.top = top

azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/operations/operations.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class Operations(object):
2323
:param config: Configuration of service client.
2424
:param serializer: An object model serializer.
2525
:param deserializer: An object model deserializer.
26-
:ivar api_version: API version. Constant value: "2018-09-01-preview".
26+
:ivar api_version: API version. Constant value: "2019-04-01".
2727
"""
2828

2929
models = models
@@ -33,7 +33,7 @@ def __init__(self, client, config, serializer, deserializer):
3333
self._client = client
3434
self._serialize = serializer
3535
self._deserialize = deserializer
36-
self.api_version = "2018-09-01-preview"
36+
self.api_version = "2019-04-01"
3737

3838
self.config = config
3939

azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/resource_graph_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ def __init__(
6969
super(ResourceGraphClient, self).__init__(self.config.credentials, self.config)
7070

7171
client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
72-
self.api_version = '2018-09-01-preview'
72+
self.api_version = '2019-04-01'
7373
self._serialize = Serializer(client_models)
7474
self._deserialize = Deserializer(client_models)
7575

azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@
99
# regenerated.
1010
# --------------------------------------------------------------------------
1111

12-
VERSION = "0.1.0"
12+
VERSION = "1.0.0"
1313

azure-mgmt-resourcegraph/tests/recordings/test_mgmt_resourcegraph.test_resources_basic_query.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ interactions:
1212
msrest_azure/0.4.34 azure-mgmt-resourcegraph/0.6.0 Azure-SDK-For-Python]
1313
accept-language: [en-US]
1414
method: POST
15-
uri: https://management.azure.com/providers/Microsoft.ResourceGraph/resources?api-version=2018-09-01-preview
15+
uri: https://management.azure.com/providers/Microsoft.ResourceGraph/resources?api-version=2019-04-01
1616
response:
1717
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"}'}
1818
headers:

azure-mgmt-resourcegraph/tests/recordings/test_mgmt_resourcegraph.test_resources_facet_query.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ interactions:
1414
msrest_azure/0.4.34 azure-mgmt-resourcegraph/0.6.0 Azure-SDK-For-Python]
1515
accept-language: [en-US]
1616
method: POST
17-
uri: https://management.azure.com/providers/Microsoft.ResourceGraph/resources?api-version=2018-09-01-preview
17+
uri: https://management.azure.com/providers/Microsoft.ResourceGraph/resources?api-version=2019-04-01
1818
response:
1919
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
2020
valid columns in facet expression."},{"code":"InvalidColumnNames","message":"Invalid

azure-mgmt-resourcegraph/tests/recordings/test_mgmt_resourcegraph.test_resources_malformed_query.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ interactions:
1212
msrest_azure/0.4.34 azure-mgmt-resourcegraph/0.6.0 Azure-SDK-For-Python]
1313
accept-language: [en-US]
1414
method: POST
15-
uri: https://management.azure.com/providers/Microsoft.ResourceGraph/resources?api-version=2018-09-01-preview
15+
uri: https://management.azure.com/providers/Microsoft.ResourceGraph/resources?api-version=2019-04-01
1616
response:
1717
body: {string: "{\"error\":{\"code\":\"InvalidQuery\",\"message\":\"Query validation
1818
error\",\"details\":[{\"code\":\"ParserFailure\",\"message\":\"Parser failure\",\"line\":1,\"characterPositionInLine\":34,\"token\":\"<EOF>\",\"expectedToken\":\"\u0178\"}]}}"}

azure-mgmt-resourcegraph/tests/recordings/test_mgmt_resourcegraph.test_resources_query_options.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ interactions:
1313
msrest_azure/0.4.34 azure-mgmt-resourcegraph/0.6.0 Azure-SDK-For-Python]
1414
accept-language: [en-US]
1515
method: POST
16-
uri: https://management.azure.com/providers/Microsoft.ResourceGraph/resources?api-version=2018-09-01-preview
16+
uri: https://management.azure.com/providers/Microsoft.ResourceGraph/resources?api-version=2019-04-01
1717
response:
1818
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="}'}
1919
headers:

0 commit comments

Comments
 (0)