Skip to content

Commit

Permalink
Update data plane
Browse files Browse the repository at this point in the history
  • Loading branch information
am-lim committed Aug 17, 2023
1 parent 2c2dc8d commit 6639fcd
Show file tree
Hide file tree
Showing 7 changed files with 1,325 additions and 987 deletions.
2 changes: 1 addition & 1 deletion src/devcenter/azext_devcenter/_client_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ def cf_devcenter_dataplane(cli_ctx, endpoint=None, dev_center=None, project_name
profile = Profile(cli_ctx=cli_ctx)

credential = profile.get_login_credentials(resource="https://devcenter.azure.com")

cli_ctx.cloud.endpoints.active_directory_resource_id = "https://devcenter.azure.com"

return DevCenterClient(endpoint, credential[0])


Expand Down
109 changes: 109 additions & 0 deletions src/devcenter/azext_devcenter/_help.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,30 @@
short-summary: Manage schedules.
"""

helps[
"devcenter dev schedule list"
] = """
type: command
short-summary: "List schedules."
examples:
- name: List schedules by project using dev center
text: |-
az devcenter dev schedule list --dev-center-name "ContosoDevCenter" \
--project-name "DevProject"
- name: List schedules by project using endpoint
text: |-
az devcenter dev schedule list --endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" \
--project-name "DevProject"
- name: List schedules by pool using dev center
text: |-
az devcenter dev schedule list --dev-center-name "ContosoDevCenter" \
--pool-name "DevPool" --project-name "DevProject"
- name: List schedules by pool using endpoint
text: |-
az devcenter dev schedule list --endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" \
--pool-name "DevPool" --project-name "DevProject"
"""

helps[
"devcenter dev schedule show"
] = """
Expand Down Expand Up @@ -245,6 +269,22 @@
--project-name "DevProject" --user-id "00000000-0000-0000-0000-000000000000"
"""

helps[
"devcenter dev dev-box repair"
] = """
type: command
short-summary: "Attempts automated repair steps to resolve common problems on a Dev Box. The dev box may restart during this operation."
examples:
- name: Repair using dev center
text: |-
az devcenter dev dev-box repair --name "MyDevBox" --dev-center-name "ContosoDevCenter" \
--project-name "DevProject" --user-id "00000000-0000-0000-0000-000000000000"
- name: Repair using endpoint
text: |-
az devcenter dev dev-box repair --name "MyDevBox" --endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" \
--project-name "DevProject" --user-id "00000000-0000-0000-0000-000000000000"
"""

helps[
"devcenter dev dev-box stop"
] = """
Expand Down Expand Up @@ -313,6 +353,40 @@
--user-id "00000000-0000-0000-0000-000000000000"
"""

helps[
"devcenter dev dev-box list-operation"
] = """
type: command
short-summary: "Lists operations on the dev box which have occurred within the past 90 days."
examples:
- name: List operations using dev center
text: |-
az devcenter dev dev-box list-operation --dev-center-name "ContosoDevCenter" \
--project-name "DevProject" --name "myDevBox" --user-id "00000000-0000-0000-0000-000000000000"
- name: List operations using endpoint
text: |-
az devcenter dev dev-box list-operation --endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" \
--project-name "DevProject" --name "myDevBox" --user-id "00000000-0000-0000-0000-000000000000"
"""

helps[
"devcenter dev dev-box show-operation"
] = """
type: command
short-summary: "Get an operation on a dev box."
examples:
- name: Get operation using dev center
text: |-
az devcenter dev dev-box show-operation --dev-center-name "ContosoDevCenter" \
--project-name "DevProject" --name "myDevBox" --operation-id \
"f5dbdfab-fa0e-4831-8d13-25359aa5e680" --user-id "00000000-0000-0000-0000-000000000000"
- name: Get operation using endpoint
text: |-
az devcenter dev dev-box show-operation --endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" \
--project-name "DevProject" --name "myDevBox" --operation-id \
"f5dbdfab-fa0e-4831-8d13-25359aa5e680" --user-id "00000000-0000-0000-0000-000000000000"
"""

helps[
"devcenter dev dev-box show-action"
] = """
Expand Down Expand Up @@ -576,3 +650,38 @@
az devcenter dev environment-definition show --endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" \
--project-name "DevProject" --catalog-name "myCatalog" --definition-name "foo"
"""


helps[
"devcenter dev environment list-operation"
] = """
type: command
short-summary: "Lists operations on the environment which have occurred within the past 90 days."
examples:
- name: List operations using dev center
text: |-
az devcenter dev environment list-operation --dev-center-name "ContosoDevCenter" \
--project-name "DevProject" --name "myEnv" --user-id "00000000-0000-0000-0000-000000000000"
- name: List operations using endpoint
text: |-
az devcenter dev environment list-operation --endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" \
--project-name "DevProject" --name "myEnv" --user-id "00000000-0000-0000-0000-000000000000"
"""

helps[
"devcenter dev environment show-operation"
] = """
type: command
short-summary: "Gets an environment action result."
examples:
- name: Get operation using dev center
text: |-
az devcenter dev environment show-operation --dev-center-name "ContosoDevCenter" \
--project-name "DevProject" --name "myEnv" --operation-id \
"f5dbdfab-fa0e-4831-8d13-25359aa5e680" --user-id "00000000-0000-0000-0000-000000000000"
- name: Get operation using endpoint
text: |-
az devcenter dev environment show-operation --endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" \
--project-name "DevProject" --name "myEnv" --operation-id \
"f5dbdfab-fa0e-4831-8d13-25359aa5e680" --user-id "00000000-0000-0000-0000-000000000000"
"""
Loading

0 comments on commit 6639fcd

Please sign in to comment.