forked from Azure/azure-sdk-for-python
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[AutoPR] reservations/resource-manager (Azure#6861)
* Generated from 631cc8ef9ba25eddb465ba207157ff92ab4fa641 (Azure#6302) Task 4855805: ARM swagger update from lockedPriceTotal to billingCurrencyTotal & pricingCurrencyTotal. * Packaging update of azure-mgmt-reservations * Generated from 9c61d69a19c13e40a8468ea21c909aa677ac4678 (Azure#6502) Task 4957070: ARM swagger update to include term in get reservation response. * [AutoPR reservations/resource-manager] [Hub Generated] Review request for Microsoft.Capacity to add version preview/2019-04-01 (Azure#6860) * Generated from ea7847bd3538ded2d30c5c436a3f9f0464637d90 update * Generated from ecb712b6e6535b86e9283f57a1a65d63c3cbb04a update * Generated from a65461546a2e2b7d3391cda3ecbe437938540d32 update * updated test * fix test * updated history and version
- Loading branch information
1 parent
d61bf1b
commit af7e601
Showing
70 changed files
with
2,476 additions
and
2,486 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
58 changes: 58 additions & 0 deletions
58
sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/_azure_reservation_api.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
# coding=utf-8 | ||
# -------------------------------------------------------------------------- | ||
# Copyright (c) Microsoft Corporation. All rights reserved. | ||
# Licensed under the MIT License. See License.txt in the project root for | ||
# license information. | ||
# | ||
# Code generated by Microsoft (R) AutoRest Code Generator. | ||
# Changes may cause incorrect behavior and will be lost if the code is | ||
# regenerated. | ||
# -------------------------------------------------------------------------- | ||
|
||
from msrest.service_client import SDKClient | ||
from msrest import Serializer, Deserializer | ||
|
||
from ._configuration import AzureReservationAPIConfiguration | ||
from .operations import AzureReservationAPIOperationsMixin | ||
from .operations import ReservationOperations | ||
from .operations import ReservationOrderOperations | ||
from .operations import OperationOperations | ||
from . import models | ||
|
||
|
||
class AzureReservationAPI(AzureReservationAPIOperationsMixin, SDKClient): | ||
"""This API describe Azure Reservation | ||
:ivar config: Configuration for client. | ||
:vartype config: AzureReservationAPIConfiguration | ||
:ivar reservation: Reservation operations | ||
:vartype reservation: azure.mgmt.reservations.operations.ReservationOperations | ||
:ivar reservation_order: ReservationOrder operations | ||
:vartype reservation_order: azure.mgmt.reservations.operations.ReservationOrderOperations | ||
:ivar operation: Operation operations | ||
:vartype operation: azure.mgmt.reservations.operations.OperationOperations | ||
:param credentials: Credentials needed for the client to connect to Azure. | ||
:type credentials: :mod:`A msrestazure Credentials | ||
object<msrestazure.azure_active_directory>` | ||
:param str base_url: Service URL | ||
""" | ||
|
||
def __init__( | ||
self, credentials, base_url=None): | ||
|
||
self.config = AzureReservationAPIConfiguration(credentials, base_url) | ||
super(AzureReservationAPI, 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 = '2019-04-01' | ||
self._serialize = Serializer(client_models) | ||
self._deserialize = Deserializer(client_models) | ||
|
||
self.reservation = ReservationOperations( | ||
self._client, self.config, self._serialize, self._deserialize) | ||
self.reservation_order = ReservationOrderOperations( | ||
self._client, self.config, self._serialize, self._deserialize) | ||
self.operation = OperationOperations( | ||
self._client, self.config, self._serialize, self._deserialize) |
43 changes: 43 additions & 0 deletions
43
sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/_configuration.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# coding=utf-8 | ||
# -------------------------------------------------------------------------- | ||
# Copyright (c) Microsoft Corporation. All rights reserved. | ||
# Licensed under the MIT License. See License.txt in the project root for | ||
# license information. | ||
# | ||
# Code generated by Microsoft (R) AutoRest Code Generator. | ||
# Changes may cause incorrect behavior and will be lost if the code is | ||
# regenerated. | ||
# -------------------------------------------------------------------------- | ||
from msrestazure import AzureConfiguration | ||
|
||
from .version import VERSION | ||
|
||
|
||
class AzureReservationAPIConfiguration(AzureConfiguration): | ||
"""Configuration for AzureReservationAPI | ||
Note that all parameters used to create this instance are saved as instance | ||
attributes. | ||
:param credentials: Credentials needed for the client to connect to Azure. | ||
:type credentials: :mod:`A msrestazure Credentials | ||
object<msrestazure.azure_active_directory>` | ||
:param str base_url: Service URL | ||
""" | ||
|
||
def __init__( | ||
self, credentials, base_url=None): | ||
|
||
if credentials is None: | ||
raise ValueError("Parameter 'credentials' must not be None.") | ||
if not base_url: | ||
base_url = 'https://management.azure.com' | ||
|
||
super(AzureReservationAPIConfiguration, self).__init__(base_url) | ||
|
||
# Starting Autorest.Python 4.0.64, make connection pool activated by default | ||
self.keep_alive = True | ||
|
||
self.add_user_agent('azure-mgmt-reservations/{}'.format(VERSION)) | ||
self.add_user_agent('Azure-SDK-For-Python') | ||
|
||
self.credentials = credentials |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.