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
33 changes: 19 additions & 14 deletions azure-mgmt-automation/azure/mgmt/automation/automation_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,16 @@
from .operations.node_reports_operations import NodeReportsOperations
from .operations.dsc_node_configuration_operations import DscNodeConfigurationOperations
from .operations.hybrid_runbook_worker_group_operations import HybridRunbookWorkerGroupOperations
from .operations.job_operations import JobOperations
from .operations.job_stream_operations import JobStreamOperations
from .operations.job_schedule_operations import JobScheduleOperations
from .operations.linked_workspace_operations import LinkedWorkspaceOperations
from .operations.activity_operations import ActivityOperations
from .operations.module_operations import ModuleOperations
from .operations.object_data_types_operations import ObjectDataTypesOperations
from .operations.fields_operations import FieldsOperations
from .operations.runbook_draft_operations import RunbookDraftOperations
from .operations.runbook_operations import RunbookOperations
from .operations.test_job_streams_operations import TestJobStreamsOperations
from .operations.test_jobs_operations import TestJobsOperations
from .operations.test_job_operations import TestJobOperations
from .operations.schedule_operations import ScheduleOperations
from .operations.variable_operations import VariableOperations
from .operations.webhook_operations import WebhookOperations
Expand All @@ -48,6 +47,8 @@
from .operations.software_update_configuration_machine_runs_operations import SoftwareUpdateConfigurationMachineRunsOperations
from .operations.source_control_operations import SourceControlOperations
from .operations.source_control_sync_job_operations import SourceControlSyncJobOperations
from .operations.job_operations import JobOperations
from .operations.job_stream_operations import JobStreamOperations
from . import models


Expand Down Expand Up @@ -136,12 +137,10 @@ class AutomationClient(object):
:vartype dsc_node_configuration: azure.mgmt.automation.operations.DscNodeConfigurationOperations
:ivar hybrid_runbook_worker_group: HybridRunbookWorkerGroup operations
:vartype hybrid_runbook_worker_group: azure.mgmt.automation.operations.HybridRunbookWorkerGroupOperations
:ivar job: Job operations
:vartype job: azure.mgmt.automation.operations.JobOperations
:ivar job_stream: JobStream operations
:vartype job_stream: azure.mgmt.automation.operations.JobStreamOperations
:ivar job_schedule: JobSchedule operations
:vartype job_schedule: azure.mgmt.automation.operations.JobScheduleOperations
:ivar linked_workspace: LinkedWorkspace operations
:vartype linked_workspace: azure.mgmt.automation.operations.LinkedWorkspaceOperations
:ivar activity: Activity operations
:vartype activity: azure.mgmt.automation.operations.ActivityOperations
:ivar module: Module operations
Expand All @@ -156,8 +155,8 @@ class AutomationClient(object):
:vartype runbook: azure.mgmt.automation.operations.RunbookOperations
:ivar test_job_streams: TestJobStreams operations
:vartype test_job_streams: azure.mgmt.automation.operations.TestJobStreamsOperations
:ivar test_jobs: TestJobs operations
:vartype test_jobs: azure.mgmt.automation.operations.TestJobsOperations
:ivar test_job: TestJob operations
:vartype test_job: azure.mgmt.automation.operations.TestJobOperations
:ivar schedule: Schedule operations
:vartype schedule: azure.mgmt.automation.operations.ScheduleOperations
:ivar variable: Variable operations
Expand All @@ -174,6 +173,10 @@ class AutomationClient(object):
:vartype source_control: azure.mgmt.automation.operations.SourceControlOperations
:ivar source_control_sync_job: SourceControlSyncJob operations
:vartype source_control_sync_job: azure.mgmt.automation.operations.SourceControlSyncJobOperations
:ivar job: Job operations
:vartype job: azure.mgmt.automation.operations.JobOperations
:ivar job_stream: JobStream operations
:vartype job_stream: azure.mgmt.automation.operations.JobStreamOperations

:param credentials: Credentials needed for the client to connect to Azure.
:type credentials: :mod:`A msrestazure Credentials
Expand Down Expand Up @@ -233,12 +236,10 @@ def __init__(
self._client, self.config, self._serialize, self._deserialize)
self.hybrid_runbook_worker_group = HybridRunbookWorkerGroupOperations(
self._client, self.config, self._serialize, self._deserialize)
self.job = JobOperations(
self._client, self.config, self._serialize, self._deserialize)
self.job_stream = JobStreamOperations(
self._client, self.config, self._serialize, self._deserialize)
self.job_schedule = JobScheduleOperations(
self._client, self.config, self._serialize, self._deserialize)
self.linked_workspace = LinkedWorkspaceOperations(
self._client, self.config, self._serialize, self._deserialize)
self.activity = ActivityOperations(
self._client, self.config, self._serialize, self._deserialize)
self.module = ModuleOperations(
Expand All @@ -253,7 +254,7 @@ def __init__(
self._client, self.config, self._serialize, self._deserialize)
self.test_job_streams = TestJobStreamsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.test_jobs = TestJobsOperations(
self.test_job = TestJobOperations(
self._client, self.config, self._serialize, self._deserialize)
self.schedule = ScheduleOperations(
self._client, self.config, self._serialize, self._deserialize)
Expand All @@ -271,3 +272,7 @@ def __init__(
self._client, self.config, self._serialize, self._deserialize)
self.source_control_sync_job = SourceControlSyncJobOperations(
self._client, self.config, self._serialize, self._deserialize)
self.job = JobOperations(
self._client, self.config, self._serialize, self._deserialize)
self.job_stream = JobStreamOperations(
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 @@ -54,7 +54,7 @@
from .agent_registration_regenerate_key_parameter import AgentRegistrationRegenerateKeyParameter
from .dsc_configuration_association_property import DscConfigurationAssociationProperty
from .dsc_compilation_job_create_parameters import DscCompilationJobCreateParameters
from .provisioning_state_property import ProvisioningStateProperty
from .job_provisioning_state_property import JobProvisioningStateProperty
from .dsc_compilation_job import DscCompilationJob
from .dsc_configuration_create_or_update_parameters import DscConfigurationCreateOrUpdateParameters
from .dsc_meta_configuration import DscMetaConfiguration
Expand All @@ -75,11 +75,13 @@
from .runbook_association_property import RunbookAssociationProperty
from .job import Job
from .job_create_parameters import JobCreateParameters
from .job_list_result import JobListResult
from .schedule_association_property import ScheduleAssociationProperty
from .job_schedule_create_parameters import JobScheduleCreateParameters
from .job_schedule import JobSchedule
from .job_stream import JobStream
from .job_stream_list_result import JobStreamListResult
from .linked_workspace import LinkedWorkspace
from .module_create_or_update_parameters import ModuleCreateOrUpdateParameters
from .module_update_parameters import ModuleUpdateParameters
from .proxy_resource import ProxyResource
Expand Down Expand Up @@ -121,6 +123,7 @@
from .source_control_sync_job import SourceControlSyncJob
from .source_control_sync_job_by_id_errors import SourceControlSyncJobByIdErrors
from .source_control_sync_job_by_id import SourceControlSyncJobById
from .job_collection_item import JobCollectionItem
from .automation_account_paged import AutomationAccountPaged
from .operation_paged import OperationPaged
from .statistics_paged import StatisticsPaged
Expand All @@ -135,18 +138,18 @@
from .dsc_node_report_paged import DscNodeReportPaged
from .dsc_node_configuration_paged import DscNodeConfigurationPaged
from .hybrid_runbook_worker_group_paged import HybridRunbookWorkerGroupPaged
from .job_paged import JobPaged
from .job_stream_paged import JobStreamPaged
from .job_schedule_paged import JobSchedulePaged
from .activity_paged import ActivityPaged
from .module_paged import ModulePaged
from .type_field_paged import TypeFieldPaged
from .runbook_paged import RunbookPaged
from .job_stream_paged import JobStreamPaged
from .schedule_paged import SchedulePaged
from .variable_paged import VariablePaged
from .webhook_paged import WebhookPaged
from .source_control_paged import SourceControlPaged
from .source_control_sync_job_paged import SourceControlSyncJobPaged
from .job_collection_item_paged import JobCollectionItemPaged
from .automation_client_enums import (
RunbookTypeEnum,
RunbookState,
Expand All @@ -159,6 +162,7 @@
AutomationAccountState,
ScheduleDay,
AgentRegistrationKeyName,
JobProvisioningState,
JobStatus,
JobStreamType,
HttpStatusCode,
Expand Down Expand Up @@ -216,7 +220,7 @@
'AgentRegistrationRegenerateKeyParameter',
'DscConfigurationAssociationProperty',
'DscCompilationJobCreateParameters',
'ProvisioningStateProperty',
'JobProvisioningStateProperty',
'DscCompilationJob',
'DscConfigurationCreateOrUpdateParameters',
'DscMetaConfiguration',
Expand All @@ -237,11 +241,13 @@
'RunbookAssociationProperty',
'Job',
'JobCreateParameters',
'JobListResult',
'ScheduleAssociationProperty',
'JobScheduleCreateParameters',
'JobSchedule',
'JobStream',
'JobStreamListResult',
'LinkedWorkspace',
'ModuleCreateOrUpdateParameters',
'ModuleUpdateParameters',
'ProxyResource',
Expand Down Expand Up @@ -283,6 +289,7 @@
'SourceControlSyncJob',
'SourceControlSyncJobByIdErrors',
'SourceControlSyncJobById',
'JobCollectionItem',
'AutomationAccountPaged',
'OperationPaged',
'StatisticsPaged',
Expand All @@ -297,18 +304,18 @@
'DscNodeReportPaged',
'DscNodeConfigurationPaged',
'HybridRunbookWorkerGroupPaged',
'JobPaged',
'JobStreamPaged',
'JobSchedulePaged',
'ActivityPaged',
'ModulePaged',
'TypeFieldPaged',
'RunbookPaged',
'JobStreamPaged',
'SchedulePaged',
'VariablePaged',
'WebhookPaged',
'SourceControlPaged',
'SourceControlSyncJobPaged',
'JobCollectionItemPaged',
'RunbookTypeEnum',
'RunbookState',
'RunbookProvisioningState',
Expand All @@ -320,6 +327,7 @@
'AutomationAccountState',
'ScheduleDay',
'AgentRegistrationKeyName',
'JobProvisioningState',
'JobStatus',
'JobStreamType',
'HttpStatusCode',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,14 @@ class AgentRegistrationKeyName(Enum):
secondary = "secondary"


class JobProvisioningState(Enum):

failed = "Failed"
succeeded = "Succeeded"
suspended = "Suspended"
processing = "Processing"


class JobStatus(Enum):

new = "New"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class DscCompilationJob(ProxyResource):
:vartype creation_time: datetime
:param provisioning_state: The current provisioning state of the job.
:type provisioning_state:
~azure.mgmt.automation.models.ProvisioningStateProperty
~azure.mgmt.automation.models.JobProvisioningStateProperty
:param run_on: Gets or sets the runOn which specifies the group name where
the job is to be executed.
:type run_on: str
Expand Down Expand Up @@ -83,7 +83,7 @@ class DscCompilationJob(ProxyResource):
'started_by': {'key': 'properties.startedBy', 'type': 'str'},
'job_id': {'key': 'properties.jobId', 'type': 'str'},
'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'},
'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningStateProperty'},
'provisioning_state': {'key': 'properties.provisioningState', 'type': 'JobProvisioningStateProperty'},
'run_on': {'key': 'properties.runOn', 'type': 'str'},
'status': {'key': 'properties.status', 'type': 'str'},
'status_details': {'key': 'properties.statusDetails', 'type': 'str'},
Expand Down
31 changes: 25 additions & 6 deletions azure-mgmt-automation/azure/mgmt/automation/models/job.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,21 @@
# regenerated.
# --------------------------------------------------------------------------

from msrest.serialization import Model
from .proxy_resource import ProxyResource


class Job(Model):
class Job(ProxyResource):
"""Definition of the job.

:param id: Gets or sets the id of the resource.
:type id: str
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 runbook: Gets or sets the runbook.
:type runbook: ~azure.mgmt.automation.models.RunbookAssociationProperty
:param started_by: Gets or sets the job started by.
Expand Down Expand Up @@ -48,10 +55,21 @@ class Job(Model):
:type last_status_modified_time: datetime
:param parameters: Gets or sets the parameters of the job.
:type parameters: dict[str, str]
:param provisioning_state: The provisioning state of a resource.
:type provisioning_state:
~azure.mgmt.automation.models.JobProvisioningStateProperty
"""

_validation = {
'id': {'readonly': True},
'name': {'readonly': True},
'type': {'readonly': True},
}

_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
'runbook': {'key': 'properties.runbook', 'type': 'RunbookAssociationProperty'},
'started_by': {'key': 'properties.startedBy', 'type': 'str'},
'run_on': {'key': 'properties.runOn', 'type': 'str'},
Expand All @@ -65,11 +83,11 @@ class Job(Model):
'last_modified_time': {'key': 'properties.lastModifiedTime', 'type': 'iso-8601'},
'last_status_modified_time': {'key': 'properties.lastStatusModifiedTime', 'type': 'iso-8601'},
'parameters': {'key': 'properties.parameters', 'type': '{str}'},
'provisioning_state': {'key': 'properties.provisioningState', 'type': 'JobProvisioningStateProperty'},
}

def __init__(self, id=None, runbook=None, started_by=None, run_on=None, job_id=None, creation_time=None, status=None, status_details=None, start_time=None, end_time=None, exception=None, last_modified_time=None, last_status_modified_time=None, parameters=None):
def __init__(self, runbook=None, started_by=None, run_on=None, job_id=None, creation_time=None, status=None, status_details=None, start_time=None, end_time=None, exception=None, last_modified_time=None, last_status_modified_time=None, parameters=None, provisioning_state=None):
super(Job, self).__init__()
self.id = id
self.runbook = runbook
self.started_by = started_by
self.run_on = run_on
Expand All @@ -83,3 +101,4 @@ def __init__(self, id=None, runbook=None, started_by=None, run_on=None, job_id=N
self.last_modified_time = last_modified_time
self.last_status_modified_time = last_status_modified_time
self.parameters = parameters
self.provisioning_state = provisioning_state
Loading