win_scheduled_task_stat: correctly return values from nested com values (#34671)

pull/34673/head
Jordan Borean 7 years ago committed by GitHub
parent a0e96efec7
commit ef48448e4a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -76,7 +76,7 @@ Function Get-PropertyValue($task_property, $com, $property) {
$com_values = @{} $com_values = @{}
$properties = Get-Member -InputObject $raw_value -MemberType Property | % { $properties = Get-Member -InputObject $raw_value -MemberType Property | % {
$com_value = Get-PropertyValue -task_property $property -com $raw_value -property $_.Name $com_value = Get-PropertyValue -task_property $property -com $raw_value -property $_.Name
$com_values.$property = $com_value $com_values.$($_.Name) = $com_value
} }
return ,$com_values return ,$com_values
@ -318,3 +318,4 @@ if ($name -ne $null) {
$result = Convert-DictToSnakeCase -dict $result $result = Convert-DictToSnakeCase -dict $result
Exit-Json -obj $result Exit-Json -obj $result

@ -219,7 +219,10 @@ settings:
returned: '' returned: ''
type: dictionary type: dictionary
sample: { sample: {
"idle_settings": "PT1H" "idle_duration": "PT10M",
"restart_on_idle": false,
"stop_on_idle_end": true,
"wait_timeout": "PT1H"
} }
maintenance_settings: maintenance_settings:
description: The maintenance settings of the task. description: The maintenance settings of the task.
@ -237,7 +240,8 @@ settings:
returned: '' returned: ''
type: dictionary type: dictionary
sample: { sample: {
"network_settings": null "id": null,
"name": null
} }
priority: priority:
description: The priority level of the task. description: The priority level of the task.
@ -343,7 +347,9 @@ triggers:
"execution_time_limit": null, "execution_time_limit": null,
"id": null, "id": null,
"repetition": { "repetition": {
"repetition": false "duration": null,
"interval": null,
"stop_at_duration_end": false
}, },
"start_boundary": null, "start_boundary": null,
"type": "TASK_TRIGGER_BOOT" "type": "TASK_TRIGGER_BOOT"
@ -357,7 +363,9 @@ triggers:
"months_of_year": "june,december", "months_of_year": "june,december",
"random_delay": null, "random_delay": null,
"repetition": { "repetition": {
"repetition": false "duration": null,
"interval": null,
"stop_at_duration_end": false
}, },
"run_on_last_day_of_month": true, "run_on_last_day_of_month": true,
"start_boundary": "2017-09-20T03:44:38", "start_boundary": "2017-09-20T03:44:38",

@ -114,11 +114,17 @@
- stat_task_present.triggers|count == 2 - stat_task_present.triggers|count == 2
- stat_task_present.triggers[0].delay == "PT15M" - stat_task_present.triggers[0].delay == "PT15M"
- stat_task_present.triggers[0].type == "TASK_TRIGGER_BOOT" - stat_task_present.triggers[0].type == "TASK_TRIGGER_BOOT"
- stat_task_present.triggers[0].repetition.stop_at_duration_end == False
- stat_task_present.triggers[0].repetition.duration == None
- stat_task_present.triggers[0].repetition.interval == None
- stat_task_present.triggers[1].days_of_month == "5,15,30" - stat_task_present.triggers[1].days_of_month == "5,15,30"
- stat_task_present.triggers[1].months_of_year == "june,december" - stat_task_present.triggers[1].months_of_year == "june,december"
- stat_task_present.triggers[1].run_on_last_day_of_month == True - stat_task_present.triggers[1].run_on_last_day_of_month == True
- stat_task_present.triggers[1].start_boundary == "2017-09-20T03:44:38" - stat_task_present.triggers[1].start_boundary == "2017-09-20T03:44:38"
- stat_task_present.triggers[1].type == "TASK_TRIGGER_MONTHLY" - stat_task_present.triggers[1].type == "TASK_TRIGGER_MONTHLY"
- stat_task_present.triggers[1].repetition.stop_at_duration_end == False
- stat_task_present.triggers[1].repetition.duration == None
- stat_task_present.triggers[1].repetition.interval == None
- name: change principal to system account so it will run in the next step - name: change principal to system account so it will run in the next step
win_scheduled_task: win_scheduled_task:

Loading…
Cancel
Save