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] Correcting the NodeConfiguration Model and Example #2397

Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,6 @@
from .source_control_sync_job_by_id import SourceControlSyncJobById
from .dsc_node import DscNode
from .dsc_node_configuration import DscNodeConfiguration
from .dsc_node_configuration_create_or_update_parameters_properties import DscNodeConfigurationCreateOrUpdateParametersProperties
from .automation_account_paged import AutomationAccountPaged
from .operation_paged import OperationPaged
from .statistics_paged import StatisticsPaged
Expand Down Expand Up @@ -304,7 +303,6 @@
'SourceControlSyncJobById',
'DscNode',
'DscNodeConfiguration',
'DscNodeConfigurationCreateOrUpdateParametersProperties',
'AutomationAccountPaged',
'OperationPaged',
'StatisticsPaged',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,32 +18,57 @@ class DscNodeConfigurationCreateOrUpdateParameters(Model):

:param source: Gets or sets the source.
:type source: ~azure.mgmt.automation.models.ContentSource
:param name: Gets or sets the type of the parameter.
:param name: Name of the node configuration.
:type name: str
:param configuration: Gets or sets the configuration of the node.
:type configuration:
~azure.mgmt.automation.models.DscConfigurationAssociationProperty
:param new_node_configuration_build_version_required: If a new build
version of NodeConfiguration is required.
:type new_node_configuration_build_version_required: bool
:param source1: Gets or sets the source.
:type source1: ~azure.mgmt.automation.models.ContentSource
:param name1: Gets or sets the type of the parameter.
:type name1: str
:param configuration1: Gets or sets the configuration of the node.
:type configuration1:
~azure.mgmt.automation.models.DscConfigurationAssociationProperty
:param increment_node_configuration_build: If a new build version of
NodeConfiguration is required.
:type increment_node_configuration_build: bool
:param tags: Gets or sets the tags attached to the resource.
:type tags: dict[str, str]
"""

_validation = {
'source': {'required': True},
'name': {'required': True},
'configuration': {'required': True},
'source1': {'required': True},
'name1': {'required': True},
'configuration1': {'required': True},
}

_attribute_map = {
'source': {'key': 'source', 'type': 'ContentSource'},
'name': {'key': 'name', 'type': 'str'},
'configuration': {'key': 'configuration', 'type': 'DscConfigurationAssociationProperty'},
'new_node_configuration_build_version_required': {'key': 'newNodeConfigurationBuildVersionRequired', 'type': 'bool'},
'source1': {'key': 'properties.source', 'type': 'ContentSource'},
'name1': {'key': 'properties.name', 'type': 'str'},
'configuration1': {'key': 'properties.configuration', 'type': 'DscConfigurationAssociationProperty'},
'increment_node_configuration_build': {'key': 'properties.incrementNodeConfigurationBuild', 'type': 'bool'},
'tags': {'key': 'tags', 'type': '{str}'},
}

def __init__(self, source, name, configuration, new_node_configuration_build_version_required=None):
def __init__(self, source, name, configuration, source1, name1, configuration1, new_node_configuration_build_version_required=None, increment_node_configuration_build=None, tags=None):
super(DscNodeConfigurationCreateOrUpdateParameters, self).__init__()
self.source = source
self.name = name
self.configuration = configuration
self.new_node_configuration_build_version_required = new_node_configuration_build_version_required
self.source1 = source1
self.name1 = name1
self.configuration1 = configuration1
self.increment_node_configuration_build = increment_node_configuration_build
self.tags = tags

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ def _create_or_update_initial(
header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')

# Construct body
body_content = self._serialize.body(parameters, 'DscNodeConfigurationCreateOrUpdateParametersProperties')
body_content = self._serialize.body(parameters, 'DscNodeConfigurationCreateOrUpdateParameters')

# Construct and send request
request = self._client.put(url, query_parameters)
Expand Down Expand Up @@ -219,7 +219,7 @@ def create_or_update(
:type node_configuration_name: str
:param parameters: The create or update parameters for configuration.
:type parameters:
~azure.mgmt.automation.models.DscNodeConfigurationCreateOrUpdateParametersProperties
~azure.mgmt.automation.models.DscNodeConfigurationCreateOrUpdateParameters
:param dict custom_headers: headers that will be added to the request
:param bool raw: returns the direct response alongside the
deserialized response
Expand Down