Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AutoPR automation/resource-manager] Moved the Publish method from runbookDraft to Runbook. #2839

Closed
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
55 changes: 23 additions & 32 deletions azure-mgmt-automation/azure/mgmt/automation/automation_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,6 @@
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_job_operations import TestJobOperations
from .operations.schedule_operations import ScheduleOperations
from .operations.variable_operations import VariableOperations
from .operations.webhook_operations import WebhookOperations
Expand All @@ -53,6 +49,10 @@
from .operations.dsc_compilation_job_stream_operations import DscCompilationJobStreamOperations
from .operations.dsc_node_configuration_operations import DscNodeConfigurationOperations
from .operations.node_count_information_operations import NodeCountInformationOperations
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 . import models


Expand All @@ -68,21 +68,16 @@ 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, 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 +88,6 @@ def __init__(

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


class AutomationClient(object):
Expand Down Expand Up @@ -136,14 +130,6 @@ class AutomationClient(object):
:vartype object_data_types: azure.mgmt.automation.operations.ObjectDataTypesOperations
:ivar fields: Fields operations
:vartype fields: azure.mgmt.automation.operations.FieldsOperations
:ivar runbook_draft: RunbookDraft operations
:vartype runbook_draft: azure.mgmt.automation.operations.RunbookDraftOperations
:ivar runbook: Runbook operations
: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 schedule: Schedule operations
:vartype schedule: azure.mgmt.automation.operations.ScheduleOperations
:ivar variable: Variable operations
Expand Down Expand Up @@ -182,6 +168,14 @@ class AutomationClient(object):
:vartype dsc_node_configuration: azure.mgmt.automation.operations.DscNodeConfigurationOperations
:ivar node_count_information: NodeCountInformation operations
:vartype node_count_information: azure.mgmt.automation.operations.NodeCountInformationOperations
:ivar runbook_draft: RunbookDraft operations
:vartype runbook_draft: azure.mgmt.automation.operations.RunbookDraftOperations
:ivar runbook: Runbook operations
: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

:param credentials: Credentials needed for the client to connect to Azure.
:type credentials: :mod:`A msrestazure Credentials
Expand All @@ -190,16 +184,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 Expand Up @@ -240,14 +231,6 @@ def __init__(
self._client, self.config, self._serialize, self._deserialize)
self.fields = FieldsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.runbook_draft = RunbookDraftOperations(
self._client, self.config, self._serialize, self._deserialize)
self.runbook = RunbookOperations(
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.schedule = ScheduleOperations(
self._client, self.config, self._serialize, self._deserialize)
self.variable = VariableOperations(
Expand Down Expand Up @@ -286,3 +269,11 @@ def __init__(
self._client, self.config, self._serialize, self._deserialize)
self.node_count_information = NodeCountInformationOperations(
self._client, self.config, self._serialize, self._deserialize)
self.runbook_draft = RunbookDraftOperations(
self._client, self.config, self._serialize, self._deserialize)
self.runbook = RunbookOperations(
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)
76 changes: 38 additions & 38 deletions azure-mgmt-automation/azure/mgmt/automation/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,18 +62,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
from .runbook_create_or_update_parameters import RunbookCreateOrUpdateParameters
from .runbook_update_parameters import RunbookUpdateParameters
from .runbook_draft_undo_edit_result import RunbookDraftUndoEditResult
from .test_job_create_parameters import TestJobCreateParameters
from .test_job import TestJob
from .runbook_create_or_update_draft_properties import RunbookCreateOrUpdateDraftProperties
from .runbook_create_or_update_draft_parameters import RunbookCreateOrUpdateDraftParameters
from .advanced_schedule_monthly_occurrence import AdvancedScheduleMonthlyOccurrence
from .advanced_schedule import AdvancedSchedule
from .schedule_create_or_update_parameters import ScheduleCreateOrUpdateParameters
Expand Down Expand Up @@ -109,6 +97,8 @@
from .source_control_sync_job_by_id import SourceControlSyncJobById
from .source_control_sync_job_stream import SourceControlSyncJobStream
from .source_control_sync_job_stream_by_id import SourceControlSyncJobStreamById
from .job_stream import JobStream
from .job_stream_list_result import JobStreamListResult
from .job import Job
from .job_collection_item import JobCollectionItem
from .job_create_parameters import JobCreateParameters
Expand All @@ -132,6 +122,16 @@
from .node_count_properties import NodeCountProperties
from .node_count import NodeCount
from .node_counts import NodeCounts
from .runbook_parameter import RunbookParameter
from .runbook_draft import RunbookDraft
from .runbook import Runbook
from .runbook_create_or_update_parameters import RunbookCreateOrUpdateParameters
from .runbook_update_parameters import RunbookUpdateParameters
from .runbook_draft_undo_edit_result import RunbookDraftUndoEditResult
from .test_job_create_parameters import TestJobCreateParameters
from .test_job import TestJob
from .runbook_create_or_update_draft_properties import RunbookCreateOrUpdateDraftProperties
from .runbook_create_or_update_draft_parameters import RunbookCreateOrUpdateDraftParameters
from .automation_account_paged import AutomationAccountPaged
from .operation_paged import OperationPaged
from .statistics_paged import StatisticsPaged
Expand All @@ -146,8 +146,6 @@
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
Expand All @@ -156,10 +154,12 @@
from .source_control_sync_job_paged import SourceControlSyncJobPaged
from .source_control_sync_job_stream_paged import SourceControlSyncJobStreamPaged
from .job_collection_item_paged import JobCollectionItemPaged
from .job_stream_paged import JobStreamPaged
from .dsc_node_paged import DscNodePaged
from .dsc_node_report_paged import DscNodeReportPaged
from .dsc_compilation_job_paged import DscCompilationJobPaged
from .dsc_node_configuration_paged import DscNodeConfigurationPaged
from .runbook_paged import RunbookPaged
from .automation_client_enums import (
SkuNameEnum,
AutomationAccountState,
Expand All @@ -170,11 +170,6 @@
DscConfigurationState,
GroupTypeEnum,
ModuleProvisioningState,
JobStreamType,
RunbookTypeEnum,
RunbookState,
RunbookProvisioningState,
HttpStatusCode,
ScheduleDay,
ScheduleFrequency,
OperatingSystemType,
Expand All @@ -184,9 +179,14 @@
ProvisioningState,
StartType,
StreamType,
JobStreamType,
JobStatus,
JobProvisioningState,
AgentRegistrationKeyName,
RunbookTypeEnum,
RunbookState,
RunbookProvisioningState,
HttpStatusCode,
CountType,
)

Expand Down Expand Up @@ -244,18 +244,6 @@
'ModuleCreateOrUpdateParameters',
'ModuleUpdateParameters',
'TypeField',
'JobStream',
'JobStreamListResult',
'RunbookParameter',
'RunbookDraft',
'Runbook',
'RunbookCreateOrUpdateParameters',
'RunbookUpdateParameters',
'RunbookDraftUndoEditResult',
'TestJobCreateParameters',
'TestJob',
'RunbookCreateOrUpdateDraftProperties',
'RunbookCreateOrUpdateDraftParameters',
'AdvancedScheduleMonthlyOccurrence',
'AdvancedSchedule',
'ScheduleCreateOrUpdateParameters',
Expand Down Expand Up @@ -291,6 +279,8 @@
'SourceControlSyncJobById',
'SourceControlSyncJobStream',
'SourceControlSyncJobStreamById',
'JobStream',
'JobStreamListResult',
'Job',
'JobCollectionItem',
'JobCreateParameters',
Expand All @@ -314,6 +304,16 @@
'NodeCountProperties',
'NodeCount',
'NodeCounts',
'RunbookParameter',
'RunbookDraft',
'Runbook',
'RunbookCreateOrUpdateParameters',
'RunbookUpdateParameters',
'RunbookDraftUndoEditResult',
'TestJobCreateParameters',
'TestJob',
'RunbookCreateOrUpdateDraftProperties',
'RunbookCreateOrUpdateDraftParameters',
'AutomationAccountPaged',
'OperationPaged',
'StatisticsPaged',
Expand All @@ -328,8 +328,6 @@
'ActivityPaged',
'ModulePaged',
'TypeFieldPaged',
'RunbookPaged',
'JobStreamPaged',
'SchedulePaged',
'VariablePaged',
'WebhookPaged',
Expand All @@ -338,10 +336,12 @@
'SourceControlSyncJobPaged',
'SourceControlSyncJobStreamPaged',
'JobCollectionItemPaged',
'JobStreamPaged',
'DscNodePaged',
'DscNodeReportPaged',
'DscCompilationJobPaged',
'DscNodeConfigurationPaged',
'RunbookPaged',
'SkuNameEnum',
'AutomationAccountState',
'AutomationKeyName',
Expand All @@ -351,11 +351,6 @@
'DscConfigurationState',
'GroupTypeEnum',
'ModuleProvisioningState',
'JobStreamType',
'RunbookTypeEnum',
'RunbookState',
'RunbookProvisioningState',
'HttpStatusCode',
'ScheduleDay',
'ScheduleFrequency',
'OperatingSystemType',
Expand All @@ -365,8 +360,13 @@
'ProvisioningState',
'StartType',
'StreamType',
'JobStreamType',
'JobStatus',
'JobProvisioningState',
'AgentRegistrationKeyName',
'RunbookTypeEnum',
'RunbookState',
'RunbookProvisioningState',
'HttpStatusCode',
'CountType',
]
Loading