From ed80b6e675b50eaab2caf22a2c2226a10b288a18 Mon Sep 17 00:00:00 2001 From: Varad Meru Date: Wed, 25 Apr 2018 16:35:21 -0700 Subject: [PATCH 1/2] Refacroting DSCNodeConfigurationCreate Parameters --- .../stable/2015-10-31/definitions.json | 26 ------- .../2015-10-31/dscNodeConfiguration.json | 74 ++++++++++++++++++- .../2018-01-15/dscNodeConfiguration.json | 11 ++- .../createOrUpdateDscNodeConfiguration.json | 2 - 4 files changed, 78 insertions(+), 35 deletions(-) diff --git a/specification/automation/resource-manager/Microsoft.Automation/stable/2015-10-31/definitions.json b/specification/automation/resource-manager/Microsoft.Automation/stable/2015-10-31/definitions.json index b2e4b2c088e7..94ff2b49730d 100644 --- a/specification/automation/resource-manager/Microsoft.Automation/stable/2015-10-31/definitions.json +++ b/specification/automation/resource-manager/Microsoft.Automation/stable/2015-10-31/definitions.json @@ -1482,32 +1482,6 @@ }, "description": "Definition of the DSC Meta Configuration." }, - "DscNodeConfigurationCreateOrUpdateParameters": { - "properties": { - "source": { - "$ref": "#/definitions/ContentSource", - "description": "Gets or sets the source." - }, - "name": { - "type": "string", - "description": "Name of the node configuration." - }, - "configuration": { - "$ref": "#/definitions/DscConfigurationAssociationProperty", - "description": "Gets or sets the configuration of the node." - }, - "newNodeConfigurationBuildVersionRequired": { - "type": "boolean", - "description": "If a new build version of NodeConfiguration is required." - } - }, - "required": [ - "source", - "name", - "configuration" - ], - "description": "The parameters supplied to the create or update node configuration operation." - }, "DscNodeConfigurationAssociationProperty": { "properties": { "name": { diff --git a/specification/automation/resource-manager/Microsoft.Automation/stable/2015-10-31/dscNodeConfiguration.json b/specification/automation/resource-manager/Microsoft.Automation/stable/2015-10-31/dscNodeConfiguration.json index 3fb7502d0b2c..bab1fbb565d2 100644 --- a/specification/automation/resource-manager/Microsoft.Automation/stable/2015-10-31/dscNodeConfiguration.json +++ b/specification/automation/resource-manager/Microsoft.Automation/stable/2015-10-31/dscNodeConfiguration.json @@ -179,7 +179,7 @@ "in": "body", "required": true, "schema": { - "$ref": "./definitions.json#/definitions/DscNodeConfigurationCreateOrUpdateParameters" + "$ref": "#/definitions/DscNodeConfigurationCreateOrUpdateParameters" }, "description": "The create or update parameters for configuration." }, @@ -293,6 +293,78 @@ ], "description": "Definition of the dsc node configuration." }, + "ContentSource": { + "properties": { + "hash": { + "$ref": "#/definitions/ContentHash", + "description": "Gets or sets the hash." + }, + "type": { + "type": "string", + "description": "Gets or sets the content source type.", + "enum": [ + "embeddedContent", + "uri" + ], + "x-ms-enum": { + "name": "ContentSourceType", + "modelAsString": true + } + }, + "value": { + "type": "string", + "description": "Gets or sets the value of the content. This is based on the content source type." + }, + "version": { + "type": "string", + "description": "Gets or sets the version of the content." + } + }, + "description": "Definition of the content source." + }, + "ContentHash": { + "properties": { + "algorithm": { + "type": "string", + "description": "Gets or sets the content hash algorithm used to hash the content." + }, + "value": { + "type": "string", + "description": "Gets or sets expected hash value of the content." + } + }, + "required": [ + "algorithm", + "value" + ], + "description": "Definition of the runbook property type." + }, + "DscNodeConfigurationCreateOrUpdateParameters": { + "properties": { + "source": { + "$ref": "#/definitions/ContentSource", + "description": "Gets or sets the source." + }, + "name": { + "type": "string", + "description": "Name of the node configuration." + }, + "configuration": { + "$ref": "./definitions.json#/definitions/DscConfigurationAssociationProperty", + "description": "Gets or sets the configuration of the node." + }, + "incrementNodeConfigurationBuild": { + "type": "boolean", + "description": "If a new build version of NodeConfiguration is required." + } + }, + "required": [ + "source", + "name", + "configuration" + ], + "description": "The parameters supplied to the create or update node configuration operation." + }, "DscNodeConfigurationListResult": { "properties": { "value": { diff --git a/specification/automation/resource-manager/Microsoft.Automation/stable/2018-01-15/dscNodeConfiguration.json b/specification/automation/resource-manager/Microsoft.Automation/stable/2018-01-15/dscNodeConfiguration.json index 660aadaf3ed4..75c28cb4d4be 100644 --- a/specification/automation/resource-manager/Microsoft.Automation/stable/2018-01-15/dscNodeConfiguration.json +++ b/specification/automation/resource-manager/Microsoft.Automation/stable/2018-01-15/dscNodeConfiguration.json @@ -121,6 +121,9 @@ ], "responses": { "200": { + "description": "OK" + }, + "201": { "description": "OK", "schema": { "$ref": "#/definitions/DscNodeConfiguration" @@ -413,6 +416,7 @@ "description": "The dsc extensionHandler property associated with the node" }, "DscNodeConfigurationCreateOrUpdateParameters": { + "description": "The parameters supplied to the create or update node configuration operation.", "properties": { "properties": { "$ref": "#/definitions/DscNodeConfigurationCreateOrUpdateParametersProperties", @@ -438,10 +442,6 @@ "$ref": "#/definitions/ContentSource", "description": "Gets or sets the source." }, - "name": { - "type": "string", - "description": "Gets or sets the type of the parameter." - }, "configuration": { "$ref": "#/definitions/DscConfigurationAssociationProperty", "description": "Gets or sets the configuration of the node." @@ -453,10 +453,9 @@ }, "required": [ "source", - "name", "configuration" ], - "description": "The parameters supplied to the create or update node configuration operation." + "description": "The parameter properties supplied to the create or update node configuration operation." }, "DscConfigurationAssociationProperty": { "properties": { diff --git a/specification/automation/resource-manager/Microsoft.Automation/stable/2018-01-15/examples/createOrUpdateDscNodeConfiguration.json b/specification/automation/resource-manager/Microsoft.Automation/stable/2018-01-15/examples/createOrUpdateDscNodeConfiguration.json index fd1fc0bc04ce..dba9edaf7e53 100644 --- a/specification/automation/resource-manager/Microsoft.Automation/stable/2018-01-15/examples/createOrUpdateDscNodeConfiguration.json +++ b/specification/automation/resource-manager/Microsoft.Automation/stable/2018-01-15/examples/createOrUpdateDscNodeConfiguration.json @@ -3,7 +3,6 @@ "subscriptionId": "subid", "resourceGroupName": "rg", "automationAccountName": "myAutomationAccount20", - "credentialName": "myCredential", "api-version": "2018-01-15", "nodeConfigurationName": "configName.nodeConfigName", "parameters": { @@ -19,7 +18,6 @@ "version": "1.0" }, "incrementNodeConfigurationBuild": true, - "name": "configName.nodeConfigName", "configuration": { "name": "configName" } From cde3c011f6c80daa1c0716b1feac43eabca04091 Mon Sep 17 00:00:00 2001 From: Varad Meru Date: Tue, 8 May 2018 14:57:44 -0700 Subject: [PATCH 2/2] Fix the return model for Get NodeConfig call --- .../stable/2018-01-15/dscNodeConfiguration.json | 3 --- 1 file changed, 3 deletions(-) diff --git a/specification/automation/resource-manager/Microsoft.Automation/stable/2018-01-15/dscNodeConfiguration.json b/specification/automation/resource-manager/Microsoft.Automation/stable/2018-01-15/dscNodeConfiguration.json index 75c28cb4d4be..394d5162eb92 100644 --- a/specification/automation/resource-manager/Microsoft.Automation/stable/2018-01-15/dscNodeConfiguration.json +++ b/specification/automation/resource-manager/Microsoft.Automation/stable/2018-01-15/dscNodeConfiguration.json @@ -121,9 +121,6 @@ ], "responses": { "200": { - "description": "OK" - }, - "201": { "description": "OK", "schema": { "$ref": "#/definitions/DscNodeConfiguration"