Skip to content
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
3 changes: 1 addition & 2 deletions src/devcenter/azext_devcenter/manual/_help.py
Original file line number Diff line number Diff line change
Expand Up @@ -1439,8 +1439,7 @@
- name: Schedules_CreateDailyShutdownPoolSchedule
text: |-
az devcenter admin schedule create --state "Enabled" --time "17:30" --time-zone "America/Los_Angeles" \
--pool-name "DevPool" --project-name "DevProject" --resource-group "rg1" --frequency Daily \
--schedule-type StopDevBox
--pool-name "DevPool" --project-name "DevProject" --resource-group "rg1"
"""

helps[
Expand Down
22 changes: 0 additions & 22 deletions src/devcenter/azext_devcenter/manual/_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -2285,18 +2285,6 @@ def load_arguments(self, _):
type=str,
help="Name of the pool.",
)
c.argument(
"schedule_type",
required=True,
arg_type=get_enum_type(["StopDevBox"]),
help="The type of schedule.",
)
c.argument(
"frequency",
required=True,
arg_type=get_enum_type(["Daily"]),
help="The frequency the schedule will execute.",
)
c.argument(
"time",
required=True,
Expand Down Expand Up @@ -2331,16 +2319,6 @@ def load_arguments(self, _):
help="Name of the pool.",
id_part="child_name_1",
)
c.argument(
"schedule_type",
arg_type=get_enum_type(["StopDevBox"]),
help="The type of schedule.",
)
c.argument(
"frequency",
arg_type=get_enum_type(["Daily"]),
help="The frequency the schedule will execute.",
)
c.argument(
"time",
type=str,
Expand Down
14 changes: 4 additions & 10 deletions src/devcenter/azext_devcenter/manual/custom.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,16 +227,14 @@ def devcenter_schedule_create(
resource_group_name,
project_name,
pool_name,
schedule_type,
frequency,
time=None,
time_zone=None,
state=None,
no_wait=False,
):
body = {}
body["type_properties_type"] = schedule_type # "StopDevBox"
body["frequency"] = frequency # "Daily"
body["type_properties_type"] = "StopDevBox"
body["frequency"] = "Daily"
if time is not None:
body["time"] = time
if time_zone is not None:
Expand All @@ -259,18 +257,14 @@ def devcenter_schedule_update(
resource_group_name,
project_name,
pool_name,
schedule_type=None,
frequency=None,
time=None,
time_zone=None,
state=None,
no_wait=False,
):
body = {}
if schedule_type is not None:
body["type_properties_type"] = schedule_type # "StopDevBox"
if frequency is not None:
body["frequency"] = frequency # "Daily"
body["type_properties_type"] = "StopDevBox"
body["frequency"] = "Daily"
if time is not None:
body["time"] = time
if time_zone is not None:
Expand Down
Binary file not shown.