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
9 changes: 2 additions & 7 deletions src/devcenter/azext_devcenter/_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -261,12 +261,6 @@ def load_arguments(self, _):
type=str,
help="The name of the dev box pool this machine belongs to.",
)
c.argument(
"local_administrator",
arg_type=get_enum_type(["Enabled", "Disabled"]),
help="Indicates whether the "
"owner of the Dev Box is a local administrator.",
)

with self.argument_context("devcenter dev dev-box delete") as c:
c.argument(
Expand Down Expand Up @@ -1502,7 +1496,8 @@ def load_arguments(self, _):
arg_type=endpoint,
)
c.argument("catalog_name", type=str, help="The name of the catalog")
c.argument("task_name", type=str, help="The name of the task")
c.argument("task_name", options_list=["-n", "--name", "--task-name"],
type=str, help="The name of the task")

with self.argument_context("devcenter dev customization-task list") as c:
c.argument(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

from azure.cli.core.aaz import *
import json
from ......utils import clear_running_line

@register_command(
"devcenter dev customization-task validate",
Expand Down Expand Up @@ -196,6 +197,7 @@ def query_parameters(self):

def on_200(self, session):
data = self.deserialize_http_content(session)
clear_running_line()
print(json.dumps(data, indent=2))


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
# flake8: noqa

from azure.cli.core.aaz import *

import json
from ......utils import clear_running_line

@register_command(
"devcenter dev dev-box repair",
Expand Down Expand Up @@ -183,7 +184,9 @@ def query_parameters(self):
return parameters

def on_200(self, session):
pass
data = self.deserialize_http_content(session)
clear_running_line()
print(json.dumps(data, indent=2))


class _RepairHelper:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
# flake8: noqa

from azure.cli.core.aaz import *

import json
from ......utils import clear_running_line

@register_command(
"devcenter dev dev-box restore-snapshot",
Expand Down Expand Up @@ -192,7 +193,9 @@ def query_parameters(self):
return parameters

def on_200(self, session):
pass
data = self.deserialize_http_content(session)
clear_running_line()
print(json.dumps(data, indent=2))


class _RestoreSnapshotHelper:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,11 +102,13 @@ def _build_arguments_schema(cls, *args, **kwargs):
options=["--expiration-date"],
arg_group="Body",
help="The time the expiration date will be triggered (UTC), after which the environment and associated resources will be deleted.",
nullable=True,
)
_args_schema.parameters = AAZFreeFormDictArg(
options=["--parameters"],
arg_group="Body",
help="Parameters object for the environment.",
nullable=True,
)

# define Arg Group "Default"
Expand Down
8 changes: 3 additions & 5 deletions src/devcenter/azext_devcenter/custom.py
Original file line number Diff line number Diff line change
Expand Up @@ -1109,7 +1109,6 @@ def devcenter_dev_box_create(
no_wait=False,
dev_center=None,
endpoint=None,
local_administrator=None,
):
updated_endpoint = get_dataplane_endpoint(cmd.cli_ctx, endpoint, dev_center)
return DevBoxCreate(cli_ctx=cmd.cli_ctx)(command_args={
Expand All @@ -1119,7 +1118,6 @@ def devcenter_dev_box_create(
"dev_box_name": dev_box_name,
"pool_name": pool_name,
"no_wait": no_wait,
"local_administrator": local_administrator
})


Expand Down Expand Up @@ -1511,7 +1509,7 @@ def devcenter_environment_create(
"environment_type": environment_type,
"catalog_name": catalog_name,
"environment_definition_name": environment_definition_name,
"expiration_date": datetime.fromisoformat(expiration_date),
"expiration_date": expiration_date,
"parameters": parameters,
"no_wait": no_wait
})
Expand Down Expand Up @@ -1547,7 +1545,7 @@ def devcenter_environment_update(
"environment_type": environment_type,
"catalog_name": catalog_name,
"environment_definition_name": environment_definition_name,
"expiration_date": datetime.fromisoformat(expiration_date),
"expiration_date": expiration_date,
"parameters": parameters,
"no_wait": no_wait
})
Expand Down Expand Up @@ -1742,7 +1740,7 @@ def devcenter_environment_update_expiration(
"project_name": project_name,
"user_id": user_id,
"environment_name": environment_name,
"expiration_date": datetime.fromisoformat(expiration_date)
"expiration_date": expiration_date
})


Expand Down
4 changes: 0 additions & 4 deletions src/devcenter/azext_devcenter/tests/latest/helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -660,7 +660,3 @@ def create_dev_box_dependencies(self):
add_dev_box_user_role_to_project(self)
create_pool(self)


def login_account(self):
if self.is_live:
self.cmd("az login -t 003b06c3-d471-4452-9686-9e7f3ca85f0a")
Loading
Loading