-
Notifications
You must be signed in to change notification settings - Fork 3.4k
[App Service] Fix #15647, #17674, #29760, #12391: connection-string IDs, docker create params, public certs #33074
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -203,6 +203,12 @@ def load_command_table(self, _): | |
| g.custom_command('import', 'import_ssl_cert', exception_handler=ex_handler_factory()) | ||
| g.custom_command('create', 'create_managed_ssl_cert', exception_handler=ex_handler_factory(), is_preview=True) | ||
|
|
||
| with self.command_group('webapp config public-cert') as g: | ||
| g.custom_command('upload', 'upload_public_cert') | ||
| g.custom_command('list', 'list_public_certs') | ||
| g.custom_show_command('show', 'show_public_cert') | ||
| g.custom_command('delete', 'delete_public_cert', confirmation=True) | ||
|
|
||
|
Comment on lines
+206
to
+211
|
||
| with self.command_group('webapp config backup') as g: | ||
| g.custom_command('list', 'list_backups') | ||
| g.custom_show_command('show', 'show_backup_configuration') | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -284,6 +284,15 @@ def create_webapp(cmd, resource_group_name, name, plan, runtime=None, startup_fi | |||||||||||||
| if name_validation.name_available: | ||||||||||||||
| site_config.app_settings.append(NameValuePair(name="WEBSITES_ENABLE_APP_SERVICE_STORAGE", | ||||||||||||||
| value="false")) | ||||||||||||||
| if container_registry_url: | ||||||||||||||
| site_config.app_settings.append(NameValuePair(name="DOCKER_REGISTRY_SERVER_URL", | ||||||||||||||
| value=container_registry_url)) | ||||||||||||||
| if container_registry_user: | ||||||||||||||
| site_config.app_settings.append(NameValuePair(name="DOCKER_REGISTRY_SERVER_USERNAME", | ||||||||||||||
| value=container_registry_user)) | ||||||||||||||
| if container_registry_password: | ||||||||||||||
| site_config.app_settings.append(NameValuePair(name="DOCKER_REGISTRY_SERVER_PASSWORD", | ||||||||||||||
| value=container_registry_password)) | ||||||||||||||
|
Comment on lines
+287
to
+295
|
||||||||||||||
| elif multicontainer_config_type and multicontainer_config_file: | ||||||||||||||
| encoded_config_file = _get_linux_multicontainer_encoded_config_from_file(multicontainer_config_file) | ||||||||||||||
| site_config.linux_fx_version = _format_fx_version(encoded_config_file, multicontainer_config_type) | ||||||||||||||
|
|
@@ -5877,6 +5886,51 @@ def delete_ssl_cert(cmd, resource_group_name, certificate_thumbprint): | |||||||||||||
| raise ResourceNotFoundError("Certificate for thumbprint '{}' not found".format(certificate_thumbprint)) | ||||||||||||||
|
|
||||||||||||||
|
|
||||||||||||||
| def upload_public_cert(cmd, resource_group_name, name, public_certificate_name, | ||||||||||||||
| certificate_file, slot=None, | ||||||||||||||
| public_certificate_location='CurrentUserMy'): | ||||||||||||||
| PublicCertificate = cmd.get_models('PublicCertificate') | ||||||||||||||
| client = web_client_factory(cmd.cli_ctx) | ||||||||||||||
| with open(certificate_file, 'rb') as f: | ||||||||||||||
| cert_contents = f.read() | ||||||||||||||
| import base64 | ||||||||||||||
| cert_blob = base64.b64encode(cert_contents) | ||||||||||||||
| public_cert = PublicCertificate( | ||||||||||||||
| blob=cert_blob, | ||||||||||||||
|
Comment on lines
+5896
to
+5899
|
||||||||||||||
| import base64 | |
| cert_blob = base64.b64encode(cert_contents) | |
| public_cert = PublicCertificate( | |
| blob=cert_blob, | |
| public_cert = PublicCertificate( | |
| blob=cert_contents, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
public_certificate_nameis defined only as an optional flag (--public-certificate-name) and is not marked required. Forupload/show/delete, this parameter is mandatory; withoutrequired=True(or making it positional), the CLI will accept the command without it and fail later when calling the SDK withNone. Suggest marking it required for the specific subcommands (override in... public-cert listto keep it optional there).