Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Generated from 27d71a427c73a4adfd90f2347ba5c0a9e0403e7d
change route
  • Loading branch information
AutorestCI committed Apr 18, 2018
commit aed355270465c8487f77b1606bb5d4e933568b4e
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
from .version import VERSION
from .operations.operations import Operations
from .operations.factories_operations import FactoriesOperations
from .operations.configure_factory_repo_operations import ConfigureFactoryRepoOperations
from .operations.configure_repo_operations import ConfigureRepoOperations
from .operations.integration_runtimes_operations import IntegrationRuntimesOperations
from .operations.integration_runtime_nodes_operations import IntegrationRuntimeNodesOperations
from .operations.linked_services_operations import LinkedServicesOperations
Expand Down Expand Up @@ -69,8 +69,8 @@ class DataFactoryManagementClient(object):
:vartype operations: azure.mgmt.datafactory.operations.Operations
:ivar factories: Factories operations
:vartype factories: azure.mgmt.datafactory.operations.FactoriesOperations
:ivar configure_factory_repo: ConfigureFactoryRepo operations
:vartype configure_factory_repo: azure.mgmt.datafactory.operations.ConfigureFactoryRepoOperations
:ivar configure_repo: ConfigureRepo operations
:vartype configure_repo: azure.mgmt.datafactory.operations.ConfigureRepoOperations
:ivar integration_runtimes: IntegrationRuntimes operations
:vartype integration_runtimes: azure.mgmt.datafactory.operations.IntegrationRuntimesOperations
:ivar integration_runtime_nodes: IntegrationRuntimeNodes operations
Expand Down Expand Up @@ -111,7 +111,7 @@ def __init__(
self._client, self.config, self._serialize, self._deserialize)
self.factories = FactoriesOperations(
self._client, self.config, self._serialize, self._deserialize)
self.configure_factory_repo = ConfigureFactoryRepoOperations(
self.configure_repo = ConfigureRepoOperations(
self._client, self.config, self._serialize, self._deserialize)
self.integration_runtimes = IntegrationRuntimesOperations(
self._client, self.config, self._serialize, self._deserialize)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,17 @@ class FactoryRepoUpdate(Model):

:param factory_id: The factory id.
:type factory_id: str
:param resource_group_name: The resource group name.
:type resource_group_name: str
:param vsts_configuration: VSTS repo information of the factory.
:type vsts_configuration:
~azure.mgmt.datafactory.models.FactoryVSTSConfiguration
"""

_attribute_map = {
'factory_id': {'key': 'factoryId', 'type': 'str'},
'resource_group_name': {'key': 'resourceGroupName', 'type': 'str'},
'vsts_configuration': {'key': 'vstsConfiguration', 'type': 'FactoryVSTSConfiguration'},
}

def __init__(self, **kwargs):
super(FactoryRepoUpdate, self).__init__(**kwargs)
self.factory_id = kwargs.get('factory_id', None)
self.resource_group_name = kwargs.get('resource_group_name', None)
self.vsts_configuration = kwargs.get('vsts_configuration', None)
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,17 @@ class FactoryRepoUpdate(Model):

:param factory_id: The factory id.
:type factory_id: str
:param resource_group_name: The resource group name.
:type resource_group_name: str
:param vsts_configuration: VSTS repo information of the factory.
:type vsts_configuration:
~azure.mgmt.datafactory.models.FactoryVSTSConfiguration
"""

_attribute_map = {
'factory_id': {'key': 'factoryId', 'type': 'str'},
'resource_group_name': {'key': 'resourceGroupName', 'type': 'str'},
'vsts_configuration': {'key': 'vstsConfiguration', 'type': 'FactoryVSTSConfiguration'},
}

def __init__(self, *, factory_id: str=None, resource_group_name: str=None, vsts_configuration=None, **kwargs) -> None:
def __init__(self, *, factory_id: str=None, vsts_configuration=None, **kwargs) -> None:
super(FactoryRepoUpdate, self).__init__(**kwargs)
self.factory_id = factory_id
self.resource_group_name = resource_group_name
self.vsts_configuration = vsts_configuration
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

from .operations import Operations
from .factories_operations import FactoriesOperations
from .configure_factory_repo_operations import ConfigureFactoryRepoOperations
from .configure_repo_operations import ConfigureRepoOperations
from .integration_runtimes_operations import IntegrationRuntimesOperations
from .integration_runtime_nodes_operations import IntegrationRuntimeNodesOperations
from .linked_services_operations import LinkedServicesOperations
Expand All @@ -24,7 +24,7 @@
__all__ = [
'Operations',
'FactoriesOperations',
'ConfigureFactoryRepoOperations',
'ConfigureRepoOperations',
'IntegrationRuntimesOperations',
'IntegrationRuntimeNodesOperations',
'LinkedServicesOperations',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
from .. import models


class ConfigureFactoryRepoOperations(object):
"""ConfigureFactoryRepoOperations operations.
class ConfigureRepoOperations(object):
"""ConfigureRepoOperations operations.

:param client: Client for service requests.
:param config: Configuration of service client.
Expand All @@ -37,14 +37,18 @@ def __init__(self, client, config, serializer, deserializer):
self.config = config

def update(
self, location_id, factory_repo_update, custom_headers=None, raw=False, **operation_config):
self, resource_group_name, factory_name, factory_id=None, vsts_configuration=None, custom_headers=None, raw=False, **operation_config):
"""Updates a factory's repo information.

:param location_id: The location identifier.
:type location_id: str
:param factory_repo_update: Update factory repo request definition.
:type factory_repo_update:
~azure.mgmt.datafactory.models.FactoryRepoUpdate
:param resource_group_name: The resource group name.
:type resource_group_name: str
:param factory_name: The factory name.
:type factory_name: str
:param factory_id: The factory id.
:type factory_id: str
:param vsts_configuration: VSTS repo information of the factory.
:type vsts_configuration:
~azure.mgmt.datafactory.models.FactoryVSTSConfiguration
:param dict custom_headers: headers that will be added to the request
:param bool raw: returns the direct response alongside the
deserialized response
Expand All @@ -56,11 +60,14 @@ def update(
:raises:
:class:`ErrorResponseException<azure.mgmt.datafactory.models.ErrorResponseException>`
"""
factory_repo_update = models.FactoryRepoUpdate(factory_id=factory_id, vsts_configuration=vsts_configuration)

# Construct URL
url = self.update.metadata['url']
path_format_arguments = {
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
'locationId': self._serialize.url("location_id", location_id, 'str')
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
'factoryName': self._serialize.url("factory_name", factory_name, 'str', max_length=63, min_length=3, pattern=r'^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$')
}
url = self._client.format_url(url, **path_format_arguments)

Expand Down Expand Up @@ -99,4 +106,4 @@ def update(
return client_raw_response

return deserialized
update.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DataFactory/locations/{locationId}/configureFactoryRepo'}
update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/configureRepo'}