Skip to content

Commit

Permalink
[devcenter] Update project environment type parameters to be required (
Browse files Browse the repository at this point in the history
…#7100)

* Update project env type parameters

* Fix environment def example and update style
  • Loading branch information
am-lim authored Dec 22, 2023
1 parent 25427ac commit 07ad6cd
Show file tree
Hide file tree
Showing 7 changed files with 44 additions and 84 deletions.
4 changes: 4 additions & 0 deletions src/devcenter/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
Release History
===============
5.0.0
++++++
* Require roles and identity type parameters in "az decenter admin project-environment-type create"

4.0.1
++++++
* Update due to bug in API swagger causing missing API version
Expand Down
2 changes: 1 addition & 1 deletion src/devcenter/azext_devcenter/_help.py
Original file line number Diff line number Diff line change
Expand Up @@ -623,7 +623,7 @@
--project-name "DevProject"
- name: List using endpoint
text: |-
az devcenter dev environment-definition list --dev-center-name "ContosoDevCenter" \
az devcenter dev environment-definition list --endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" \
--project-name "DevProject"
- name: List by catalog using dev center
text: |-
Expand Down
1 change: 1 addition & 0 deletions src/devcenter/azext_devcenter/_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
# pylint: disable=line-too-long
# pylint: disable=unused-import
# pylint: disable=too-many-statements
# pylint: disable=too-many-lines

from knack.arguments import CLIArgumentType
from azure.cli.core.commands.parameters import (
Expand Down
4 changes: 0 additions & 4 deletions src/devcenter/azext_devcenter/action.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,8 @@
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------


# pylint: disable=protected-access

# pylint: disable=no-self-use


import argparse
from collections import defaultdict
Expand Down
3 changes: 3 additions & 0 deletions src/devcenter/azext_devcenter/custom.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------------------------------
# pylint: disable=protected-access
# pylint: disable=too-many-lines

from datetime import datetime
import json
Expand Down Expand Up @@ -459,6 +460,8 @@ def _build_arguments_schema(cls, *args, **kwargs):
args_schema = super()._build_arguments_schema(*args, **kwargs)
args_schema.deployment_target_id._required = True
args_schema.status._required = True
args_schema.roles._required = True
args_schema.identity_type._required = True
return args_schema

def _cli_arguments_loader(self):
Expand Down
Loading

0 comments on commit 07ad6cd

Please sign in to comment.