Skip to content

Commit

Permalink
【T1】 azurestackhci (#14495)
Browse files Browse the repository at this point in the history
* Generated from c80a4d2c529a04e64d7340010447f466ab4fa09e

* version,CHANGELOG

Co-authored-by: SDK Automation <[email protected]>
  • Loading branch information
msyyc and SDK Automation authored Oct 15, 2020
1 parent d430f6d commit d643def
Show file tree
Hide file tree
Showing 11 changed files with 164 additions and 121 deletions.
13 changes: 13 additions & 0 deletions sdk/azurestackhci/azure-mgmt-azurestackhci/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# Release History

## 1.0.0 (2020-10-14)

**Features**

- Model Cluster has a new parameter last_billing_timestamp
- Model Cluster has a new parameter registration_timestamp
- Model Cluster has a new parameter last_sync_timestamp
- Added operation ClustersOperations.list_by_subscription

**Breaking changes**

- Removed operation ClustersOperations.list

## 1.0.0rc (2020-07-22)

* Initial Release
6 changes: 3 additions & 3 deletions sdk/azurestackhci/azure-mgmt-azurestackhci/README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# Microsoft Azure SDK for Python

This is the Microsoft Azure MyService Management Client Library.
This is the Microsoft Azure AzureStackHCI Management Client Library.
This package has been tested with Python 2.7, 3.5, 3.6, 3.7 and 3.8.
For a more complete view of Azure libraries, see the [Github repo](https://github.com/Azure/azure-sdk-for-python/)
For a more complete view of Azure libraries, see the [azure sdk python release](https://aka.ms/azsdk/python/all).


# Usage

For code examples, see [MyService Management](https://docs.microsoft.com/python/api/overview/azure/)
For code examples, see [AzureStackHCI Management](https://docs.microsoft.com/python/api/overview/azure/)
on docs.microsoft.com.


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def __init__(
super(AzureStackHCIClient, 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 = '2020-03-01-preview'
self.api_version = '2020-10-01'
self._serialize = Serializer(client_models)
self._deserialize = Deserializer(client_models)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
# --------------------------------------------------------------------------

try:
from ._models_py3 import AvailableOperations
from ._models_py3 import AzureEntityResource
from ._models_py3 import Cluster
from ._models_py3 import ClusterNode
Expand All @@ -18,13 +19,13 @@
from ._models_py3 import ErrorAdditionalInfo
from ._models_py3 import ErrorResponse, ErrorResponseException
from ._models_py3 import ErrorResponseError
from ._models_py3 import Operation
from ._models_py3 import OperationDetail
from ._models_py3 import OperationDisplay
from ._models_py3 import OperationList
from ._models_py3 import ProxyResource
from ._models_py3 import Resource
from ._models_py3 import TrackedResource
except (SyntaxError, ImportError):
from ._models import AvailableOperations
from ._models import AzureEntityResource
from ._models import Cluster
from ._models import ClusterNode
Expand All @@ -33,9 +34,8 @@
from ._models import ErrorAdditionalInfo
from ._models import ErrorResponse, ErrorResponseException
from ._models import ErrorResponseError
from ._models import Operation
from ._models import OperationDetail
from ._models import OperationDisplay
from ._models import OperationList
from ._models import ProxyResource
from ._models import Resource
from ._models import TrackedResource
Expand All @@ -46,6 +46,7 @@
)

__all__ = [
'AvailableOperations',
'AzureEntityResource',
'Cluster',
'ClusterNode',
Expand All @@ -54,9 +55,8 @@
'ErrorAdditionalInfo',
'ErrorResponse', 'ErrorResponseException',
'ErrorResponseError',
'Operation',
'OperationDetail',
'OperationDisplay',
'OperationList',
'ProxyResource',
'Resource',
'TrackedResource',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ class ProvisioningState(str, Enum):

class Status(str, Enum):

never_connected = "NeverConnected"
not_yet_registered = "NotYetRegistered"
connected_recently = "ConnectedRecently"
not_connected_recently = "NotConnectedRecently"
expired = "Expired"
disconnected = "Disconnected"
error = "Error"
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,28 @@
from msrest.exceptions import HttpOperationError


class AvailableOperations(Model):
"""Available operations of the service.
:param value: Collection of available operation details
:type value: list[~azure.mgmt.azurestackhci.models.OperationDetail]
:param next_link: URL client should use to fetch the next page (per server
side paging).
It's null for now, added for future use.
:type next_link: str
"""

_attribute_map = {
'value': {'key': 'value', 'type': '[OperationDetail]'},
'next_link': {'key': 'nextLink', 'type': 'str'},
}

def __init__(self, **kwargs):
super(AvailableOperations, self).__init__(**kwargs)
self.value = kwargs.get('value', None)
self.next_link = kwargs.get('next_link', None)


class Resource(Model):
"""Resource.
Expand Down Expand Up @@ -162,8 +184,8 @@ class Cluster(TrackedResource):
:vartype provisioning_state: str or
~azure.mgmt.azurestackhci.models.ProvisioningState
:ivar status: Status of the cluster agent. Possible values include:
'NeverConnected', 'ConnectedRecently', 'NotConnectedRecently', 'Expired',
'Error'
'NotYetRegistered', 'ConnectedRecently', 'NotConnectedRecently',
'Disconnected', 'Error'
:vartype status: str or ~azure.mgmt.azurestackhci.models.Status
:ivar cloud_id: Unique, immutable resource id.
:vartype cloud_id: str
Expand All @@ -178,6 +200,12 @@ class Cluster(TrackedResource):
:vartype trial_days_remaining: float
:ivar billing_model: Type of billing applied to the resource.
:vartype billing_model: str
:ivar registration_timestamp: First cluster sync timestamp.
:vartype registration_timestamp: datetime
:ivar last_sync_timestamp: Most recent cluster sync timestamp.
:vartype last_sync_timestamp: datetime
:ivar last_billing_timestamp: Most recent billing meter timestamp.
:vartype last_billing_timestamp: datetime
"""

_validation = {
Expand All @@ -192,6 +220,9 @@ class Cluster(TrackedResource):
'aad_tenant_id': {'required': True},
'trial_days_remaining': {'readonly': True},
'billing_model': {'readonly': True},
'registration_timestamp': {'readonly': True},
'last_sync_timestamp': {'readonly': True},
'last_billing_timestamp': {'readonly': True},
}

_attribute_map = {
Expand All @@ -208,6 +239,9 @@ class Cluster(TrackedResource):
'reported_properties': {'key': 'properties.reportedProperties', 'type': 'ClusterReportedProperties'},
'trial_days_remaining': {'key': 'properties.trialDaysRemaining', 'type': 'float'},
'billing_model': {'key': 'properties.billingModel', 'type': 'str'},
'registration_timestamp': {'key': 'properties.registrationTimestamp', 'type': 'iso-8601'},
'last_sync_timestamp': {'key': 'properties.lastSyncTimestamp', 'type': 'iso-8601'},
'last_billing_timestamp': {'key': 'properties.lastBillingTimestamp', 'type': 'iso-8601'},
}

def __init__(self, **kwargs):
Expand All @@ -220,6 +254,9 @@ def __init__(self, **kwargs):
self.reported_properties = kwargs.get('reported_properties', None)
self.trial_days_remaining = None
self.billing_model = None
self.registration_timestamp = None
self.last_sync_timestamp = None
self.last_billing_timestamp = None


class ClusterNode(Model):
Expand Down Expand Up @@ -446,43 +483,48 @@ def __init__(self, **kwargs):
self.additional_info = None


class Operation(Model):
"""Operation details.
class OperationDetail(Model):
"""Operation detail payload.
Variables are only populated by the server, and will be ignored when
sending a request.
:ivar name: Name of the operation.
:vartype name: str
:param display: Operation properties.
:param name: Name of the operation
:type name: str
:param is_data_action: Indicates whether the operation is a data action
:type is_data_action: bool
:param display: Display of the operation
:type display: ~azure.mgmt.azurestackhci.models.OperationDisplay
:param origin: Origin of the operation
:type origin: str
:param properties: Properties of the operation
:type properties: object
"""

_validation = {
'name': {'readonly': True},
}

_attribute_map = {
'name': {'key': 'name', 'type': 'str'},
'is_data_action': {'key': 'isDataAction', 'type': 'bool'},
'display': {'key': 'display', 'type': 'OperationDisplay'},
'origin': {'key': 'origin', 'type': 'str'},
'properties': {'key': 'properties', 'type': 'object'},
}

def __init__(self, **kwargs):
super(Operation, self).__init__(**kwargs)
self.name = None
super(OperationDetail, self).__init__(**kwargs)
self.name = kwargs.get('name', None)
self.is_data_action = kwargs.get('is_data_action', None)
self.display = kwargs.get('display', None)
self.origin = kwargs.get('origin', None)
self.properties = kwargs.get('properties', None)


class OperationDisplay(Model):
"""Operation properties.
"""Operation display payload.
:param provider: Resource provider name.
:param provider: Resource provider of the operation
:type provider: str
:param resource: Resource type name.
:param resource: Resource of the operation
:type resource: str
:param operation: Operation name.
:param operation: Localized friendly name for the operation
:type operation: str
:param description: Operation description.
:param description: Localized friendly description for the operation
:type description: str
"""

Expand All @@ -501,33 +543,6 @@ def __init__(self, **kwargs):
self.description = kwargs.get('description', None)


class OperationList(Model):
"""List of available operations.
Variables are only populated by the server, and will be ignored when
sending a request.
:param value: List of operations.
:type value: list[~azure.mgmt.azurestackhci.models.Operation]
:ivar next_link: Link to the next set of results.
:vartype next_link: str
"""

_validation = {
'next_link': {'readonly': True},
}

_attribute_map = {
'value': {'key': 'value', 'type': '[Operation]'},
'next_link': {'key': 'nextLink', 'type': 'str'},
}

def __init__(self, **kwargs):
super(OperationList, self).__init__(**kwargs)
self.value = kwargs.get('value', None)
self.next_link = None


class ProxyResource(Resource):
"""The resource model definition for a ARM proxy resource. It will have
everything other than required location and tags.
Expand Down
Loading

0 comments on commit d643def

Please sign in to comment.