Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
40 changes: 40 additions & 0 deletions azure-servicefabric/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,46 @@
Release History
===============

6.2.0.0 (2018-05-10)
++++++++++++++++++++

**General Breaking changes**

This version uses a next-generation code generator that *might* introduce breaking changes.

- Model signatures now use only keyword-argument syntax. All positional arguments must be re-written as keyword-arguments.
To keep auto-completion in most cases, models are now generated for Python 2 and Python 3. Python 3 uses the "*" syntax for keyword-only arguments.
- Enum types now use the "str" mixin (class AzureEnum(str, Enum)) to improve the behavior when unrecognized enum values are encountered.
While this is not a breaking change, the distinctions are important, and are documented here:
https://docs.python.org/3/library/enum.html#others
At a glance:

- "is" should not be used at all.
- "format" will return the string value, where "%s" string formatting will return `NameOfEnum.stringvalue`. Format syntax should be prefered.

- New Long Running Operation:

- Return type changes from `msrestazure.azure_operation.AzureOperationPoller` to `msrest.polling.LROPoller`. External API is the same.
- Return type is now **always** a `msrest.polling.LROPoller`, regardless of the optional parameters used.
- The behavior has changed when using `raw=True`. Instead of returning the initial call result as `ClientRawResponse`,
without polling, now this returns an LROPoller. After polling, the final resource will be returned as a `ClientRawResponse`.
- New `polling` parameter. The default behavior is `Polling=True` which will poll using ARM algorithm. When `Polling=False`,
the response of the initial call will be returned without polling.
- `polling` parameter accepts instances of subclasses of `msrest.polling.PollingMethod`.
- `add_done_callback` will no longer raise if called after polling is finished, but will instead execute the callback right away.

**Bugfixes**

- Numerous fixes to descriptions and help text of entities
- Compatibility of the sdist with wheel 0.31.0

**Features**

- Add support for invoking container APIs
- Add option to fetch container logs from exited containers
- Query to get chaos events now supports specification to limit number of returned items
- Client class can be used as a context manager to keep the underlying HTTP session open for performance

6.1.2.9 (2018-02-05)
++++++++++++++++++++

Expand Down
1,315 changes: 998 additions & 317 deletions azure-servicefabric/azure/servicefabric/models/__init__.py

Large diffs are not rendered by default.

16 changes: 8 additions & 8 deletions azure-servicefabric/azure/servicefabric/models/aad_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ class AadMetadata(Model):
'tenant': {'key': 'tenant', 'type': 'str'},
}

def __init__(self, authority=None, client=None, cluster=None, login=None, redirect=None, tenant=None):
super(AadMetadata, self).__init__()
self.authority = authority
self.client = client
self.cluster = cluster
self.login = login
self.redirect = redirect
self.tenant = tenant
def __init__(self, **kwargs):
super(AadMetadata, self).__init__(**kwargs)
self.authority = kwargs.get('authority', None)
self.client = kwargs.get('client', None)
self.cluster = kwargs.get('cluster', None)
self.login = kwargs.get('login', None)
self.redirect = kwargs.get('redirect', None)
self.tenant = kwargs.get('tenant', None)
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class AadMetadataObject(Model):
'metadata': {'key': 'metadata', 'type': 'AadMetadata'},
}

def __init__(self, type=None, metadata=None):
super(AadMetadataObject, self).__init__()
self.type = type
self.metadata = metadata
def __init__(self, **kwargs):
super(AadMetadataObject, self).__init__(**kwargs)
self.type = kwargs.get('type', None)
self.metadata = kwargs.get('metadata', None)
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# 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.serialization import Model


class AadMetadataObject(Model):
"""Azure Active Directory metadata object used for secured connection to
cluster.

:param type: The client authentication method.
:type type: str
:param metadata: Azure Active Directory metadata used for secured
connection to cluster.
:type metadata: ~azure.servicefabric.models.AadMetadata
"""

_attribute_map = {
'type': {'key': 'type', 'type': 'str'},
'metadata': {'key': 'metadata', 'type': 'AadMetadata'},
}

def __init__(self, *, type: str=None, metadata=None, **kwargs) -> None:
super(AadMetadataObject, self).__init__(**kwargs)
self.type = type
self.metadata = metadata
48 changes: 48 additions & 0 deletions azure-servicefabric/azure/servicefabric/models/aad_metadata_py3.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# 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.serialization import Model


class AadMetadata(Model):
"""Azure Active Directory metadata used for secured connection to cluster.

:param authority: The AAD authority url.
:type authority: str
:param client: The AAD client application Id.
:type client: str
:param cluster: The AAD cluster application Id.
:type cluster: str
:param login: The AAD login url.
:type login: str
:param redirect: The client application redirect address.
:type redirect: str
:param tenant: The AAD tenant Id.
:type tenant: str
"""

_attribute_map = {
'authority': {'key': 'authority', 'type': 'str'},
'client': {'key': 'client', 'type': 'str'},
'cluster': {'key': 'cluster', 'type': 'str'},
'login': {'key': 'login', 'type': 'str'},
'redirect': {'key': 'redirect', 'type': 'str'},
'tenant': {'key': 'tenant', 'type': 'str'},
}

def __init__(self, *, authority: str=None, client: str=None, cluster: str=None, login: str=None, redirect: str=None, tenant: str=None, **kwargs) -> None:
super(AadMetadata, self).__init__(**kwargs)
self.authority = authority
self.client = client
self.cluster = cluster
self.login = login
self.redirect = redirect
self.tenant = tenant
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# 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 .scaling_mechanism_description import ScalingMechanismDescription


class AddRemoveIncrementalNamedPartitionScalingMechanism(ScalingMechanismDescription):
"""Represents a scaling mechanism for adding or removing named partitions of a
stateless service. Partition names are in the format '0','1''N-1'.

All required parameters must be populated in order to send to Azure.

:param kind: Required. Constant filled by server.
:type kind: str
:param min_partition_count: Required. Minimum number of named partitions
of the service.
:type min_partition_count: int
:param max_partition_count: Required. Maximum number of named partitions
of the service.
:type max_partition_count: int
:param scale_increment: Required. The number of instances to add or remove
during a scaling operation.
:type scale_increment: int
"""

_validation = {
'kind': {'required': True},
'min_partition_count': {'required': True},
'max_partition_count': {'required': True},
'scale_increment': {'required': True},
}

_attribute_map = {
'kind': {'key': 'Kind', 'type': 'str'},
'min_partition_count': {'key': 'MinPartitionCount', 'type': 'int'},
'max_partition_count': {'key': 'MaxPartitionCount', 'type': 'int'},
'scale_increment': {'key': 'ScaleIncrement', 'type': 'int'},
}

def __init__(self, **kwargs):
super(AddRemoveIncrementalNamedPartitionScalingMechanism, self).__init__(**kwargs)
self.min_partition_count = kwargs.get('min_partition_count', None)
self.max_partition_count = kwargs.get('max_partition_count', None)
self.scale_increment = kwargs.get('scale_increment', None)
self.kind = 'AddRemoveIncrementalNamedPartition'
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# 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 .scaling_mechanism_description_py3 import ScalingMechanismDescription


class AddRemoveIncrementalNamedPartitionScalingMechanism(ScalingMechanismDescription):
"""Represents a scaling mechanism for adding or removing named partitions of a
stateless service. Partition names are in the format '0','1''N-1'.

All required parameters must be populated in order to send to Azure.

:param kind: Required. Constant filled by server.
:type kind: str
:param min_partition_count: Required. Minimum number of named partitions
of the service.
:type min_partition_count: int
:param max_partition_count: Required. Maximum number of named partitions
of the service.
:type max_partition_count: int
:param scale_increment: Required. The number of instances to add or remove
during a scaling operation.
:type scale_increment: int
"""

_validation = {
'kind': {'required': True},
'min_partition_count': {'required': True},
'max_partition_count': {'required': True},
'scale_increment': {'required': True},
}

_attribute_map = {
'kind': {'key': 'Kind', 'type': 'str'},
'min_partition_count': {'key': 'MinPartitionCount', 'type': 'int'},
'max_partition_count': {'key': 'MaxPartitionCount', 'type': 'int'},
'scale_increment': {'key': 'ScaleIncrement', 'type': 'int'},
}

def __init__(self, *, min_partition_count: int, max_partition_count: int, scale_increment: int, **kwargs) -> None:
super(AddRemoveIncrementalNamedPartitionScalingMechanism, self).__init__(**kwargs)
self.min_partition_count = min_partition_count
self.max_partition_count = max_partition_count
self.scale_increment = scale_increment
self.kind = 'AddRemoveIncrementalNamedPartition'
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# 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.serialization import Model


class AnalysisEventMetadata(Model):
"""Metadata about an Analysis Event.

:param delay: The analysis delay.
:type delay: timedelta
:param duration: The duration of analysis.
:type duration: timedelta
"""

_attribute_map = {
'delay': {'key': 'Delay', 'type': 'duration'},
'duration': {'key': 'Duration', 'type': 'duration'},
}

def __init__(self, **kwargs):
super(AnalysisEventMetadata, self).__init__(**kwargs)
self.delay = kwargs.get('delay', None)
self.duration = kwargs.get('duration', None)
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# 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.serialization import Model


class AnalysisEventMetadata(Model):
"""Metadata about an Analysis Event.

:param delay: The analysis delay.
:type delay: timedelta
:param duration: The duration of analysis.
:type duration: timedelta
"""

_attribute_map = {
'delay': {'key': 'Delay', 'type': 'duration'},
'duration': {'key': 'Duration', 'type': 'duration'},
}

def __init__(self, *, delay=None, duration=None, **kwargs) -> None:
super(AnalysisEventMetadata, self).__init__(**kwargs)
self.delay = delay
self.duration = duration
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# 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 .backup_configuration_info import BackupConfigurationInfo


class ApplicationBackupConfigurationInfo(BackupConfigurationInfo):
"""Backup configuration information for a specific Service Fabric application
specifying what backup policy is being applied and suspend description, if
any.

All required parameters must be populated in order to send to Azure.

:param policy_name: The name of the backup policy which is applicable to
this Service Fabric application or service or partition.
:type policy_name: str
:param policy_inherited_from: Specifies the scope at which the backup
policy is applied. Possible values include: 'Invalid', 'Partition',
'Service', 'Application'
:type policy_inherited_from: str or
~azure.servicefabric.models.BackupPolicyScope
:param suspension_info: Describes the backup suspension details.
:type suspension_info: ~azure.servicefabric.models.BackupSuspensionInfo
:param kind: Required. Constant filled by server.
:type kind: str
:param application_name: The name of the application, including the
'fabric:' URI scheme.
:type application_name: str
"""

_validation = {
'kind': {'required': True},
}

_attribute_map = {
'policy_name': {'key': 'PolicyName', 'type': 'str'},
'policy_inherited_from': {'key': 'PolicyInheritedFrom', 'type': 'str'},
'suspension_info': {'key': 'SuspensionInfo', 'type': 'BackupSuspensionInfo'},
'kind': {'key': 'Kind', 'type': 'str'},
'application_name': {'key': 'ApplicationName', 'type': 'str'},
}

def __init__(self, **kwargs):
super(ApplicationBackupConfigurationInfo, self).__init__(**kwargs)
self.application_name = kwargs.get('application_name', None)
self.kind = 'Application'
Loading