Skip to content

Commit

Permalink
[AutoPR] reservations/resource-manager (Azure#6861)
Browse files Browse the repository at this point in the history
* 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
AutorestCI authored and rakshith91 committed Sep 9, 2019
1 parent d61bf1b commit af7e601
Show file tree
Hide file tree
Showing 70 changed files with 2,476 additions and 2,486 deletions.
33 changes: 33 additions & 0 deletions sdk/reservations/azure-mgmt-reservations/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,39 @@
Release History
===============

0.4.0 (2019-09-09)
++++++++++++++++++

**Features**

- Model ReservationProperties has a new parameter term
- Model ReservationProperties has a new parameter renew_properties
- Model ReservationProperties has a new parameter renew_source
- Model ReservationProperties has a new parameter billing_scope_id
- Model ReservationProperties has a new parameter renew
- Model ReservationProperties has a new parameter renew_destination
- Model Patch has a new parameter renew_properties
- Model Patch has a new parameter renew
- Model PurchaseRequest has a new parameter renew
- Added operation ReservationOperations.available_scopes
- Added operation group AzureReservationAPIOperationsMixin

**Breaking changes**

- Operation ReservationOperations.get has a new signature

**General breaking changes**

This version uses a next-generation code generator that *might* introduce breaking changes if from some import.
In summary, some modules were incorrectly visible/importable and have been renamed. This fixed several issues caused by usage of classes that were not supposed to be used in the first place.

- AzureReservationAPI cannot be imported from `azure.mgmt.reservations.azure_reservation_api` anymore (import from `azure.mgmt.reservations` works like before)
- AzureReservationAPIConfiguration import has been moved from `azure.mgmt.reservations.azure_reservation_api` to `azure.mgmt.reservations`
- A model `MyClass` from a "models" sub-module cannot be imported anymore using `azure.mgmt.reservations.models.my_class` (import from `azure.mgmt.reservations.models` works like before)
- An operation class `MyClassOperations` from an `operations` sub-module cannot be imported anymore using `azure.mgmt.reservations.operations.my_class_operations` (import from `azure.mgmt.reservations.operations` works like before)

Last but not least, HTTP connection pooling is now enabled by default. You should always use a client as a context manager, or call close(), or use no more than one client per process.

0.3.2 (2019-04-18)
++++++++++++++++++

Expand Down
2 changes: 1 addition & 1 deletion sdk/reservations/azure-mgmt-reservations/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ This is the Microsoft Azure Reservations Client Library.
Azure Resource Manager (ARM) is the next generation of management APIs that
replace the old Azure Service Management (ASM).

This package has been tested with Python 2.7, 3.4, 3.5, 3.6 and 3.7.
This package has been tested with Python 2.7, 3.5, 3.6 and 3.7.

For the older Azure Service Management (ASM) libraries, see
`azure-servicemanagement-legacy <https://pypi.python.org/pypi/azure-servicemanagement-legacy>`__ library.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,11 @@
# regenerated.
# --------------------------------------------------------------------------

from .azure_reservation_api import AzureReservationAPI
from .version import VERSION
from ._configuration import AzureReservationAPIConfiguration
from ._azure_reservation_api import AzureReservationAPI
__all__ = ['AzureReservationAPI', 'AzureReservationAPIConfiguration']

__all__ = ['AzureReservationAPI']
from .version import VERSION

__version__ = VERSION

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)
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
Original file line number Diff line number Diff line change
Expand Up @@ -10,61 +10,75 @@
# --------------------------------------------------------------------------

try:
from .sku_name_py3 import SkuName
from .sku_property_py3 import SkuProperty
from .sku_restriction_py3 import SkuRestriction
from .catalog_py3 import Catalog
from .extended_status_info_py3 import ExtendedStatusInfo
from .reservation_split_properties_py3 import ReservationSplitProperties
from .reservation_merge_properties_py3 import ReservationMergeProperties
from .reservation_properties_py3 import ReservationProperties
from .reservation_response_py3 import ReservationResponse
from .reservation_order_response_py3 import ReservationOrderResponse
from .calculate_price_response_properties_billing_currency_total_py3 import CalculatePriceResponsePropertiesBillingCurrencyTotal
from .calculate_price_response_properties_pricing_currency_total_py3 import CalculatePriceResponsePropertiesPricingCurrencyTotal
from .calculate_price_response_properties_py3 import CalculatePriceResponseProperties
from .calculate_price_response_py3 import CalculatePriceResponse
from .purchase_request_properties_reserved_resource_properties_py3 import PurchaseRequestPropertiesReservedResourceProperties
from .merge_request_py3 import MergeRequest
from .purchase_request_py3 import PurchaseRequest
from .patch_py3 import Patch
from .split_request_py3 import SplitRequest
from .extended_error_info_py3 import ExtendedErrorInfo
from .error_py3 import Error, ErrorException
from .applied_reservation_list_py3 import AppliedReservationList
from .applied_reservations_py3 import AppliedReservations
from .operation_display_py3 import OperationDisplay
from .operation_response_py3 import OperationResponse
from ._models_py3 import AppliedReservationList
from ._models_py3 import AppliedReservations
from ._models_py3 import CalculatePriceResponse
from ._models_py3 import CalculatePriceResponseProperties
from ._models_py3 import CalculatePriceResponsePropertiesBillingCurrencyTotal
from ._models_py3 import CalculatePriceResponsePropertiesPricingCurrencyTotal
from ._models_py3 import Catalog
from ._models_py3 import Error, ErrorException
from ._models_py3 import ExtendedErrorInfo
from ._models_py3 import ExtendedStatusInfo
from ._models_py3 import MergeRequest
from ._models_py3 import OperationDisplay
from ._models_py3 import OperationResponse
from ._models_py3 import Patch
from ._models_py3 import PatchPropertiesRenewProperties
from ._models_py3 import Properties
from ._models_py3 import PurchaseRequest
from ._models_py3 import PurchaseRequestPropertiesReservedResourceProperties
from ._models_py3 import RenewPropertiesResponse
from ._models_py3 import RenewPropertiesResponseBillingCurrencyTotal
from ._models_py3 import RenewPropertiesResponsePricingCurrencyTotal
from ._models_py3 import ReservationMergeProperties
from ._models_py3 import ReservationOrderResponse
from ._models_py3 import ReservationProperties
from ._models_py3 import ReservationResponse
from ._models_py3 import ReservationSplitProperties
from ._models_py3 import ScopeProperties
from ._models_py3 import SkuName
from ._models_py3 import SkuProperty
from ._models_py3 import SkuRestriction
from ._models_py3 import SplitRequest
from ._models_py3 import SubscriptionScopeProperties
except (SyntaxError, ImportError):
from .sku_name import SkuName
from .sku_property import SkuProperty
from .sku_restriction import SkuRestriction
from .catalog import Catalog
from .extended_status_info import ExtendedStatusInfo
from .reservation_split_properties import ReservationSplitProperties
from .reservation_merge_properties import ReservationMergeProperties
from .reservation_properties import ReservationProperties
from .reservation_response import ReservationResponse
from .reservation_order_response import ReservationOrderResponse
from .calculate_price_response_properties_billing_currency_total import CalculatePriceResponsePropertiesBillingCurrencyTotal
from .calculate_price_response_properties_pricing_currency_total import CalculatePriceResponsePropertiesPricingCurrencyTotal
from .calculate_price_response_properties import CalculatePriceResponseProperties
from .calculate_price_response import CalculatePriceResponse
from .purchase_request_properties_reserved_resource_properties import PurchaseRequestPropertiesReservedResourceProperties
from .merge_request import MergeRequest
from .purchase_request import PurchaseRequest
from .patch import Patch
from .split_request import SplitRequest
from .extended_error_info import ExtendedErrorInfo
from .error import Error, ErrorException
from .applied_reservation_list import AppliedReservationList
from .applied_reservations import AppliedReservations
from .operation_display import OperationDisplay
from .operation_response import OperationResponse
from .reservation_order_response_paged import ReservationOrderResponsePaged
from .reservation_response_paged import ReservationResponsePaged
from .operation_response_paged import OperationResponsePaged
from .azure_reservation_api_enums import (
from ._models import AppliedReservationList
from ._models import AppliedReservations
from ._models import CalculatePriceResponse
from ._models import CalculatePriceResponseProperties
from ._models import CalculatePriceResponsePropertiesBillingCurrencyTotal
from ._models import CalculatePriceResponsePropertiesPricingCurrencyTotal
from ._models import Catalog
from ._models import Error, ErrorException
from ._models import ExtendedErrorInfo
from ._models import ExtendedStatusInfo
from ._models import MergeRequest
from ._models import OperationDisplay
from ._models import OperationResponse
from ._models import Patch
from ._models import PatchPropertiesRenewProperties
from ._models import Properties
from ._models import PurchaseRequest
from ._models import PurchaseRequestPropertiesReservedResourceProperties
from ._models import RenewPropertiesResponse
from ._models import RenewPropertiesResponseBillingCurrencyTotal
from ._models import RenewPropertiesResponsePricingCurrencyTotal
from ._models import ReservationMergeProperties
from ._models import ReservationOrderResponse
from ._models import ReservationProperties
from ._models import ReservationResponse
from ._models import ReservationSplitProperties
from ._models import ScopeProperties
from ._models import SkuName
from ._models import SkuProperty
from ._models import SkuRestriction
from ._models import SplitRequest
from ._models import SubscriptionScopeProperties
from ._paged_models import OperationResponsePaged
from ._paged_models import ReservationOrderResponsePaged
from ._paged_models import ReservationResponsePaged
from ._azure_reservation_api_enums import (
ReservationStatusCode,
ErrorResponseCode,
ReservationTerm,
Expand All @@ -74,33 +88,40 @@
)

__all__ = [
'SkuName',
'SkuProperty',
'SkuRestriction',
'AppliedReservationList',
'AppliedReservations',
'CalculatePriceResponse',
'CalculatePriceResponseProperties',
'CalculatePriceResponsePropertiesBillingCurrencyTotal',
'CalculatePriceResponsePropertiesPricingCurrencyTotal',
'Catalog',
'Error', 'ErrorException',
'ExtendedErrorInfo',
'ExtendedStatusInfo',
'ReservationSplitProperties',
'MergeRequest',
'OperationDisplay',
'OperationResponse',
'Patch',
'PatchPropertiesRenewProperties',
'Properties',
'PurchaseRequest',
'PurchaseRequestPropertiesReservedResourceProperties',
'RenewPropertiesResponse',
'RenewPropertiesResponseBillingCurrencyTotal',
'RenewPropertiesResponsePricingCurrencyTotal',
'ReservationMergeProperties',
'ReservationOrderResponse',
'ReservationProperties',
'ReservationResponse',
'ReservationOrderResponse',
'CalculatePriceResponsePropertiesBillingCurrencyTotal',
'CalculatePriceResponsePropertiesPricingCurrencyTotal',
'CalculatePriceResponseProperties',
'CalculatePriceResponse',
'PurchaseRequestPropertiesReservedResourceProperties',
'MergeRequest',
'PurchaseRequest',
'Patch',
'ReservationSplitProperties',
'ScopeProperties',
'SkuName',
'SkuProperty',
'SkuRestriction',
'SplitRequest',
'ExtendedErrorInfo',
'Error', 'ErrorException',
'AppliedReservationList',
'AppliedReservations',
'OperationDisplay',
'OperationResponse',
'ReservationOrderResponsePaged',
'SubscriptionScopeProperties',
'ReservationResponsePaged',
'ReservationOrderResponsePaged',
'OperationResponsePaged',
'ReservationStatusCode',
'ErrorResponseCode',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,10 @@ class ReservedResourceType(str, Enum):
sql_databases = "SqlDatabases"
suse_linux = "SuseLinux"
cosmos_db = "CosmosDb"
red_hat = "RedHat"
sql_data_warehouse = "SqlDataWarehouse"
vmware_cloud_simple = "VMwareCloudSimple"
red_hat_osa = "RedHatOsa"


class InstanceFlexibility(str, Enum):
Expand Down
Loading

0 comments on commit af7e601

Please sign in to comment.