diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/README.md b/sdk/azurestackhci/azure-mgmt-azurestackhci/README.md index a93a8bc9122c..a788fc5f5459 100644 --- a/sdk/azurestackhci/azure-mgmt-azurestackhci/README.md +++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/README.md @@ -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. diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/models/__init__.py b/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/models/__init__.py index 45b15835e572..c24370108122 100644 --- a/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/models/__init__.py +++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/models/__init__.py @@ -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 @@ -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 @@ -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 @@ -46,6 +46,7 @@ ) __all__ = [ + 'AvailableOperations', 'AzureEntityResource', 'Cluster', 'ClusterNode', @@ -54,9 +55,8 @@ 'ErrorAdditionalInfo', 'ErrorResponse', 'ErrorResponseException', 'ErrorResponseError', - 'Operation', + 'OperationDetail', 'OperationDisplay', - 'OperationList', 'ProxyResource', 'Resource', 'TrackedResource', diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/models/_azure_stack_hci_client_enums.py b/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/models/_azure_stack_hci_client_enums.py index 7065ec13cbe7..da6420f80c8b 100644 --- a/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/models/_azure_stack_hci_client_enums.py +++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/models/_azure_stack_hci_client_enums.py @@ -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" diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/models/_models.py b/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/models/_models.py index 2ad32218af17..dca6a7e94a41 100644 --- a/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/models/_models.py +++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/models/_models.py @@ -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. @@ -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 @@ -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 = { @@ -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 = { @@ -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): @@ -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): @@ -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 """ @@ -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. diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/models/_models_py3.py b/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/models/_models_py3.py index 3eab83ff9608..820ba3edcd50 100644 --- a/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/models/_models_py3.py +++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/models/_models_py3.py @@ -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, *, value=None, next_link: str=None, **kwargs) -> None: + super(AvailableOperations, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + class Resource(Model): """Resource. @@ -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 @@ -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 = { @@ -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 = { @@ -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, *, location: str, aad_client_id: str, aad_tenant_id: str, tags=None, reported_properties=None, **kwargs) -> None: @@ -220,6 +254,9 @@ def __init__(self, *, location: str, aad_client_id: str, aad_tenant_id: str, tag self.reported_properties = reported_properties 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): @@ -446,43 +483,48 @@ def __init__(self, **kwargs) -> None: 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, *, display=None, **kwargs) -> None: - super(Operation, self).__init__(**kwargs) - self.name = None + def __init__(self, *, name: str=None, is_data_action: bool=None, display=None, origin: str=None, properties=None, **kwargs) -> None: + super(OperationDetail, self).__init__(**kwargs) + self.name = name + self.is_data_action = is_data_action self.display = display + self.origin = origin + self.properties = properties 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 """ @@ -501,33 +543,6 @@ def __init__(self, *, provider: str=None, resource: str=None, operation: str=Non self.description = description -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, *, value=None, **kwargs) -> None: - super(OperationList, self).__init__(**kwargs) - self.value = value - 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. diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/operations/_operations.py b/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/operations/_operations.py index bc81ec5c762f..a9abb4a4eeed 100644 --- a/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/operations/_operations.py +++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/operations/_operations.py @@ -47,8 +47,8 @@ def list( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: OperationList or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.azurestackhci.models.OperationList or + :return: AvailableOperations or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.azurestackhci.models.AvailableOperations or ~msrest.pipeline.ClientRawResponse :raises: :class:`ErrorResponseException` @@ -79,7 +79,7 @@ def list( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('OperationList', response) + deserialized = self._deserialize('AvailableOperations', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/setup.py b/sdk/azurestackhci/azure-mgmt-azurestackhci/setup.py index fa5fa052a808..de2d439385da 100644 --- a/sdk/azurestackhci/azure-mgmt-azurestackhci/setup.py +++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/setup.py @@ -13,7 +13,7 @@ # Change the PACKAGE_NAME only to change folder and different name PACKAGE_NAME = "azure-mgmt-azurestackhci" -PACKAGE_PPRINT_NAME = "MyService Management" +PACKAGE_PPRINT_NAME = "AzureStackHCI Management" # a-b-c => a/b/c package_folder_path = PACKAGE_NAME.replace('-', '/')