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
4 changes: 0 additions & 4 deletions src/devcenter/azext_devcenter/manual/_client_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,6 @@ def cf_environment_dp(cli_ctx, dev_center, *_):
return cf_devcenter_dataplane(cli_ctx, dev_center).environments


def cf_artifact_dp(cli_ctx, dev_center, *_):
return cf_devcenter_dataplane(cli_ctx, dev_center).artifacts


def cf_catalog_item_dp(cli_ctx, dev_center, *_):
return cf_devcenter_dataplane(cli_ctx, dev_center).catalog_items

Expand Down
37 changes: 0 additions & 37 deletions src/devcenter/azext_devcenter/manual/_help.py
Original file line number Diff line number Diff line change
Expand Up @@ -329,19 +329,6 @@
--name "{environmentName}" --project-name "{projectName}" --user-id "{userId}"
"""

helps[
"devcenter dev environment custom-action"
] = """
type: command
short-summary: "Executes a custom action."
examples:
- name: Environments_CustomAction
text: |-
az devcenter dev environment custom-action --action-id "someCustomActionId" --parameters \
"{\\"functionAppRuntime\\":\\"node\\",\\"storageAccountType\\":\\"Standard_LRS\\"}" --name "{environmentName}" \
--project-name "myProject" --user-id "me" --dev-center-name "{devCenterName}"
"""

helps[
"devcenter dev environment deploy-action"
] = """
Expand Down Expand Up @@ -375,30 +362,6 @@
--name "{environmentName}" --project-name "{projectName}" --user-id "{userId}" --deleted
"""

helps[
"devcenter dev artifact"
] = """
type: group
short-summary: Manage artifact with devcenter
"""

helps[
"devcenter dev artifact list"
] = """
type: command
short-summary: "Lists the artifacts for an environment at a specified path, or returns the file at the path."
examples:
- name: Artifacts_Get
text: |-
az devcenter dev artifact list --artifact-path "{artifactPath}" --dev-center-name "{devCenterName}" \
--environment-name "{environmentName}" --project-name "{projectName}" \
--user-id "{userId}"
- name: Artifacts_ListByEnvironment
text: |-
az devcenter dev artifact list --dev-center-name "{devCenterName}" \
--environment-name "{environmentName}" --project-name "{projectName}" --user-id "{userId}"
"""

helps[
"devcenter dev catalog-item"
] = """
Expand Down
105 changes: 38 additions & 67 deletions src/devcenter/azext_devcenter/manual/_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -312,8 +312,10 @@ def load_arguments(self, _):
type=str,
help="The name of a Dev " "Box.",
)
c.argument("upcoming_action_id", type=str, help="The upcoming action id.")
c.argument("delay_time", help="The delayed timespan from the most recent scheduled time. Format HH:MM")
c.argument("upcoming_action_id", type=str,
help="The upcoming action id.")
c.argument(
"delay_time", help="The delayed timespan from the most recent scheduled time. Format HH:MM")

with self.argument_context("devcenter dev dev-box list-upcoming-action") as c:
c.argument(
Expand Down Expand Up @@ -358,7 +360,8 @@ def load_arguments(self, _):
type=str,
help="The name of a Dev " "Box.",
)
c.argument("upcoming_action_id", type=str, help="The upcoming action id.")
c.argument("upcoming_action_id", type=str,
help="The upcoming action id.")

with self.argument_context("devcenter dev dev-box skip-upcoming-action") as c:
c.argument(
Expand All @@ -381,7 +384,8 @@ def load_arguments(self, _):
type=str,
help="The name of a Dev " "Box.",
)
c.argument("upcoming_action_id", type=str, help="The upcoming action id.")
c.argument("upcoming_action_id", type=str,
help="The upcoming action id.")

with self.argument_context("devcenter dev dev-box wait") as c:
c.argument(
Expand Down Expand Up @@ -464,8 +468,10 @@ def load_arguments(self, _):
type=str,
help="The name " "of the environment.",
)
c.argument("description", type=str, help="Description of the Environment.")
c.argument("catalog_name", type=str, required=True, help="Name of the catalog.")
c.argument("description", type=str,
help="Description of the Environment.")
c.argument("catalog_name", type=str, required=True,
help="Name of the catalog.")
c.argument(
"catalog_item_name",
type=str,
Expand Down Expand Up @@ -511,9 +517,11 @@ def load_arguments(self, _):
type=str,
help="The name " "of the environment.",
)
c.argument("description", type=str, help="Description of the Environment.")
c.argument("description", type=str,
help="Description of the Environment.")
c.argument("catalog_name", type=str, help="Name of the catalog.")
c.argument("catalog_item_name", type=str, help="Name of the catalog item.")
c.argument("catalog_item_name", type=str,
help="Name of the catalog item.")
c.argument(
"parameters",
type=validate_file_or_dict,
Expand Down Expand Up @@ -572,36 +580,6 @@ def load_arguments(self, _):
help="The name " "of the environment.",
)

with self.argument_context("devcenter dev environment custom-action") as c:
c.argument(
"dev_center",
arg_type=dev_center_type,
)
c.argument(
"project_name",
type=str,
help="The DevCenter Project upon which to execute operations.",
)
c.argument(
"user_id",
type=str,
help="The AAD object id of the user. If value is 'me', the identity is taken "
"from the authentication context",
)
c.argument(
"environment_name",
options_list=["--name", "-n", "--environment-name"],
type=str,
help="The name " "of the environment.",
)
c.argument("action_id", type=str, help="The Catalog Item action id to execute")
c.argument(
"parameters",
type=validate_file_or_dict,
help="Parameters object for the Action Expected value: "
"json-string/json-file/@json-file.",
)

with self.argument_context("devcenter dev environment deploy-action") as c:
c.argument(
"dev_center",
Expand All @@ -624,32 +602,15 @@ def load_arguments(self, _):
type=str,
help="The name " "of the environment.",
)
c.argument("action_id", type=str, help="The Catalog Item action id to execute")
c.argument("action_id", type=str,
help="The Catalog Item action id to execute")
c.argument(
"parameters",
type=validate_file_or_dict,
help="Parameters object for the Action Expected value: "
"json-string/json-file/@json-file.",
)

with self.argument_context("devcenter dev artifact list") as c:
c.argument(
"dev_center",
arg_type=dev_center_type,
)
c.argument(
"project_name",
arg_type=project_type,
)
c.argument(
"user_id",
type=str,
help="The id of the user. If value is 'me', the identity is taken from the "
"authentication context",
)
c.argument("environment_name", type=str, help="The name of the environment.")
c.argument("artifact_path", type=str, help="The path of the artifact.")

with self.argument_context("devcenter dev catalog-item list") as c:
c.argument(
"dev_center",
Expand Down Expand Up @@ -698,7 +659,8 @@ def load_arguments(self, _):
c.argument(
"catalog_item_id", type=str, help="The unique id of the catalog item."
)
c.argument("version", type=str, help="The version of the catalog item.")
c.argument("version", type=str,
help="The version of the catalog item.")

with self.argument_context("devcenter dev environment-type list") as c:
c.argument(
Expand Down Expand Up @@ -1004,7 +966,8 @@ def load_arguments(self, _):
)
c.argument(
"attached_network_connection_name",
options_list=["--name", "-n", "--attached-network-connection-name"],
options_list=["--name", "-n",
"--attached-network-connection-name"],
type=str,
help="The name of the attached network connection.",
id_part="child_name_1",
Expand All @@ -1022,7 +985,8 @@ def load_arguments(self, _):
)
c.argument(
"attached_network_connection_name",
options_list=["--name", "-n", "--attached-network-connection-name"],
options_list=["--name", "-n",
"--attached-network-connection-name"],
type=str,
help="The name of the attached network connection.",
)
Expand All @@ -1042,7 +1006,8 @@ def load_arguments(self, _):
)
c.argument(
"attached_network_connection_name",
options_list=["--name", "-n", "--attached-network-connection-name"],
options_list=["--name", "-n",
"--attached-network-connection-name"],
type=str,
help="The name of the attached network connection.",
id_part="child_name_1",
Expand All @@ -1057,7 +1022,8 @@ def load_arguments(self, _):
)
c.argument(
"attached_network_connection_name",
options_list=["--name", "-n", "--attached-network-connection-name"],
options_list=["--name", "-n",
"--attached-network-connection-name"],
type=str,
help="The name of the attached network connection.",
id_part="child_name_1",
Expand Down Expand Up @@ -1105,7 +1071,8 @@ def load_arguments(self, _):
help="The name of the environment type.",
)
c.argument("tags", tags_type)
c.argument("description", type=str, help="Description of the environment type.")
c.argument("description", type=str,
help="Description of the environment type.")

with self.argument_context("devcenter admin environment-type update") as c:
c.argument("resource_group_name", resource_group_name_type)
Expand All @@ -1121,7 +1088,8 @@ def load_arguments(self, _):
id_part="child_name_1",
)
c.argument("tags", tags_type)
c.argument("description", type=str, help="Description of the environment type.")
c.argument("description", type=str,
help="Description of the environment type.")

with self.argument_context("devcenter admin environment-type delete") as c:
c.argument("resource_group_name", resource_group_name_type)
Expand Down Expand Up @@ -1741,7 +1709,8 @@ def load_arguments(self, _):
)

with self.argument_context("devcenter admin operation-statuses show") as c:
c.argument("location", arg_type=get_location_type(self.cli_ctx), id_part="name")
c.argument("location", arg_type=get_location_type(
self.cli_ctx), id_part="name")
c.argument(
"operation_id",
type=str,
Expand Down Expand Up @@ -2025,7 +1994,8 @@ def load_arguments(self, _):
type=str,
help="The subnet to attach Virtual Machines to",
)
c.argument("domain_name", type=str, help="Active Directory domain name")
c.argument("domain_name", type=str,
help="Active Directory domain name")
c.argument(
"organization_unit",
type=str,
Expand Down Expand Up @@ -2070,7 +2040,8 @@ def load_arguments(self, _):
c.argument(
"subnet_id", type=str, help="The subnet to attach Virtual Machines to"
)
c.argument("domain_name", type=str, help="Active Directory domain name")
c.argument("domain_name", type=str,
help="Active Directory domain name")
c.argument(
"organization_unit",
type=str,
Expand Down
15 changes: 0 additions & 15 deletions src/devcenter/azext_devcenter/manual/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
cf_schedule_dp,
cf_dev_box_dp,
cf_environment_dp,
cf_artifact_dp,
cf_catalog_item_dp,
cf_catalog_item_version_dp,
cf_environment_type_dp,
Expand Down Expand Up @@ -44,12 +43,6 @@
def load_command_table(self, _):

# data plane
devcenter_artifact_dp = CliCommandType(
operations_tmpl=(
"azext_devcenter.vendored_sdks.devcenter_dataplane.operations._artifacts_operations#ArtifactsOperations.{}"
),
client_factory=cf_artifact_dp,
)

devcenter_pool_dp = CliCommandType(
operations_tmpl="azext_devcenter.vendored_sdks.devcenter_dataplane.operations._pool_operations#PoolOperations.{}",
Expand Down Expand Up @@ -254,9 +247,6 @@ def load_command_table(self, _):
"skip-upcoming-action", "devcenter_dev_box_skip_upcoming_action"
)

with self.command_group("devcenter dev artifact", devcenter_artifact_dp) as g:
g.custom_command("list", "devcenter_artifact_list")

with self.command_group(
"devcenter dev catalog-item", devcenter_catalog_item_dp
) as g:
Expand All @@ -283,11 +273,6 @@ def load_command_table(self, _):
supports_no_wait=True,
confirmation=True,
)
g.custom_command(
"custom-action",
"devcenter_environment_custom_action",
supports_no_wait=True,
)
g.custom_command(
"deploy-action",
"devcenter_environment_deploy_action",
Expand Down
19 changes: 0 additions & 19 deletions src/devcenter/azext_devcenter/manual/custom.py
Original file line number Diff line number Diff line change
Expand Up @@ -1340,25 +1340,6 @@ def devcenter_environment_deploy_action(
)


def devcenter_artifact_list(
cmd, dev_center, project_name, environment_name, artifact_path=None, user_id='me'
):
cf_dataplane = cf_devcenter_dataplane(cmd.cli_ctx, dev_center, project_name)
if (
user_id is not None
and environment_name is not None
and artifact_path is not None
):
return cf_dataplane.artifacts.list_by_path(
user_id=user_id,
environment_name=environment_name,
artifact_path=artifact_path,
)
return cf_dataplane.artifacts.list_by_environment(
user_id=user_id, environment_name=environment_name
)


def devcenter_catalog_item_list(cmd, dev_center, project_name):
cf_dataplane = cf_devcenter_dataplane(cmd.cli_ctx, dev_center, project_name)
return cf_dataplane.catalog_items.list()
Expand Down
Loading