Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
Generated from 4427304dc57f73fbeb012d11bffca3038ea2bf99
Updated Readme.md file
  • Loading branch information
AutorestCI committed Jun 26, 2018
commit 92cf9ea01cab05904f8f76b89fff6b4b3cb5c902
28 changes: 21 additions & 7 deletions azure-mgmt-automation/azure/mgmt/automation/automation_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
from .operations.schedule_operations import ScheduleOperations
from .operations.variable_operations import VariableOperations
from .operations.webhook_operations import WebhookOperations
from .operations.watcher_operations import WatcherOperations
from .operations.software_update_configurations_operations import SoftwareUpdateConfigurationsOperations
from .operations.software_update_configuration_runs_operations import SoftwareUpdateConfigurationRunsOperations
from .operations.software_update_configuration_machine_runs_operations import SoftwareUpdateConfigurationMachineRunsOperations
Expand All @@ -51,7 +52,7 @@
from .operations.dsc_compilation_job_operations import DscCompilationJobOperations
from .operations.dsc_compilation_job_stream_operations import DscCompilationJobStreamOperations
from .operations.dsc_node_configuration_operations import DscNodeConfigurationOperations
from .operations.watcher_operations import WatcherOperations
from .operations.node_count_information_operations import NodeCountInformationOperations
from . import models


Expand All @@ -67,16 +68,21 @@ class AutomationClientConfiguration(AzureConfiguration):
identify Microsoft Azure subscription. The subscription ID forms part of
the URI for every service call.
:type subscription_id: str
:param count_type1: The type of counts to retrieve. Possible values
include: 'status', 'nodeconfiguration'
:type count_type1: str or ~azure.mgmt.automation.models.CountType
:param str base_url: Service URL
"""

def __init__(
self, credentials, subscription_id, base_url=None):
self, credentials, subscription_id, count_type1, base_url=None):

if credentials is None:
raise ValueError("Parameter 'credentials' must not be None.")
if subscription_id is None:
raise ValueError("Parameter 'subscription_id' must not be None.")
if count_type1 is None:
raise ValueError("Parameter 'count_type1' must not be None.")
if not base_url:
base_url = 'https://management.azure.com'

Expand All @@ -87,6 +93,7 @@ def __init__(

self.credentials = credentials
self.subscription_id = subscription_id
self.count_type1 = count_type1


class AutomationClient(object):
Expand Down Expand Up @@ -143,6 +150,8 @@ class AutomationClient(object):
:vartype variable: azure.mgmt.automation.operations.VariableOperations
:ivar webhook: Webhook operations
:vartype webhook: azure.mgmt.automation.operations.WebhookOperations
:ivar watcher: Watcher operations
:vartype watcher: azure.mgmt.automation.operations.WatcherOperations
:ivar software_update_configurations: SoftwareUpdateConfigurations operations
:vartype software_update_configurations: azure.mgmt.automation.operations.SoftwareUpdateConfigurationsOperations
:ivar software_update_configuration_runs: SoftwareUpdateConfigurationRuns operations
Expand Down Expand Up @@ -171,8 +180,8 @@ class AutomationClient(object):
:vartype dsc_compilation_job_stream: azure.mgmt.automation.operations.DscCompilationJobStreamOperations
:ivar dsc_node_configuration: DscNodeConfiguration operations
:vartype dsc_node_configuration: azure.mgmt.automation.operations.DscNodeConfigurationOperations
:ivar watcher: Watcher operations
:vartype watcher: azure.mgmt.automation.operations.WatcherOperations
:ivar node_count_information: NodeCountInformation operations
:vartype node_count_information: azure.mgmt.automation.operations.NodeCountInformationOperations

:param credentials: Credentials needed for the client to connect to Azure.
:type credentials: :mod:`A msrestazure Credentials
Expand All @@ -181,13 +190,16 @@ class AutomationClient(object):
identify Microsoft Azure subscription. The subscription ID forms part of
the URI for every service call.
:type subscription_id: str
:param count_type1: The type of counts to retrieve. Possible values
include: 'status', 'nodeconfiguration'
:type count_type1: str or ~azure.mgmt.automation.models.CountType
:param str base_url: Service URL
"""

def __init__(
self, credentials, subscription_id, base_url=None):
self, credentials, subscription_id, count_type1, base_url=None):

self.config = AutomationClientConfiguration(credentials, subscription_id, base_url)
self.config = AutomationClientConfiguration(credentials, subscription_id, count_type1, base_url)
self._client = ServiceClient(self.config.credentials, self.config)

client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
Expand Down Expand Up @@ -242,6 +254,8 @@ def __init__(
self._client, self.config, self._serialize, self._deserialize)
self.webhook = WebhookOperations(
self._client, self.config, self._serialize, self._deserialize)
self.watcher = WatcherOperations(
self._client, self.config, self._serialize, self._deserialize)
self.software_update_configurations = SoftwareUpdateConfigurationsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.software_update_configuration_runs = SoftwareUpdateConfigurationRunsOperations(
Expand Down Expand Up @@ -270,5 +284,5 @@ def __init__(
self._client, self.config, self._serialize, self._deserialize)
self.dsc_node_configuration = DscNodeConfigurationOperations(
self._client, self.config, self._serialize, self._deserialize)
self.watcher = WatcherOperations(
self.node_count_information = NodeCountInformationOperations(
self._client, self.config, self._serialize, self._deserialize)
20 changes: 14 additions & 6 deletions azure-mgmt-automation/azure/mgmt/automation/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@
from .webhook import Webhook
from .webhook_update_parameters import WebhookUpdateParameters
from .webhook_create_or_update_parameters import WebhookCreateOrUpdateParameters
from .watcher import Watcher
from .watcher_update_parameters import WatcherUpdateParameters
from .windows_properties import WindowsProperties
from .linux_properties import LinuxProperties
from .update_configuration import UpdateConfiguration
Expand Down Expand Up @@ -127,8 +129,9 @@
from .dsc_compilation_job_create_parameters import DscCompilationJobCreateParameters
from .dsc_node_configuration import DscNodeConfiguration
from .dsc_node_configuration_create_or_update_parameters import DscNodeConfigurationCreateOrUpdateParameters
from .watcher import Watcher
from .watcher_update_parameters import WatcherUpdateParameters
from .node_count_properties import NodeCountProperties
from .node_count import NodeCount
from .node_counts import NodeCounts
from .automation_account_paged import AutomationAccountPaged
from .operation_paged import OperationPaged
from .statistics_paged import StatisticsPaged
Expand All @@ -148,6 +151,7 @@
from .schedule_paged import SchedulePaged
from .variable_paged import VariablePaged
from .webhook_paged import WebhookPaged
from .watcher_paged import WatcherPaged
from .source_control_paged import SourceControlPaged
from .source_control_sync_job_paged import SourceControlSyncJobPaged
from .source_control_sync_job_stream_paged import SourceControlSyncJobStreamPaged
Expand All @@ -156,7 +160,6 @@
from .dsc_node_report_paged import DscNodeReportPaged
from .dsc_compilation_job_paged import DscCompilationJobPaged
from .dsc_node_configuration_paged import DscNodeConfigurationPaged
from .watcher_paged import WatcherPaged
from .automation_client_enums import (
SkuNameEnum,
AutomationAccountState,
Expand Down Expand Up @@ -184,6 +187,7 @@
JobStatus,
JobProvisioningState,
AgentRegistrationKeyName,
CountType,
)

__all__ = [
Expand Down Expand Up @@ -264,6 +268,8 @@
'Webhook',
'WebhookUpdateParameters',
'WebhookCreateOrUpdateParameters',
'Watcher',
'WatcherUpdateParameters',
'WindowsProperties',
'LinuxProperties',
'UpdateConfiguration',
Expand Down Expand Up @@ -305,8 +311,9 @@
'DscCompilationJobCreateParameters',
'DscNodeConfiguration',
'DscNodeConfigurationCreateOrUpdateParameters',
'Watcher',
'WatcherUpdateParameters',
'NodeCountProperties',
'NodeCount',
'NodeCounts',
'AutomationAccountPaged',
'OperationPaged',
'StatisticsPaged',
Expand All @@ -326,6 +333,7 @@
'SchedulePaged',
'VariablePaged',
'WebhookPaged',
'WatcherPaged',
'SourceControlPaged',
'SourceControlSyncJobPaged',
'SourceControlSyncJobStreamPaged',
Expand All @@ -334,7 +342,6 @@
'DscNodeReportPaged',
'DscCompilationJobPaged',
'DscNodeConfigurationPaged',
'WatcherPaged',
'SkuNameEnum',
'AutomationAccountState',
'AutomationKeyName',
Expand All @@ -361,4 +368,5 @@
'JobStatus',
'JobProvisioningState',
'AgentRegistrationKeyName',
'CountType',
]
Original file line number Diff line number Diff line change
Expand Up @@ -267,3 +267,9 @@ class AgentRegistrationKeyName(Enum):

primary = "primary"
secondary = "secondary"


class CountType(Enum):

status = "status"
nodeconfiguration = "nodeconfiguration"
32 changes: 32 additions & 0 deletions azure-mgmt-automation/azure/mgmt/automation/models/node_count.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# 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 msrest.serialization import Model


class NodeCount(Model):
"""Number of nodes based on the Filter.

:param name: Gets the name of a count type
:type name: str
:param properties:
:type properties: ~azure.mgmt.automation.models.NodeCountProperties
"""

_attribute_map = {
'name': {'key': 'name', 'type': 'str'},
'properties': {'key': 'properties', 'type': 'NodeCountProperties'},
}

def __init__(self, name=None, properties=None):
super(NodeCount, self).__init__()
self.name = name
self.properties = properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# 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 msrest.serialization import Model


class NodeCountProperties(Model):
"""NodeCountProperties.

:param count: Gets the count for the name
:type count: int
"""

_attribute_map = {
'count': {'key': 'count', 'type': 'int'},
}

def __init__(self, count=None):
super(NodeCountProperties, self).__init__()
self.count = count
33 changes: 33 additions & 0 deletions azure-mgmt-automation/azure/mgmt/automation/models/node_counts.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# 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 msrest.serialization import Model


class NodeCounts(Model):
"""Gets the count of nodes by count type.

:param value: Gets an array of counts
:type value: list[~azure.mgmt.automation.models.NodeCount]
:param total_count: Gets the total number of records matching countType
criteria.
:type total_count: int
"""

_attribute_map = {
'value': {'key': 'value', 'type': '[NodeCount]'},
'total_count': {'key': 'totalCount', 'type': 'int'},
}

def __init__(self, value=None, total_count=None):
super(NodeCounts, self).__init__()
self.value = value
self.total_count = total_count
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
from .schedule_operations import ScheduleOperations
from .variable_operations import VariableOperations
from .webhook_operations import WebhookOperations
from .watcher_operations import WatcherOperations
from .software_update_configurations_operations import SoftwareUpdateConfigurationsOperations
from .software_update_configuration_runs_operations import SoftwareUpdateConfigurationRunsOperations
from .software_update_configuration_machine_runs_operations import SoftwareUpdateConfigurationMachineRunsOperations
Expand All @@ -47,7 +48,7 @@
from .dsc_compilation_job_operations import DscCompilationJobOperations
from .dsc_compilation_job_stream_operations import DscCompilationJobStreamOperations
from .dsc_node_configuration_operations import DscNodeConfigurationOperations
from .watcher_operations import WatcherOperations
from .node_count_information_operations import NodeCountInformationOperations

__all__ = [
'AutomationAccountOperations',
Expand All @@ -74,6 +75,7 @@
'ScheduleOperations',
'VariableOperations',
'WebhookOperations',
'WatcherOperations',
'SoftwareUpdateConfigurationsOperations',
'SoftwareUpdateConfigurationRunsOperations',
'SoftwareUpdateConfigurationMachineRunsOperations',
Expand All @@ -88,5 +90,5 @@
'DscCompilationJobOperations',
'DscCompilationJobStreamOperations',
'DscNodeConfigurationOperations',
'WatcherOperations',
'NodeCountInformationOperations',
]
Loading