Skip to content
Closed
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
18 changes: 6 additions & 12 deletions azure-mgmt-automation/azure/mgmt/automation/automation_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,21 +68,18 @@ 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
:ivar count_type: The type of counts to retrieve
:type count_type: str
:param str base_url: Service URL
"""

def __init__(
self, credentials, subscription_id, count_type1, base_url=None):
self, credentials, subscription_id, 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 @@ -93,7 +90,7 @@ def __init__(

self.credentials = credentials
self.subscription_id = subscription_id
self.count_type1 = count_type1
self.count_type = "status"


class AutomationClient(object):
Expand Down Expand Up @@ -190,16 +187,13 @@ 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, count_type1, base_url=None):
self, credentials, subscription_id, base_url=None):

self.config = AutomationClientConfiguration(credentials, subscription_id, count_type1, base_url)
self.config = AutomationClientConfiguration(credentials, subscription_id, 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
30 changes: 14 additions & 16 deletions azure-mgmt-automation/azure/mgmt/automation/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@
# regenerated.
# --------------------------------------------------------------------------

from .error_response import ErrorResponse, ErrorResponseException
from .resource import Resource
from .tracked_resource import TrackedResource
from .proxy_resource import ProxyResource
from .sku import Sku
from .automation_account import AutomationAccount
from .automation_account_create_or_update_parameters import AutomationAccountCreateOrUpdateParameters
Expand All @@ -24,6 +20,10 @@
from .key import Key
from .key_list_result import KeyListResult
from .automation_account_update_parameters import AutomationAccountUpdateParameters
from .proxy_resource import ProxyResource
from .resource import Resource
from .tracked_resource import TrackedResource
from .error_response import ErrorResponse, ErrorResponseException
from .certificate_create_or_update_parameters import CertificateCreateOrUpdateParameters
from .certificate import Certificate
from .certificate_update_parameters import CertificateUpdateParameters
Expand Down Expand Up @@ -63,8 +63,6 @@
from .module_create_or_update_parameters import ModuleCreateOrUpdateParameters
from .module_update_parameters import ModuleUpdateParameters
from .type_field import TypeField
from .job_stream import JobStream
from .job_stream_list_result import JobStreamListResult
from .runbook_parameter import RunbookParameter
from .runbook_draft import RunbookDraft
from .runbook import Runbook
Expand All @@ -75,6 +73,8 @@
from .test_job import TestJob
from .runbook_create_or_update_draft_properties import RunbookCreateOrUpdateDraftProperties
from .runbook_create_or_update_draft_parameters import RunbookCreateOrUpdateDraftParameters
from .job_stream import JobStream
from .job_stream_list_result import JobStreamListResult
from .advanced_schedule_monthly_occurrence import AdvancedScheduleMonthlyOccurrence
from .advanced_schedule import AdvancedSchedule
from .schedule_create_or_update_parameters import ScheduleCreateOrUpdateParameters
Expand Down Expand Up @@ -171,11 +171,11 @@
DscConfigurationState,
GroupTypeEnum,
ModuleProvisioningState,
JobStreamType,
RunbookTypeEnum,
RunbookState,
RunbookProvisioningState,
HttpStatusCode,
JobStreamType,
ScheduleDay,
ScheduleFrequency,
OperatingSystemType,
Expand All @@ -188,14 +188,9 @@
JobStatus,
JobProvisioningState,
AgentRegistrationKeyName,
CountType,
)

__all__ = [
'ErrorResponse', 'ErrorResponseException',
'Resource',
'TrackedResource',
'ProxyResource',
'Sku',
'AutomationAccount',
'AutomationAccountCreateOrUpdateParameters',
Expand All @@ -207,6 +202,10 @@
'Key',
'KeyListResult',
'AutomationAccountUpdateParameters',
'ProxyResource',
'Resource',
'TrackedResource',
'ErrorResponse', 'ErrorResponseException',
'CertificateCreateOrUpdateParameters',
'Certificate',
'CertificateUpdateParameters',
Expand Down Expand Up @@ -246,8 +245,6 @@
'ModuleCreateOrUpdateParameters',
'ModuleUpdateParameters',
'TypeField',
'JobStream',
'JobStreamListResult',
'RunbookParameter',
'RunbookDraft',
'Runbook',
Expand All @@ -258,6 +255,8 @@
'TestJob',
'RunbookCreateOrUpdateDraftProperties',
'RunbookCreateOrUpdateDraftParameters',
'JobStream',
'JobStreamListResult',
'AdvancedScheduleMonthlyOccurrence',
'AdvancedSchedule',
'ScheduleCreateOrUpdateParameters',
Expand Down Expand Up @@ -353,11 +352,11 @@
'DscConfigurationState',
'GroupTypeEnum',
'ModuleProvisioningState',
'JobStreamType',
'RunbookTypeEnum',
'RunbookState',
'RunbookProvisioningState',
'HttpStatusCode',
'JobStreamType',
'ScheduleDay',
'ScheduleFrequency',
'OperatingSystemType',
Expand All @@ -370,5 +369,4 @@
'JobStatus',
'JobProvisioningState',
'AgentRegistrationKeyName',
'CountType',
]
Original file line number Diff line number Diff line change
Expand Up @@ -81,17 +81,6 @@ class ModuleProvisioningState(Enum):
updating = "Updating"


class JobStreamType(Enum):

progress = "Progress"
output = "Output"
warning = "Warning"
error = "Error"
debug = "Debug"
verbose = "Verbose"
any = "Any"


class RunbookTypeEnum(Enum):

script = "Script"
Expand Down Expand Up @@ -165,6 +154,17 @@ class HttpStatusCode(Enum):
http_version_not_supported = "HttpVersionNotSupported"


class JobStreamType(Enum):

progress = "Progress"
output = "Output"
warning = "Warning"
error = "Error"
debug = "Debug"
verbose = "Verbose"
any = "Any"


class ScheduleDay(Enum):

monday = "Monday"
Expand Down Expand Up @@ -267,9 +267,3 @@ class AgentRegistrationKeyName(Enum):

primary = "primary"
secondary = "secondary"


class CountType(Enum):

status = "status"
nodeconfiguration = "nodeconfiguration"
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ def replace_content(
:type automation_account_name: str
:param runbook_name: The runbook name.
:type runbook_name: str
:param runbook_content: The runbook draft content.
:param runbook_content: The runbook draft content.
:type runbook_content: str
:param dict custom_headers: headers that will be added to the request
:param bool raw: returns the direct response alongside the
Expand Down