Skip to content

Commit

Permalink
Merge pull request #1324 from ro-joowan/master
Browse files Browse the repository at this point in the history
BREAKING CHANGE: Adl object refactor
  • Loading branch information
lmazuel authored Aug 17, 2017
2 parents 7ae8ace + 15431a7 commit 25ec190
Show file tree
Hide file tree
Showing 67 changed files with 1,666 additions and 725 deletions.
54 changes: 54 additions & 0 deletions azure-mgmt-datalake-analytics/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,60 @@
Release History
===============
0.2.0 (2017-07-25)
++++++++++++++++++

**Breaking changes**

* Revised the inheritance structure for objects dealing with job creation, building, and retrieving.

* NOTE: Only U-SQL is supported in this change; therefore, Hive is not supported.
* When submitting jobs, change JobInformation objects to CreateJobParameters.

* When setting the properties for the CreateJobParameters object, be sure to change the USqlJobProperties object to a CreateUSqlJobProperties object.

* When building jobs, change JobInformation objects to BuildJobParameters objects.

* When setting the properties for the BuildJobParameters object, be sure to change the USqlJobProperties object to a CreateUSqlJobProperties object.
* NOTE: The following fields are not a part of the BuildJobParameters object:

* degreeOfParallelism
* priority
* related

* When getting a list of jobs, the object type that is returned is JobInformationBasic and not JobInformation (more information on the difference is below in the Notes section)

* When getting a list of accounts, the object type that is returned is DataLakeAnalyticsAccountBasic and not DataLakeAnalyticsAccount (more information on the difference is below in the Notes section)

**Notes**

* When getting a list of jobs, the job information for each job now includes a strict subset of the job information that is returned when getting a single job

* The following fields are included in the job information when getting a single job but are not included in the job information when getting a list of jobs:

* errorMessage
* stateAuditRecords
* properties

* runtimeVersion
* script
* type

* When getting a list of accounts, the account information for each account now includes a strict subset of the account information that is returned when getting a single account

* There are two ways to get a list of accounts: List and ListByResource methods
* The following fields are included in the account information when getting a list of accounts, which is less than the account information retrieved for a single account:

* provisioningState
* state
* creationTime
* lastModifiedTime
* endpoint

* When retrieving account information, an account id field called "accountId" is now included.

* accountId's description: The unique identifier associated with this Data Lake Analytics account.

0.1.6 (2017-06-19)
++++++++++++++++++
* Fixing a regression discovered in 0.1.5. Please update to 0.1.6 to avoid any issues caused by that regression.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
from .update_storage_account_parameters import UpdateStorageAccountParameters
from .compute_policy_create_or_update_parameters import ComputePolicyCreateOrUpdateParameters
from .data_lake_analytics_account_update_parameters import DataLakeAnalyticsAccountUpdateParameters
from .data_lake_analytics_account_properties_basic import DataLakeAnalyticsAccountPropertiesBasic
from .data_lake_analytics_account_basic import DataLakeAnalyticsAccountBasic
from .data_lake_analytics_account import DataLakeAnalyticsAccount
from .update_firewall_rule_parameters import UpdateFirewallRuleParameters
from .resource import Resource
Expand All @@ -32,14 +34,14 @@
from .sas_token_info_paged import SasTokenInfoPaged
from .storage_account_info_paged import StorageAccountInfoPaged
from .data_lake_store_account_info_paged import DataLakeStoreAccountInfoPaged
from .data_lake_analytics_account_paged import DataLakeAnalyticsAccountPaged
from .data_lake_analytics_account_basic_paged import DataLakeAnalyticsAccountBasicPaged
from .data_lake_analytics_account_management_client_enums import (
DataLakeAnalyticsAccountStatus,
DataLakeAnalyticsAccountState,
TierType,
FirewallState,
FirewallAllowAzureIpsState,
AADObjectType,
DataLakeAnalyticsAccountStatus,
DataLakeAnalyticsAccountState,
)

__all__ = [
Expand All @@ -55,6 +57,8 @@
'UpdateStorageAccountParameters',
'ComputePolicyCreateOrUpdateParameters',
'DataLakeAnalyticsAccountUpdateParameters',
'DataLakeAnalyticsAccountPropertiesBasic',
'DataLakeAnalyticsAccountBasic',
'DataLakeAnalyticsAccount',
'UpdateFirewallRuleParameters',
'Resource',
Expand All @@ -66,11 +70,11 @@
'SasTokenInfoPaged',
'StorageAccountInfoPaged',
'DataLakeStoreAccountInfoPaged',
'DataLakeAnalyticsAccountPaged',
'DataLakeAnalyticsAccountStatus',
'DataLakeAnalyticsAccountState',
'DataLakeAnalyticsAccountBasicPaged',
'TierType',
'FirewallState',
'FirewallAllowAzureIpsState',
'AADObjectType',
'DataLakeAnalyticsAccountStatus',
'DataLakeAnalyticsAccountState',
]
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

class ComputePolicyPaged(Paged):
"""
A paging container for iterating over a list of ComputePolicy object
A paging container for iterating over a list of :class:`ComputePolicy <azure.mgmt.datalake.analytics.account.models.ComputePolicy>` object
"""

_attribute_map = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,15 @@ class DataLakeAnalyticsAccount(Resource):
include: 'Active', 'Suspended'
:vartype state: str or :class:`DataLakeAnalyticsAccountState
<azure.mgmt.datalake.analytics.account.models.DataLakeAnalyticsAccountState>`
:ivar creation_time: the account creation time.
:vartype creation_time: datetime
:ivar last_modified_time: the account last modified time.
:vartype last_modified_time: datetime
:ivar endpoint: the full CName endpoint for this account.
:vartype endpoint: str
:ivar account_id: The unique identifier associated with this Data Lake
Analytics account.
:vartype account_id: str
:param default_data_lake_store_account: the default data lake storage
account associated with this Data Lake Analytics account.
:type default_data_lake_store_account: str
Expand Down Expand Up @@ -67,12 +76,6 @@ class DataLakeAnalyticsAccount(Resource):
associated with this account.
:type storage_accounts: list of :class:`StorageAccountInfo
<azure.mgmt.datalake.analytics.account.models.StorageAccountInfo>`
:ivar creation_time: the account creation time.
:vartype creation_time: datetime
:ivar last_modified_time: the account last modified time.
:vartype last_modified_time: datetime
:ivar endpoint: the full CName endpoint for this account.
:vartype endpoint: str
:param new_tier: the commitment tier for the next month. Possible values
include: 'Consumption', 'Commitment_100AUHours', 'Commitment_500AUHours',
'Commitment_1000AUHours', 'Commitment_5000AUHours',
Expand Down Expand Up @@ -123,16 +126,17 @@ class DataLakeAnalyticsAccount(Resource):
'location': {'required': True},
'provisioning_state': {'readonly': True},
'state': {'readonly': True},
'creation_time': {'readonly': True},
'last_modified_time': {'readonly': True},
'endpoint': {'readonly': True},
'account_id': {'readonly': True},
'default_data_lake_store_account': {'required': True},
'max_degree_of_parallelism': {'minimum': 1},
'query_store_retention': {'maximum': 180, 'minimum': 1},
'max_job_count': {'minimum': 1},
'system_max_degree_of_parallelism': {'readonly': True},
'system_max_job_count': {'readonly': True},
'data_lake_store_accounts': {'required': True},
'creation_time': {'readonly': True},
'last_modified_time': {'readonly': True},
'endpoint': {'readonly': True},
'current_tier': {'readonly': True},
'max_degree_of_parallelism_per_job': {'minimum': 1},
'min_priority_per_job': {'minimum': 1},
Expand All @@ -146,6 +150,10 @@ class DataLakeAnalyticsAccount(Resource):
'tags': {'key': 'tags', 'type': '{str}'},
'provisioning_state': {'key': 'properties.provisioningState', 'type': 'DataLakeAnalyticsAccountStatus'},
'state': {'key': 'properties.state', 'type': 'DataLakeAnalyticsAccountState'},
'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'},
'last_modified_time': {'key': 'properties.lastModifiedTime', 'type': 'iso-8601'},
'endpoint': {'key': 'properties.endpoint', 'type': 'str'},
'account_id': {'key': 'properties.accountId', 'type': 'str'},
'default_data_lake_store_account': {'key': 'properties.defaultDataLakeStoreAccount', 'type': 'str'},
'max_degree_of_parallelism': {'key': 'properties.maxDegreeOfParallelism', 'type': 'int'},
'query_store_retention': {'key': 'properties.queryStoreRetention', 'type': 'int'},
Expand All @@ -154,9 +162,6 @@ class DataLakeAnalyticsAccount(Resource):
'system_max_job_count': {'key': 'properties.systemMaxJobCount', 'type': 'int'},
'data_lake_store_accounts': {'key': 'properties.dataLakeStoreAccounts', 'type': '[DataLakeStoreAccountInfo]'},
'storage_accounts': {'key': 'properties.storageAccounts', 'type': '[StorageAccountInfo]'},
'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'},
'last_modified_time': {'key': 'properties.lastModifiedTime', 'type': 'iso-8601'},
'endpoint': {'key': 'properties.endpoint', 'type': 'str'},
'new_tier': {'key': 'properties.newTier', 'type': 'TierType'},
'current_tier': {'key': 'properties.currentTier', 'type': 'TierType'},
'firewall_state': {'key': 'properties.firewallState', 'type': 'FirewallState'},
Expand All @@ -171,6 +176,10 @@ def __init__(self, location, default_data_lake_store_account, data_lake_store_ac
super(DataLakeAnalyticsAccount, self).__init__(location=location, tags=tags)
self.provisioning_state = None
self.state = None
self.creation_time = None
self.last_modified_time = None
self.endpoint = None
self.account_id = None
self.default_data_lake_store_account = default_data_lake_store_account
self.max_degree_of_parallelism = max_degree_of_parallelism
self.query_store_retention = query_store_retention
Expand All @@ -179,9 +188,6 @@ def __init__(self, location, default_data_lake_store_account, data_lake_store_ac
self.system_max_job_count = None
self.data_lake_store_accounts = data_lake_store_accounts
self.storage_accounts = storage_accounts
self.creation_time = None
self.last_modified_time = None
self.endpoint = None
self.new_tier = new_tier
self.current_tier = None
self.firewall_state = firewall_state
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
# 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 .resource import Resource


class DataLakeAnalyticsAccountBasic(Resource):
"""A Data Lake Analytics account object, containing all information associated
with the named Data Lake Analytics account.
Variables are only populated by the server, and will be ignored when
sending a request.
:ivar id: Resource Id
:vartype id: str
:ivar name: Resource name
:vartype name: str
:ivar type: Resource type
:vartype type: str
:param location: Resource location
:type location: str
:param tags: Resource tags
:type tags: dict
:ivar provisioning_state: the provisioning status of the Data Lake
Analytics account. Possible values include: 'Failed', 'Creating',
'Running', 'Succeeded', 'Patching', 'Suspending', 'Resuming', 'Deleting',
'Deleted'
:vartype provisioning_state: str or :class:`DataLakeAnalyticsAccountStatus
<azure.mgmt.datalake.analytics.account.models.DataLakeAnalyticsAccountStatus>`
:ivar state: the state of the Data Lake Analytics account. Possible values
include: 'Active', 'Suspended'
:vartype state: str or :class:`DataLakeAnalyticsAccountState
<azure.mgmt.datalake.analytics.account.models.DataLakeAnalyticsAccountState>`
:ivar creation_time: the account creation time.
:vartype creation_time: datetime
:ivar last_modified_time: the account last modified time.
:vartype last_modified_time: datetime
:ivar endpoint: the full CName endpoint for this account.
:vartype endpoint: str
:ivar account_id: The unique identifier associated with this Data Lake
Analytics account.
:vartype account_id: str
"""

_validation = {
'id': {'readonly': True},
'name': {'readonly': True},
'type': {'readonly': True},
'location': {'required': True},
'provisioning_state': {'readonly': True},
'state': {'readonly': True},
'creation_time': {'readonly': True},
'last_modified_time': {'readonly': True},
'endpoint': {'readonly': True},
'account_id': {'readonly': True},
}

_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
'location': {'key': 'location', 'type': 'str'},
'tags': {'key': 'tags', 'type': '{str}'},
'provisioning_state': {'key': 'properties.provisioningState', 'type': 'DataLakeAnalyticsAccountStatus'},
'state': {'key': 'properties.state', 'type': 'DataLakeAnalyticsAccountState'},
'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'},
'last_modified_time': {'key': 'properties.lastModifiedTime', 'type': 'iso-8601'},
'endpoint': {'key': 'properties.endpoint', 'type': 'str'},
'account_id': {'key': 'properties.accountId', 'type': 'str'},
}

def __init__(self, location, tags=None):
super(DataLakeAnalyticsAccountBasic, self).__init__(location=location, tags=tags)
self.provisioning_state = None
self.state = None
self.creation_time = None
self.last_modified_time = None
self.endpoint = None
self.account_id = None
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,16 @@
from msrest.paging import Paged


class DataLakeAnalyticsAccountPaged(Paged):
class DataLakeAnalyticsAccountBasicPaged(Paged):
"""
A paging container for iterating over a list of DataLakeAnalyticsAccount object
A paging container for iterating over a list of :class:`DataLakeAnalyticsAccountBasic <azure.mgmt.datalake.analytics.account.models.DataLakeAnalyticsAccountBasic>` object
"""

_attribute_map = {
'next_link': {'key': 'nextLink', 'type': 'str'},
'current_page': {'key': 'value', 'type': '[DataLakeAnalyticsAccount]'}
'current_page': {'key': 'value', 'type': '[DataLakeAnalyticsAccountBasic]'}
}

def __init__(self, *args, **kwargs):

super(DataLakeAnalyticsAccountPaged, self).__init__(*args, **kwargs)
super(DataLakeAnalyticsAccountBasicPaged, self).__init__(*args, **kwargs)
Original file line number Diff line number Diff line change
Expand Up @@ -12,25 +12,6 @@
from enum import Enum


class DataLakeAnalyticsAccountStatus(Enum):

failed = "Failed"
creating = "Creating"
running = "Running"
succeeded = "Succeeded"
patching = "Patching"
suspending = "Suspending"
resuming = "Resuming"
deleting = "Deleting"
deleted = "Deleted"


class DataLakeAnalyticsAccountState(Enum):

active = "Active"
suspended = "Suspended"


class TierType(Enum):

consumption = "Consumption"
Expand Down Expand Up @@ -61,3 +42,22 @@ class AADObjectType(Enum):
user = "User"
group = "Group"
service_principal = "ServicePrincipal"


class DataLakeAnalyticsAccountStatus(Enum):

failed = "Failed"
creating = "Creating"
running = "Running"
succeeded = "Succeeded"
patching = "Patching"
suspending = "Suspending"
resuming = "Resuming"
deleting = "Deleting"
deleted = "Deleted"


class DataLakeAnalyticsAccountState(Enum):

active = "Active"
suspended = "Suspended"
Loading

0 comments on commit 25ec190

Please sign in to comment.