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
25 changes: 15 additions & 10 deletions azure-mgmt-automation/azure/mgmt/automation/automation_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@
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.activity_operations import ActivityOperations
from .operations.module_operations import ModuleOperations
Expand All @@ -38,6 +36,7 @@
from .operations.runbook_draft_operations import RunbookDraftOperations
from .operations.runbook_operations import RunbookOperations
from .operations.test_job_streams_operations import TestJobStreamsOperations
from .operations.test_job_operations import TestJobOperations
from .operations.test_jobs_operations import TestJobsOperations
from .operations.schedule_operations import ScheduleOperations
from .operations.variable_operations import VariableOperations
Expand All @@ -47,6 +46,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 @@ -133,10 +134,6 @@ 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 activity: Activity operations
Expand All @@ -153,6 +150,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_job: TestJob operations
:vartype test_job: azure.mgmt.automation.operations.TestJobOperations
:ivar test_jobs: TestJobs operations
:vartype test_jobs: azure.mgmt.automation.operations.TestJobsOperations
:ivar schedule: Schedule operations
Expand All @@ -171,6 +170,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 @@ -228,10 +231,6 @@ 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.activity = ActivityOperations(
Expand All @@ -248,6 +247,8 @@ 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_job = TestJobOperations(
self._client, self.config, self._serialize, self._deserialize)
self.test_jobs = TestJobsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.schedule = ScheduleOperations(
Expand All @@ -266,3 +267,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)
16 changes: 12 additions & 4 deletions azure-mgmt-automation/azure/mgmt/automation/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,14 +72,17 @@
from .hybrid_runbook_worker_group import HybridRunbookWorkerGroup
from .hybrid_runbook_worker_group_update_parameters import HybridRunbookWorkerGroupUpdateParameters
from .runbook_association_property import RunbookAssociationProperty
from .provisioning_state_property import ProvisioningStateProperty
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 .module_create_or_update_parameters import ModuleCreateOrUpdateParameters
from .module_update_parameters import ModuleUpdateParameters
from .proxy_resource import ProxyResource
from .runbook_draft_undo_edit_result import RunbookDraftUndoEditResult
from .runbook_create_or_update_parameters import RunbookCreateOrUpdateParameters
from .runbook_create_or_update_draft_properties import RunbookCreateOrUpdateDraftProperties
Expand Down Expand Up @@ -118,6 +121,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 @@ -132,18 +136,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 Down Expand Up @@ -231,14 +235,17 @@
'HybridRunbookWorkerGroup',
'HybridRunbookWorkerGroupUpdateParameters',
'RunbookAssociationProperty',
'ProvisioningStateProperty',
'Job',
'JobCreateParameters',
'JobListResult',
'ScheduleAssociationProperty',
'JobScheduleCreateParameters',
'JobSchedule',
'JobStream',
'ModuleCreateOrUpdateParameters',
'ModuleUpdateParameters',
'ProxyResource',
'RunbookDraftUndoEditResult',
'RunbookCreateOrUpdateParameters',
'RunbookCreateOrUpdateDraftProperties',
Expand Down Expand Up @@ -277,6 +284,7 @@
'SourceControlSyncJob',
'SourceControlSyncJobByIdErrors',
'SourceControlSyncJobById',
'JobCollectionItem',
'AutomationAccountPaged',
'OperationPaged',
'StatisticsPaged',
Expand All @@ -291,18 +299,18 @@
'DscNodeReportPaged',
'DscNodeConfigurationPaged',
'HybridRunbookWorkerGroupPaged',
'JobPaged',
'JobStreamPaged',
'JobSchedulePaged',
'ActivityPaged',
'ModulePaged',
'TypeFieldPaged',
'RunbookPaged',
'JobStreamPaged',
'SchedulePaged',
'VariablePaged',
'WebhookPaged',
'SourceControlPaged',
'SourceControlSyncJobPaged',
'JobCollectionItemPaged',
'RunbookTypeEnum',
'RunbookState',
'RunbookProvisioningState',
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.ProvisioningStateProperty
"""

_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': 'ProvisioningStateProperty'},
}

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
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
# 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 .proxy_resource import ProxyResource


class JobCollectionItem(ProxyResource):
"""Job collection item properties.

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: The runbook association.
:type runbook: ~azure.mgmt.automation.models.RunbookAssociationProperty
:param job_id: The id of the job.
:type job_id: str
:param creation_time: The creation time of the job.
:type creation_time: datetime
:param status: The status of the job. Possible values include: 'New',
'Activating', 'Running', 'Completed', 'Failed', 'Stopped', 'Blocked',
'Suspended', 'Disconnected', 'Suspending', 'Stopping', 'Resuming',
'Removing'
:type status: str or ~azure.mgmt.automation.models.JobStatus
:param start_time: The start time of the job.
:type start_time: datetime
:param end_time: The end time of the job.
:type end_time: datetime
:param last_modified_time: The last modified time of the job.
:type last_modified_time: datetime
:param provisioning_state: The current provisioning state of the job.
:type provisioning_state:
~azure.mgmt.automation.models.ProvisioningStateProperty
"""

_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'},
'job_id': {'key': 'properties.jobId', 'type': 'str'},
'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'},
'status': {'key': 'properties.status', 'type': 'str'},
'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'},
'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'},
'last_modified_time': {'key': 'properties.lastModifiedTime', 'type': 'iso-8601'},
'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningStateProperty'},
}

def __init__(self, runbook=None, job_id=None, creation_time=None, status=None, start_time=None, end_time=None, last_modified_time=None, provisioning_state=None):
super(JobCollectionItem, self).__init__()
self.runbook = runbook
self.job_id = job_id
self.creation_time = creation_time
self.status = status
self.start_time = start_time
self.end_time = end_time
self.last_modified_time = last_modified_time
self.provisioning_state = provisioning_state
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,16 @@
from msrest.paging import Paged


class JobPaged(Paged):
class JobCollectionItemPaged(Paged):
"""
A paging container for iterating over a list of :class:`Job <azure.mgmt.automation.models.Job>` object
A paging container for iterating over a list of :class:`JobCollectionItem <azure.mgmt.automation.models.JobCollectionItem>` object
"""

_attribute_map = {
'next_link': {'key': 'nextLink', 'type': 'str'},
'current_page': {'key': 'value', 'type': '[Job]'}
'current_page': {'key': 'value', 'type': '[JobCollectionItem]'}
}

def __init__(self, *args, **kwargs):

super(JobPaged, self).__init__(*args, **kwargs)
super(JobCollectionItemPaged, self).__init__(*args, **kwargs)
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,6 @@ class JobCreateParameters(Model):
:param run_on: Gets or sets the runOn which specifies the group name where
the job is to be executed.
:type run_on: str
:param name: Gets or sets name of the resource.
:type name: str
:param location: Gets or sets the location of the resource.
:type location: str
:param tags: Gets or sets the tags attached to the resource.
:type tags: dict[str, str]
"""

_validation = {
Expand All @@ -38,16 +32,10 @@ class JobCreateParameters(Model):
'runbook': {'key': 'properties.runbook', 'type': 'RunbookAssociationProperty'},
'parameters': {'key': 'properties.parameters', 'type': '{str}'},
'run_on': {'key': 'properties.runOn', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'location': {'key': 'location', 'type': 'str'},
'tags': {'key': 'tags', 'type': '{str}'},
}

def __init__(self, runbook, parameters=None, run_on=None, name=None, location=None, tags=None):
def __init__(self, runbook, parameters=None, run_on=None):
super(JobCreateParameters, self).__init__()
self.runbook = runbook
self.parameters = parameters
self.run_on = run_on
self.name = name
self.location = location
self.tags = tags
Loading