Skip to content
Closed
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: 4 additions & 0 deletions src/azure-cli/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ Release History
* Added a required `--type` parameter to command `az acr config retention update`
* Param `-n, --name` changed to `-r, --registry` for `az acr config` command group.

**BotService**

* Added `--icon-url` to `az bot update`

**Compute**

* vmss create: Add --terminate-notification-time parameters to support terminate scheduled event configurability.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ def load_arguments(self, _):
c.argument('password', options_list=['-p', '--password'], help='The Microsoft account (MSA) password for the bot. Used to authorize messages being sent to the bot.')
c.argument('tags', arg_type=tags_type)
c.argument('language', options_list=['--lang'], arg_type=get_enum_type(SUPPORTED_LANGUAGES), help='The language to be used to create the bot.', arg_group='Web Bot Specific')
c.argument('version', options_list=['-v', '--version'], help='The Microsoft Bot Builder SDK version to be used to create the bot', arg_type=get_enum_type(['v4']), arg_group='Web Bot Specific')
Copy link
Member

@qwordy qwordy Oct 17, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it a breaking change? Be careful with it. How many requests of this parameter?
You can also use deprecate argument.
https://github.com/Azure/azure-cli/blob/dev/doc/authoring_command_modules/authoring_commands.md#deprecating-commands-and-arguments

Add this change to history, and declare breaking change or deprecated

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR feedback regarding the history still needs to be added into #11318: command module is in preview. We only support v4 bots with the latest change, and use it by default so the flag --version is unnecessary.

c.argument('deploy_echo', options_list=['--echo'], arg_type=get_three_state_flag(), help='Deploy an Echo Bot template to the newly created v4 Web App Bot.', arg_group='V4 Bot Templates')

with self.argument_context('bot publish') as c:
Expand Down Expand Up @@ -106,6 +105,7 @@ def load_arguments(self, _):
arg_group='Bot Analytics/Application Insights',
help='Azure Application Insights Application ID used to read bot analytics data. Provide an Id if '
'you want to view analytics about your bot in the Analytics blade.')
c.argument('icon_url', help='Icon URL for bot avatar. 30K max, png only')

with self.argument_context('bot prepare-publish') as c:
c.argument('proj_file_path', options_list=['--proj-file-path', c.deprecate(target='--proj-name',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,13 @@ def deploy_arm_template(cli_ctx, resource_group_name, # pylint: disable=too-man

@staticmethod
def create_app(cmd, logger, client, resource_group_name, resource_name, description, kind, appid, password, # pylint:disable=too-many-statements
location, sku_name, language, version, bot_template_type):
location, sku_name, language, bot_template_type):
kind = 'sdk' if kind == 'webapp' else kind
(zip_url, template_name) = BotTemplateDeployer.__retrieve_bot_template_link(version,
language,
(zip_url, template_name) = BotTemplateDeployer.__retrieve_bot_template_link(language,
bot_template_type)

logger.debug('Detected SDK version %s, kind %s and programming language %s. Using the following template: %s.',
version, kind, language, zip_url)
logger.debug('Detected kind %s and programming language %s. Using the following template: %s.',
kind, language, zip_url)

site_name = re.sub(r'[^a-z0-9\-]', '', resource_name[:40].lower())

Expand Down Expand Up @@ -140,8 +139,8 @@ def _try_parse_json_object(value):
return parameters

@staticmethod
def __retrieve_bot_template_link(version, language, bot_template_type):
if version == 'v4' and not bot_template_type:
def __retrieve_bot_template_link(language, bot_template_type):
if not bot_template_type:
return '', BotTemplateDeployer.v4_webapp_template_name

response = requests.get('https://dev.botframework.com/api/misc/bottemplateroot')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def __prepare_configuration_file(cmd, resource_group_name, kudu_client, folder_p

def create(cmd, client, resource_group_name, resource_name, kind, msa_app_id, password, language=None, # pylint: disable=too-many-locals, too-many-statements
description=None, display_name=None, endpoint=None, tags=None, location='Central US',
sku_name='F0', version='v4', deploy_echo=None):
sku_name='F0', deploy_echo=None):
# Kind parameter validation
kind = kind.lower()
registration_kind = 'registration'
Expand Down Expand Up @@ -153,7 +153,7 @@ def create(cmd, client, resource_group_name, resource_name, kind, msa_app_id, pa

creation_results = BotTemplateDeployer.create_app(
cmd, logger, client, resource_group_name, resource_name, description, kind, msa_app_id, password,
location, sku_name, language, version, bot_template_type)
location, sku_name, language, bot_template_type)

return creation_results

Expand Down Expand Up @@ -647,7 +647,7 @@ def publish_app(cmd, client, resource_group_name, resource_name, code_dir=None,

def update(client, resource_group_name, resource_name, endpoint=None, description=None,
display_name=None, tags=None, sku_name=None, app_insights_key=None,
app_insights_api_key=None, app_insights_app_id=None):
app_insights_api_key=None, app_insights_app_id=None, icon_url=None):
bot = client.bots.get(
resource_group_name=resource_group_name,
resource_name=resource_name
Expand All @@ -658,6 +658,7 @@ def update(client, resource_group_name, resource_name, endpoint=None, descriptio
bot_props.description = description if description else bot_props.description
bot_props.display_name = display_name if display_name else bot_props.display_name
bot_props.endpoint = endpoint if endpoint else bot_props.endpoint
bot_props.icon_url = icon_url if icon_url else bot_props.icon_url

bot_props.developer_app_insight_key = app_insights_key if app_insights_key else bot_props.developer_app_insight_key
bot_props.developer_app_insights_application_id = app_insights_app_id if app_insights_app_id \
Expand Down

Large diffs are not rendered by default.

Loading