-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Codespaces CLI release v0.2.0 (#1856)
- Loading branch information
1 parent
c4799e6
commit 464901c
Showing
36 changed files
with
785 additions
and
938 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# -------------------------------------------------------------------------------------------- | ||
# Copyright (c) Microsoft Corporation. All rights reserved. | ||
# Licensed under the MIT License. See License.txt in the project root for license information. | ||
# -------------------------------------------------------------------------------------------- | ||
|
||
DEFAULT_SERVICE_DOMAIN = "online.visualstudio.com" | ||
|
||
CONFIG_SECTION = 'codespaces' | ||
KEY_RESOURCE_PROVIDER_API_VERSION = 'resource_provider_api_version' | ||
KEY_SERVICE_DOMAIN = 'service_domain' | ||
|
||
|
||
def get_rp_api_version(cli_ctx): | ||
return cli_ctx.config.get(CONFIG_SECTION, KEY_RESOURCE_PROVIDER_API_VERSION, fallback=None) | ||
|
||
|
||
def get_service_domain(cli_ctx): | ||
return cli_ctx.config.get(CONFIG_SECTION, KEY_SERVICE_DOMAIN, fallback=None) or DEFAULT_SERVICE_DOMAIN | ||
|
||
|
||
def get_current_config(cli_ctx): | ||
return cli_ctx.config.items(CONFIG_SECTION) | ||
|
||
|
||
def set_rp_api_version(cli_ctx, val): | ||
cli_ctx.config.set_value(CONFIG_SECTION, KEY_RESOURCE_PROVIDER_API_VERSION, val) | ||
|
||
|
||
def set_service_domain(cli_ctx, val): | ||
cli_ctx.config.set_value(CONFIG_SECTION, KEY_SERVICE_DOMAIN, val) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.