Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
6acd702
Generate with models
drielenr Nov 28, 2023
b4efee4
Updates after arch board meetting. Missing enum rename.
drielenr Jan 9, 2024
f8af7e6
regen after merge main
drielenr Mar 6, 2024
b23683c
regen after tsp updates
drielenr Mar 6, 2024
6302464
Add script for custom tsp update
drielenr Mar 20, 2024
9552214
Update tsp commit in main and regen
drielenr Mar 20, 2024
5b61ea2
Update tests to use model
drielenr Apr 9, 2024
17e29d3
Break down tests
drielenr Apr 10, 2024
20f411f
Add samples
drielenr Apr 16, 2024
bd8982a
Add snippets and update readme
drielenr Apr 17, 2024
382a0cb
clean up imports
drielenr Apr 17, 2024
4e592f9
Update changelog
drielenr Apr 17, 2024
979e428
Update version
drielenr Apr 17, 2024
6c008b2
Fix samples
drielenr Apr 17, 2024
fb8a711
Fix formatting
drielenr Apr 17, 2024
a94d79a
Regen after merge main
drielenr Apr 17, 2024
3236403
update latest tsp commit
drielenr Apr 17, 2024
71b3ed7
Push recordings to assets repo and update tag reference
drielenr Apr 17, 2024
bdcd2d4
Add words to be ignored by cspell
drielenr Apr 22, 2024
01a4b5f
Revert removal of skip_quote
drielenr Apr 23, 2024
d349f09
Re-record failing tests and fix create dev box test
drielenr Apr 23, 2024
72378c4
fix vcpus cspell file path
drielenr Apr 23, 2024
b734a7e
Regen latest main
drielenr Apr 25, 2024
d94631c
Revert removal of skip_quote
drielenr Apr 23, 2024
61df66d
Regen using latest tsp
drielenr Apr 25, 2024
32e55eb
temp fix api version
drielenr Apr 25, 2024
a721ec1
Fix readme section reference
drielenr Apr 25, 2024
d2de546
Revert "temp fix api version"
drielenr Apr 26, 2024
0189bc6
Regen latest main
drielenr Apr 26, 2024
e4be831
Rename to Operation Status
drielenr Apr 26, 2024
2370d53
Use the lro model in test assertion
drielenr Apr 26, 2024
1671155
Update changelong
drielenr Apr 30, 2024
29f7aa2
Update readme and code snippets
drielenr Apr 30, 2024
54ccd83
Rename samples
drielenr Apr 30, 2024
af0cf75
add async tests and update recordings
leti367 May 10, 2024
db4871f
add aync samples
leti367 May 12, 2024
00da9e5
fix issue in async samples
leti367 May 14, 2024
6d28510
Update tests recordings
leti367 May 15, 2024
52460ca
Update tests and re-record tests
leti367 May 15, 2024
8199391
patch waiting in playback mode
leti367 May 16, 2024
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
Prev Previous commit
Next Next commit
Regen using latest tsp
  • Loading branch information
drielenr authored and leti367 committed May 14, 2024
commit 61df66d2885a0a28627c20087416d55d7520f7bf
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class DevCenterClient(DevCenterClientOperationsMixin): # pylint: disable=client
:type endpoint: str
:param credential: Credential used to authenticate requests to the service. Required.
:type credential: ~azure.core.credentials.TokenCredential
:keyword api_version: The API version to use for this operation. Default value is "2023-04-01".
:keyword api_version: The API version to use for this operation. Default value is "2024-02-01".
Note that overriding this default value may result in unsupported behavior.
:paramtype api_version: str
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
Expand Down Expand Up @@ -82,7 +82,7 @@ def send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs:

request_copy = deepcopy(request)
path_format_arguments = {
"endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str"),
"endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True),
}

request_copy.url = self._client.format_url(request_copy.url, **path_format_arguments)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ class DevCenterClientConfiguration: # pylint: disable=too-many-instance-attribu
:type endpoint: str
:param credential: Credential used to authenticate requests to the service. Required.
:type credential: ~azure.core.credentials.TokenCredential
:keyword api_version: The API version to use for this operation. Default value is "2023-04-01".
:keyword api_version: The API version to use for this operation. Default value is "2024-02-01".
Note that overriding this default value may result in unsupported behavior.
:paramtype api_version: str
"""

def __init__(self, endpoint: str, credential: "TokenCredential", **kwargs: Any) -> None:
api_version: str = kwargs.pop("api_version", "2023-04-01")
api_version: str = kwargs.pop("api_version", "2024-02-01")

if endpoint is None:
raise ValueError("Parameter 'endpoint' must not be None.")
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class DevCenterClient(DevCenterClientOperationsMixin): # pylint: disable=client
:type endpoint: str
:param credential: Credential used to authenticate requests to the service. Required.
:type credential: ~azure.core.credentials_async.AsyncTokenCredential
:keyword api_version: The API version to use for this operation. Default value is "2023-04-01".
:keyword api_version: The API version to use for this operation. Default value is "2024-02-01".
Note that overriding this default value may result in unsupported behavior.
:paramtype api_version: str
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
Expand Down Expand Up @@ -84,7 +84,7 @@ def send_request(

request_copy = deepcopy(request)
path_format_arguments = {
"endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str"),
"endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True),
}

request_copy.url = self._client.format_url(request_copy.url, **path_format_arguments)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ class DevCenterClientConfiguration: # pylint: disable=too-many-instance-attribu
:type endpoint: str
:param credential: Credential used to authenticate requests to the service. Required.
:type credential: ~azure.core.credentials_async.AsyncTokenCredential
:keyword api_version: The API version to use for this operation. Default value is "2023-04-01".
:keyword api_version: The API version to use for this operation. Default value is "2024-02-01".
Note that overriding this default value may result in unsupported behavior.
:paramtype api_version: str
"""

def __init__(self, endpoint: str, credential: "AsyncTokenCredential", **kwargs: Any) -> None:
api_version: str = kwargs.pop("api_version", "2023-04-01")
api_version: str = kwargs.pop("api_version", "2024-02-01")

if endpoint is None:
raise ValueError("Parameter 'endpoint' must not be None.")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -519,11 +519,11 @@ async def get_pool(self, project_name: str, pool_name: str, **kwargs: Any) -> _m

@distributed_trace
def list_schedules(self, project_name: str, pool_name: str, **kwargs: Any) -> AsyncIterable["_models.Schedule"]:
"""Lists available schedules for a pool.
"""Lists all schedules within a pool that are configured by your project administrator.

:param project_name: Name of the project. Required.
:param project_name: The DevCenter Project upon which to execute operations. Required.
:type project_name: str
:param pool_name: Pool name. Required.
:param pool_name: The name of a pool of Dev Boxes. Required.
:type pool_name: str
:return: An iterator like instance of Schedule
:rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.developer.devcenter.models.Schedule]
Expand Down Expand Up @@ -2136,7 +2136,7 @@ def get_long_running_output(pipeline_response):
async def _delete_dev_box_initial(
self, project_name: str, user_id: str, dev_box_name: str, **kwargs: Any
) -> Optional[JSON]:
error_map = {
error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
Expand Down Expand Up @@ -2215,8 +2215,9 @@ async def begin_delete_dev_box(
# response body for status code(s): 202
response == {
"id": "str", # Fully qualified ID for the operation status. Required.
"name": "str", # The operation id name. Required.
"status": "str", # Provisioning state of the resource. Required. Known
values are: "Running", "Completed", "Canceled", and "Failed".
values are: "NotStarted", "Running", "Succeeded", "Failed", and "Canceled".
"endTime": "2020-02-20 00:00:00", # Optional. The end time of the operation.
"error": {
"code": "str", # One of a server-defined set of error codes.
Expand All @@ -2233,7 +2234,6 @@ async def begin_delete_dev_box(
},
"target": "str" # Optional. The target of the error.
},
"name": "str", # Optional. The operation id name.
"percentComplete": 0.0, # Optional. Percent of the operation that is
complete.
"properties": {}, # Optional. Custom operation properties, populated only
Expand Down Expand Up @@ -2374,8 +2374,9 @@ async def begin_start_dev_box(
# response body for status code(s): 202
response == {
"id": "str", # Fully qualified ID for the operation status. Required.
"name": "str", # The operation id name. Required.
"status": "str", # Provisioning state of the resource. Required. Known
values are: "Running", "Completed", "Canceled", and "Failed".
values are: "NotStarted", "Running", "Succeeded", "Failed", and "Canceled".
"endTime": "2020-02-20 00:00:00", # Optional. The end time of the operation.
"error": {
"code": "str", # One of a server-defined set of error codes.
Expand All @@ -2392,7 +2393,6 @@ async def begin_start_dev_box(
},
"target": "str" # Optional. The target of the error.
},
"name": "str", # Optional. The operation id name.
"percentComplete": 0.0, # Optional. Percent of the operation that is
complete.
"properties": {}, # Optional. Custom operation properties, populated only
Expand Down Expand Up @@ -2537,8 +2537,9 @@ async def begin_stop_dev_box(
# response body for status code(s): 202
response == {
"id": "str", # Fully qualified ID for the operation status. Required.
"name": "str", # The operation id name. Required.
"status": "str", # Provisioning state of the resource. Required. Known
values are: "Running", "Completed", "Canceled", and "Failed".
values are: "NotStarted", "Running", "Succeeded", "Failed", and "Canceled".
"endTime": "2020-02-20 00:00:00", # Optional. The end time of the operation.
"error": {
"code": "str", # One of a server-defined set of error codes.
Expand All @@ -2555,7 +2556,6 @@ async def begin_stop_dev_box(
},
"target": "str" # Optional. The target of the error.
},
"name": "str", # Optional. The operation id name.
"percentComplete": 0.0, # Optional. Percent of the operation that is
complete.
"properties": {}, # Optional. Custom operation properties, populated only
Expand Down Expand Up @@ -2696,8 +2696,9 @@ async def begin_restart_dev_box(
# response body for status code(s): 202
response == {
"id": "str", # Fully qualified ID for the operation status. Required.
"name": "str", # The operation id name. Required.
"status": "str", # Provisioning state of the resource. Required. Known
values are: "Running", "Completed", "Canceled", and "Failed".
values are: "NotStarted", "Running", "Succeeded", "Failed", and "Canceled".
"endTime": "2020-02-20 00:00:00", # Optional. The end time of the operation.
"error": {
"code": "str", # One of a server-defined set of error codes.
Expand All @@ -2714,7 +2715,6 @@ async def begin_restart_dev_box(
},
"target": "str" # Optional. The target of the error.
},
"name": "str", # Optional. The operation id name.
"percentComplete": 0.0, # Optional. Percent of the operation that is
complete.
"properties": {}, # Optional. Custom operation properties, populated only
Expand Down Expand Up @@ -4264,8 +4264,9 @@ async def begin_delete_environment(
# response body for status code(s): 202
response == {
"id": "str", # Fully qualified ID for the operation status. Required.
"name": "str", # The operation id name. Required.
"status": "str", # Provisioning state of the resource. Required. Known
values are: "Running", "Completed", "Canceled", and "Failed".
values are: "NotStarted", "Running", "Succeeded", "Failed", and "Canceled".
"endTime": "2020-02-20 00:00:00", # Optional. The end time of the operation.
"error": {
"code": "str", # One of a server-defined set of error codes.
Expand All @@ -4282,7 +4283,6 @@ async def begin_delete_environment(
},
"target": "str" # Optional. The target of the error.
},
"name": "str", # Optional. The operation id name.
"percentComplete": 0.0, # Optional. Percent of the operation that is
complete.
"properties": {}, # Optional. Custom operation properties, populated only
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,6 @@
from ._models import InnerError
from ._models import OperationStatus
from ._models import OsDisk
from ._models import PagedDevBox
from ._models import PagedDevBoxActionDelayResult
from ._models import PagedEnvironment
from ._models import PagedEnvironmentDefinition
from ._models import PagedEnvironmentType
from ._models import Pool
from ._models import Project
from ._models import RemoteConnection
Expand All @@ -41,7 +36,7 @@
from ._enums import HibernateSupport
from ._enums import LocalAdministratorStatus
from ._enums import OSType
from ._enums import OperationStatusValue
from ._enums import OperationState
from ._enums import ParameterType
from ._enums import PoolHealthStatus
from ._enums import PowerState
Expand Down Expand Up @@ -69,11 +64,6 @@
"InnerError",
"OperationStatus",
"OsDisk",
"PagedDevBox",
"PagedDevBoxActionDelayResult",
"PagedEnvironment",
"PagedEnvironmentDefinition",
"PagedEnvironmentType",
"Pool",
"Project",
"RemoteConnection",
Expand All @@ -88,7 +78,7 @@
"HibernateSupport",
"LocalAdministratorStatus",
"OSType",
"OperationStatusValue",
"OperationState",
"ParameterType",
"PoolHealthStatus",
"PowerState",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,29 +30,29 @@ class DevBoxProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""Indicates the provisioning state of the Dev Box."""

SUCCEEDED = "Succeeded"
"""Dev Box was successfully provisioned"""
"""Dev Box was successfully provisioned."""
FAILED = "Failed"
"""Dev Box failed to provision"""
"""Dev Box failed to provision."""
CANCELED = "Canceled"
"""Dev Box provision was canceled"""
"""Dev Box provision was canceled."""
CREATING = "Creating"
"""Dev Box is being created"""
"""Dev Box is being created."""
DELETING = "Deleting"
"""Dev Box is being deleted"""
"""Dev Box is being deleted."""
UPDATING = "Updating"
"""Dev Box is updating"""
"""Dev Box is updating."""
STARTING = "Starting"
"""Dev Box is starting"""
"""Dev Box is starting."""
STOPPING = "Stopping"
"""Dev Box is stopping"""
"""Dev Box is stopping."""
PROVISIONING = "Provisioning"
"""Dev Box is provisioning"""
"""Dev Box is provisioning."""
PROVISIONED_WITH_WARNING = "ProvisionedWithWarning"
"""Dev Box was provisioned with warning"""
"""Dev Box was provisioned with warning."""
IN_GRACE_PERIOD = "InGracePeriod"
"""Dev Box is in grace period"""
"""Dev Box is in grace period."""
NOT_PROVISIONED = "NotProvisioned"
"""Dev Box is not provisioned"""
"""Dev Box is not provisioned."""


class EnvironmentProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta):
Expand Down Expand Up @@ -117,17 +117,19 @@ class LocalAdministratorStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""Owners of Dev Boxes in the pool are not local administrators on the Dev Boxes."""


class OperationStatusValue(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""Indicates whether operation status is running, completed, canceled or failed."""
class OperationState(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""Enum describing allowed operation states."""

NOT_STARTED = "NotStarted"
"""The operation has not started."""
RUNNING = "Running"
"""Operation is in progress"""
COMPLETED = "Completed"
"""Operation is completed with success"""
CANCELED = "Canceled"
"""Operation was canceled"""
"""The operation is in progress."""
SUCCEEDED = "Succeeded"
"""The operation has completed successfully."""
FAILED = "Failed"
"""Operation failed"""
"""The operation has failed."""
CANCELED = "Canceled"
"""The operation has been canceled by the user."""


class OSType(str, Enum, metaclass=CaseInsensitiveEnumMeta):
Expand Down Expand Up @@ -202,49 +204,49 @@ class SkuName(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""Indicates the Dev Box compute."""

GENERAL_I_8C32GB256SSD_V2 = "general_i_8c32gb256ssd_v2"
"""Intel, 8 vCPU, 32 GB RAM, 256 GB Storage"""
"""Intel, 8 vCPU, 32 GB RAM, 256 GB Storage."""
GENERAL_I_8C32GB512SSD_V2 = "general_i_8c32gb512ssd_v2"
"""Intel, 8 vCPU, 32 GB RAM, 512 GB Storage"""
"""Intel, 8 vCPU, 32 GB RAM, 512 GB Storage."""
GENERAL_I_8C32GB1024SSD_V2 = "general_i_8c32gb1024ssd_v2"
"""Intel, 8 vCPU, 32 GB RAM, 1024 GB Storage"""
"""Intel, 8 vCPU, 32 GB RAM, 1024 GB Storage."""
GENERAL_I_8C32GB2048SSD_V2 = "general_i_8c32gb2048ssd_v2"
"""Intel, 8 vCPU, 32 GB RAM, 2048 GB Storage"""
"""Intel, 8 vCPU, 32 GB RAM, 2048 GB Storage."""
GENERAL_I_16C64GB256SSD_V2 = "general_i_16c64gb256ssd_v2"
"""Intel, 16 vCPU, 64 GB RAM, 256 GB Storage"""
"""Intel, 16 vCPU, 64 GB RAM, 256 GB Storage."""
GENERAL_I_16C64GB512SSD_V2 = "general_i_16c64gb512ssd_v2"
"""Intel, 16 vCPU, 64 GB RAM, 512 GB Storage"""
"""Intel, 16 vCPU, 64 GB RAM, 512 GB Storage."""
GENERAL_I_16C64GB1024SSD_V2 = "general_i_16c64gb1024ssd_v2"
"""Intel, 16 vCPU, 64 GB RAM, 1024 GB Storage"""
"""Intel, 16 vCPU, 64 GB RAM, 1024 GB Storage."""
GENERAL_I_16C64GB2048SSD_V2 = "general_i_16c64gb2048ssd_v2"
"""Intel, 16 vCPU, 64 GB RAM, 2048 GB Storage"""
"""Intel, 16 vCPU, 64 GB RAM, 2048 GB Storage."""
GENERAL_I_32C128GB512SSD_V2 = "general_i_32c128gb512ssd_v2"
"""Intel, 32 vCPU, 128 GB RAM, 512 GB Storage"""
"""Intel, 32 vCPU, 128 GB RAM, 512 GB Storage."""
GENERAL_I_32C128GB1024SSD_V2 = "general_i_32c128gb1024ssd_v2"
"""Intel, 32 vCPU, 128 GB RAM, 1024 GB Storage"""
"""Intel, 32 vCPU, 128 GB RAM, 1024 GB Storage."""
GENERAL_I_32C128GB2048SSD_V2 = "general_i_32c128gb2048ssd_v2"
"""Intel, 32 vCPU, 128 GB RAM, 2048 GB Storage"""
"""Intel, 32 vCPU, 128 GB RAM, 2048 GB Storage."""
GENERAL_A_8C32GB256SSD_V2 = "general_a_8c32gb256ssd_v2"
"""AMD, 8 vCPU, 32 GB RAM, 256 GB Storage"""
"""AMD, 8 vCPU, 32 GB RAM, 256 GB Storage."""
GENERAL_A_8C32GB512SSD_V2 = "general_a_8c32gb512ssd_v2"
"""AMD, 8 vCPU, 32 GB RAM, 512 GB Storage"""
"""AMD, 8 vCPU, 32 GB RAM, 512 GB Storage."""
GENERAL_A_8C32GB1024SSD_V2 = "general_a_8c32gb1024ssd_v2"
"""AMD, 8 vCPU, 32 GB RAM, 1024 GB Storage"""
"""AMD, 8 vCPU, 32 GB RAM, 1024 GB Storage."""
GENERAL_A_8C32GB2048SSD_V2 = "general_a_8c32gb2048ssd_v2"
"""AMD, 8 vCPU, 32 GB RAM, 2048 GB Storage"""
"""AMD, 8 vCPU, 32 GB RAM, 2048 GB Storage."""
GENERAL_A_16C64GB256SSD_V2 = "general_a_16c64gb256ssd_v2"
"""AMD, 16 vCPU, 64 GB RAM, 256 GB Storage"""
"""AMD, 16 vCPU, 64 GB RAM, 256 GB Storage."""
GENERAL_A_16C64GB512SSD_V2 = "general_a_16c64gb512ssd_v2"
"""AMD, 16 vCPU, 64 GB RAM, 512 GB Storage"""
"""AMD, 16 vCPU, 64 GB RAM, 512 GB Storage."""
GENERAL_A_16C64GB1024SSD_V2 = "general_a_16c64gb1024ssd_v2"
"""AMD, 16 vCPU, 64 GB RAM, 1024 GB Storage"""
"""AMD, 16 vCPU, 64 GB RAM, 1024 GB Storage."""
GENERAL_A_16C64GB2048SSD_V2 = "general_a_16c64gb2048ssd_v2"
"""AMD, 16 vCPU, 64 GB RAM, 2048 GB Storage"""
"""AMD, 16 vCPU, 64 GB RAM, 2048 GB Storage."""
GENERAL_A_32C128GB512SSD_V2 = "general_a_32c128gb512ssd_v2"
"""AMD, 32 vCPU, 128 GB RAM, 512 GB Storage"""
"""AMD, 32 vCPU, 128 GB RAM, 512 GB Storage."""
GENERAL_A_32C128GB1024SSD_V2 = "general_a_32c128gb1024ssd_v2"
"""AMD, 32 vCPU, 128 GB RAM, 1024 GB Storage"""
"""AMD, 32 vCPU, 128 GB RAM, 1024 GB Storage."""
GENERAL_A_32C128GB2048SSD_V2 = "general_a_32c128gb2048ssd_v2"
"""AMD, 32 vCPU, 128 GB RAM, 2048 GB Storage"""
"""AMD, 32 vCPU, 128 GB RAM, 2048 GB Storage."""


class StopOnDisconnectStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta):
Expand Down
Loading