@@ -164,7 +164,7 @@ public Model.AgentRegistration NewAgentRegistrationKey(
164
164
165
165
#region compilationjob
166
166
167
- public Model . DscCompilationJob GetCompilationJob ( string resourceGroupName , string automationAccountName , Guid Id )
167
+ public Model . CompilationJob GetCompilationJob ( string resourceGroupName , string automationAccountName , Guid Id )
168
168
{
169
169
using ( var request = new RequestSettings ( this . automationManagementClient ) )
170
170
{
@@ -175,11 +175,11 @@ public Model.DscCompilationJob GetCompilationJob(string resourceGroupName, strin
175
175
string . Format ( CultureInfo . CurrentCulture , Resources . CompilationJobNotFound , Id ) ) ;
176
176
}
177
177
178
- return new Model . DscCompilationJob ( automationAccountName , job ) ;
178
+ return new Model . CompilationJob ( automationAccountName , job ) ;
179
179
}
180
180
}
181
181
182
- public IEnumerable < Model . DscCompilationJob > ListCompilationJobsByConfigurationName ( string resourceGroupName , string automationAccountName , string configurationName , DateTimeOffset ? startTime , DateTimeOffset ? endTime , string jobStatus )
182
+ public IEnumerable < Model . CompilationJob > ListCompilationJobsByConfigurationName ( string resourceGroupName , string automationAccountName , string configurationName , DateTimeOffset ? startTime , DateTimeOffset ? endTime , string jobStatus )
183
183
{
184
184
using ( var request = new RequestSettings ( this . automationManagementClient ) )
185
185
{
@@ -257,11 +257,11 @@ public Model.DscCompilationJob GetCompilationJob(string resourceGroupName, strin
257
257
} ) ;
258
258
}
259
259
260
- return jobModels . Select ( jobModel => new Commands . Automation . Model . DscCompilationJob ( automationAccountName , jobModel ) ) ;
260
+ return jobModels . Select ( jobModel => new Commands . Automation . Model . CompilationJob ( automationAccountName , jobModel ) ) ;
261
261
}
262
262
}
263
263
264
- public IEnumerable < Model . DscCompilationJob > ListCompilationJobs ( string resourceGroupName , string automationAccountName , DateTimeOffset ? startTime , DateTimeOffset ? endTime , string jobStatus )
264
+ public IEnumerable < Model . CompilationJob > ListCompilationJobs ( string resourceGroupName , string automationAccountName , DateTimeOffset ? startTime , DateTimeOffset ? endTime , string jobStatus )
265
265
{
266
266
using ( var request = new RequestSettings ( this . automationManagementClient ) )
267
267
{
@@ -332,11 +332,11 @@ public Model.DscCompilationJob GetCompilationJob(string resourceGroupName, strin
332
332
} ) ;
333
333
}
334
334
335
- return jobModels . Select ( jobModel => new Model . DscCompilationJob ( automationAccountName , jobModel ) ) ;
335
+ return jobModels . Select ( jobModel => new Model . CompilationJob ( automationAccountName , jobModel ) ) ;
336
336
}
337
337
}
338
338
339
- public Model . DscCompilationJob StartCompilationJob ( string resourceGroupName , string automationAccountName , string configurationName , IDictionary parameters )
339
+ public Model . CompilationJob StartCompilationJob ( string resourceGroupName , string automationAccountName , string configurationName , IDictionary parameters )
340
340
{
341
341
using ( var request = new RequestSettings ( this . automationManagementClient ) )
342
342
{
@@ -354,7 +354,7 @@ public Model.DscCompilationJob StartCompilationJob(string resourceGroupName, str
354
354
355
355
var job = this . automationManagementClient . CompilationJobs . Create ( resourceGroupName , automationAccountName , createJobParameters ) ;
356
356
357
- return new Model . DscCompilationJob ( automationAccountName , job . DscCompilationJob ) ;
357
+ return new Model . CompilationJob ( automationAccountName , job . DscCompilationJob ) ;
358
358
}
359
359
}
360
360
@@ -381,6 +381,70 @@ public Model.DscCompilationJob StartCompilationJob(string resourceGroupName, str
381
381
382
382
#endregion
383
383
384
+ #region node configuration
385
+ public Model . NodeConfiguration GetNodeConfiguration ( string resourceGroupName , string automationAccountName , string nodeConfigurationName )
386
+ {
387
+ using ( var request = new RequestSettings ( this . automationManagementClient ) )
388
+ {
389
+ var nodeConfiguration = this . automationManagementClient . NodeConfigurations . Get ( resourceGroupName , automationAccountName , nodeConfigurationName ) . NodeConfiguration ;
390
+ if ( nodeConfiguration == null )
391
+ {
392
+ throw new ResourceNotFoundException ( typeof ( NodeConfiguration ) ,
393
+ string . Format ( CultureInfo . CurrentCulture , Resources . NodeConfigurationNotFound , nodeConfigurationName ) ) ;
394
+ }
395
+
396
+ return new Model . NodeConfiguration ( automationAccountName , nodeConfiguration ) ;
397
+ }
398
+ }
399
+
400
+ public IEnumerable < Model . NodeConfiguration > ListNodeConfigurationsByConfigurationName ( string resourceGroupName , string automationAccountName , string configurationName )
401
+ {
402
+ using ( var request = new RequestSettings ( this . automationManagementClient ) )
403
+ {
404
+ IEnumerable < AutomationManagement . Models . DscNodeConfiguration > nodeConfigModels ;
405
+
406
+ nodeConfigModels = AutomationManagementClient . ContinuationTokenHandler (
407
+ skipToken =>
408
+ {
409
+ var response = this . automationManagementClient . NodeConfigurations . List (
410
+ resourceGroupName ,
411
+ automationAccountName ,
412
+ new AutomationManagement . Models . DscNodeConfigurationListParameters
413
+ {
414
+ ConfigurationName = configurationName
415
+ } ) ;
416
+ return new ResponseWithSkipToken < AutomationManagement . Models . DscNodeConfiguration > ( response , response . DscNodeConfigurations ) ;
417
+ } ) ;
418
+
419
+
420
+ return nodeConfigModels . Select ( nodeConfigModel => new Commands . Automation . Model . NodeConfiguration ( automationAccountName , nodeConfigModel ) ) ;
421
+ }
422
+ }
423
+
424
+ public IEnumerable < Model . NodeConfiguration > ListNodeConfigurations ( string resourceGroupName , string automationAccountName )
425
+ {
426
+ using ( var request = new RequestSettings ( this . automationManagementClient ) )
427
+ {
428
+ IEnumerable < AutomationManagement . Models . DscNodeConfiguration > nodeConfigModels ;
429
+
430
+ nodeConfigModels = AutomationManagementClient . ContinuationTokenHandler (
431
+ skipToken =>
432
+ {
433
+ var response = this . automationManagementClient . NodeConfigurations . List (
434
+ resourceGroupName ,
435
+ automationAccountName ,
436
+ new AutomationManagement . Models . DscNodeConfigurationListParameters ( ) ) ;
437
+
438
+ return new ResponseWithSkipToken < AutomationManagement . Models . DscNodeConfiguration > ( response , response . DscNodeConfigurations ) ;
439
+ } ) ;
440
+
441
+
442
+ return nodeConfigModels . Select ( nodeConfigModel => new Model . NodeConfiguration ( automationAccountName , nodeConfigModel ) ) ;
443
+ }
444
+ }
445
+
446
+ #endregion
447
+
384
448
#region privatemethods
385
449
386
450
private string FormatDateTime ( DateTimeOffset dateTime )
0 commit comments