Skip to content

Commit

Permalink
Code gen for ADL + Test fixes
Browse files Browse the repository at this point in the history
* Found two bugs that I needed to fix in order to run tests in Playback
mode:

* including vcrpy in requirements.txt
* resource-manager to data-plane in swagger_to_sdk_config.json for
catalog.json and job.json
  • Loading branch information
ro-joowan committed Jul 25, 2017
1 parent f477734 commit 4c767b2
Show file tree
Hide file tree
Showing 70 changed files with 1,622 additions and 726 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -4,6 +4,7 @@ __pycache__/

# Virtual environment
env*/
myEnv/

# PTVS analysis
.ptvs/
Expand Down
Binary file added UpgradeLog.htm
Binary file not shown.
16 changes: 16 additions & 0 deletions azure-mgmt-datalake-analytics/HISTORY.rst
Expand Up @@ -2,6 +2,22 @@
Release History
===============
0.2.0 (2017-07-25)
++++++++++++++++++
* Create an explicit set of parameters for job submission. NOTE: Only U-SQL is supported in this change, no hive jobs are supported at present.
* For jobs submission, change JobInformation to CreateJobParameters
* For the properties use the right object (e.g. USqlJobProperties to CreateUSqlJobProperties)
* For building jobs, change JobInformation to BuildJobParameters
* For the properties use the right object (e.g. USqlJobProperties to CreateUSqlJobProperties)
* Note that the following fields are not part of BuildJobParameters
* degreeOfParallelism
* priority
* related
* Create a "Basic" jobInformation that is returned for LIST calls
* Setup inheritance for GET jobs
* Create an inheritance structure for GET and LIST ADLA accounts.
* This also follows the Basic<Object> -> Object inheritance pattern.

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
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',
]
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
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
@@ -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
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)
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"

0 comments on commit 4c767b2

Please sign in to comment.