Hello community,
here is the log from the commit of package azure-cli-container for
openSUSE:Factory checked in at 2018-05-13 16:01:54
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/azure-cli-container (Old)
and /work/SRC/openSUSE:Factory/.azure-cli-container.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "azure-cli-container"
Sun May 13 16:01:54 2018 rev:3 rq:600043 version:0.1.22
Changes:
--------
--- /work/SRC/openSUSE:Factory/azure-cli-container/azure-cli-container.changes
2018-02-14 09:30:29.189948795 +0100
+++
/work/SRC/openSUSE:Factory/.azure-cli-container.new/azure-cli-container.changes
2018-05-13 16:01:57.369137270 +0200
@@ -1,0 +2,8 @@
+Wed Apr 18 11:01:24 UTC 2018 - [email protected]
+
+- New upstream release
+ + Version 0.1.22
+- Move LICENSE.txt from %doc to %license section
+- Update Requires from setup.py
+
+-------------------------------------------------------------------
Old:
----
azure-cli-container-0.1.16.tar.gz
New:
----
azure-cli-container-0.1.22.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ azure-cli-container.spec ++++++
--- /var/tmp/diff_new_pack.ZGXdFf/_old 2018-05-13 16:01:58.129109543 +0200
+++ /var/tmp/diff_new_pack.ZGXdFf/_new 2018-05-13 16:01:58.129109543 +0200
@@ -17,7 +17,7 @@
Name: azure-cli-container
-Version: 0.1.16
+Version: 0.1.22
Release: 0
Summary: Microsoft Azure CLI 'container' Command Module
License: MIT
@@ -35,8 +35,10 @@
Requires: azure-cli-core
Requires: azure-cli-nspkg
Requires: python3-PyYAML
-Requires: python3-azure-mgmt-containerinstance >= 0.2.0
+Requires: python3-azure-mgmt-containerinstance >= 0.4.0
Requires: python3-azure-nspkg
+Requires: python3-colorama
+Requires: python3-websocket-client
Conflicts: azure-cli < 2.0.0
BuildArch: noarch
@@ -65,7 +67,8 @@
%files
%defattr(-,root,root,-)
-%doc HISTORY.rst LICENSE.txt README.rst
+%doc HISTORY.rst README.rst
+%license LICENSE.txt
%{python3_sitelib}/azure/cli/command_modules/container
%{python3_sitelib}/azure_cli_container-*.egg-info
++++++ azure-cli-container-0.1.16.tar.gz -> azure-cli-container-0.1.22.tar.gz
++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/azure-cli-container-0.1.16/HISTORY.rst
new/azure-cli-container-0.1.22/HISTORY.rst
--- old/azure-cli-container-0.1.16/HISTORY.rst 2018-01-05 22:11:35.000000000
+0100
+++ new/azure-cli-container-0.1.22/HISTORY.rst 2018-04-06 19:33:13.000000000
+0200
@@ -3,6 +3,33 @@
Release History
===============
+0.1.22
+++++++
+* Add Git Repo volume mount parameters '--gitrepo-url' '--gitrepo-dir'
'--gitrepo-revision' and '--gitrepo-mount-path'
+
+0.1.21
+++++++
+* Fixed [#5926](https://github.com/Azure/azure-cli/issues/5926): Fix `az
container exec` failing when --container-name specified
+* `sdist` is now compatible with wheel 0.31.0
+
+0.1.20
+++++++
+* Add 'az container exec' command that allows for exec commands in a container
for a running container group.
+* Allow table output for creating and updating a container group.
+
+0.1.19
+++++++
+* Add '--secrets' and '--secrets-mount-path' options to 'az container create'
for using secrets in ACI
+
+0.1.18
+++++++
+* Add '--follow' option to 'az container logs' for streaming logs
+* Add 'az container attach' command that attaches local standard output and
error streams to a container in a container group.
+
+0.1.17
+++++++
+* Minor fixes
+
0.1.16
++++++
* Update for CLI core changes.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/azure-cli-container-0.1.16/PKG-INFO
new/azure-cli-container-0.1.22/PKG-INFO
--- old/azure-cli-container-0.1.16/PKG-INFO 2018-01-05 22:11:53.000000000
+0100
+++ new/azure-cli-container-0.1.22/PKG-INFO 2018-04-06 19:33:36.000000000
+0200
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: azure-cli-container
-Version: 0.1.16
+Version: 0.1.22
Summary: Microsoft Azure Command-Line Tools container Command Module
Home-page: https://github.com/Azure/azure-cli
Author: Microsoft Corporation
@@ -18,6 +18,7 @@
az container: Manage Azure Container Instances.
Commands:
+ attach: Attach local standard output and error streams to a
container in a container group.
create: Create a container group.
delete: Delete a container group.
list : List container groups.
@@ -39,8 +40,8 @@
--command-line : The command line to run when
the container is started, e.g.
'/bin/bash -c myscript.sh'.
--cpu : The required number of CPU
cores of the containers. Default: 1.
- --environment-variables -e : A list of environment variable
for the container. Space
- separated values in
'key=value' format.
+ --environment-variables -e : A list of environment variable
for the container.
+ Space-separated values in
'key=value' format.
--ip-address : The IP address type of the
container group. Allowed values:
Public.
--location -l : Location. You can configure
the default location using `az
@@ -104,7 +105,7 @@
Arguments
Resource Id Arguments
- --ids : One or more resource IDs (space
delimited). If provided, no other 'Resource
+ --ids : One or more resource IDs
(space-delimited). If provided, no other 'Resource
Id' arguments should be specified.
--name -n : The name of the container group.
--resource-group -g: Name of resource group. You can configure
the default group using `az
@@ -129,7 +130,7 @@
--container-name : The container name to tail the logs.
Resource Id Arguments
- --ids : One or more resource IDs (space
delimited). If provided, no other 'Resource
+ --ids : One or more resource IDs
(space-delimited). If provided, no other 'Resource
Id' arguments should be specified.
--name -n : The name of the container group.
--resource-group -g: Name of resource group. You can configure
the default group using `az
@@ -154,7 +155,7 @@
--yes -y : Do not prompt for confirmation.
Resource Id Arguments
- --ids : One or more resource IDs (space
delimited). If provided, no other 'Resource
+ --ids : One or more resource IDs
(space-delimited). If provided, no other 'Resource
Id' arguments should be specified.
--name -n : The name of the container group.
--resource-group -g: Name of resource group. You can configure
the default group using `az
@@ -187,12 +188,66 @@
examples.
--verbose : Increase logging verbosity. Use --debug
for full debug logs.
+ Commands to attach to a container in a container group
+ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ ::
+
+ Command
+ az container attach: Attach local standard output and error
streams to a container in a
+ container group.
+
+ Arguments
+ --container-name : The container to attach to. If omitted,
the first container in the
+ container group will be chosen.
+
+ Resource Id Arguments
+ --ids : One or more resource IDs (space
delimited). If provided, no other 'Resource
+ Id' arguments should be specified.
+ --name -n : The name of the container group.
+ --resource-group -g: Name of resource group. You can configure
the default group using `az
+ configure --defaults group=<name>`.
+
+ Global Arguments
+ --debug : Increase logging verbosity to show all
debug logs.
+ --help -h : Show this help message and exit.
+ --output -o : Output format. Allowed values: json,
jsonc, table, tsv. Default: json.
+ --query : JMESPath query string. See
http://jmespath.org/ for more information and
+ examples.
+ --verbose : Increase logging verbosity. Use --debug
for full debug logs.
+
.. :changelog:
Release History
===============
+ 0.1.22
+ ++++++
+ * Add Git Repo volume mount parameters '--gitrepo-url' '--gitrepo-dir'
'--gitrepo-revision' and '--gitrepo-mount-path'
+
+ 0.1.21
+ ++++++
+ * Fixed [#5926](https://github.com/Azure/azure-cli/issues/5926): Fix
`az container exec` failing when --container-name specified
+ * `sdist` is now compatible with wheel 0.31.0
+
+ 0.1.20
+ ++++++
+ * Add 'az container exec' command that allows for exec commands in a
container for a running container group.
+ * Allow table output for creating and updating a container group.
+
+ 0.1.19
+ ++++++
+ * Add '--secrets' and '--secrets-mount-path' options to 'az container
create' for using secrets in ACI
+
+ 0.1.18
+ ++++++
+ * Add '--follow' option to 'az container logs' for streaming logs
+ * Add 'az container attach' command that attaches local standard
output and error streams to a container in a container group.
+
+ 0.1.17
+ ++++++
+ * Minor fixes
+
0.1.16
++++++
* Update for CLI core changes.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/azure-cli-container-0.1.16/README.rst
new/azure-cli-container-0.1.22/README.rst
--- old/azure-cli-container-0.1.16/README.rst 2018-01-05 22:11:35.000000000
+0100
+++ new/azure-cli-container-0.1.22/README.rst 2018-04-06 19:33:13.000000000
+0200
@@ -9,6 +9,7 @@
az container: Manage Azure Container Instances.
Commands:
+ attach: Attach local standard output and error streams to a container
in a container group.
create: Create a container group.
delete: Delete a container group.
list : List container groups.
@@ -30,8 +31,8 @@
--command-line : The command line to run when the
container is started, e.g.
'/bin/bash -c myscript.sh'.
--cpu : The required number of CPU cores of
the containers. Default: 1.
- --environment-variables -e : A list of environment variable for the
container. Space
- separated values in 'key=value' format.
+ --environment-variables -e : A list of environment variable for the
container.
+ Space-separated values in 'key=value'
format.
--ip-address : The IP address type of the container
group. Allowed values:
Public.
--location -l : Location. You can configure the
default location using `az
@@ -95,7 +96,7 @@
Arguments
Resource Id Arguments
- --ids : One or more resource IDs (space delimited). If
provided, no other 'Resource
+ --ids : One or more resource IDs (space-delimited). If
provided, no other 'Resource
Id' arguments should be specified.
--name -n : The name of the container group.
--resource-group -g: Name of resource group. You can configure the
default group using `az
@@ -120,7 +121,7 @@
--container-name : The container name to tail the logs.
Resource Id Arguments
- --ids : One or more resource IDs (space delimited). If
provided, no other 'Resource
+ --ids : One or more resource IDs (space-delimited). If
provided, no other 'Resource
Id' arguments should be specified.
--name -n : The name of the container group.
--resource-group -g: Name of resource group. You can configure the
default group using `az
@@ -145,7 +146,7 @@
--yes -y : Do not prompt for confirmation.
Resource Id Arguments
- --ids : One or more resource IDs (space delimited). If
provided, no other 'Resource
+ --ids : One or more resource IDs (space-delimited). If
provided, no other 'Resource
Id' arguments should be specified.
--name -n : The name of the container group.
--resource-group -g: Name of resource group. You can configure the
default group using `az
@@ -170,6 +171,33 @@
--resource-group -g: Name of resource group. You can configure the
default group using `az
configure --defaults group=<name>`.
+ Global Arguments
+ --debug : Increase logging verbosity to show all debug logs.
+ --help -h : Show this help message and exit.
+ --output -o : Output format. Allowed values: json, jsonc,
table, tsv. Default: json.
+ --query : JMESPath query string. See http://jmespath.org/
for more information and
+ examples.
+ --verbose : Increase logging verbosity. Use --debug for full
debug logs.
+
+Commands to attach to a container in a container group
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+::
+
+ Command
+ az container attach: Attach local standard output and error streams to
a container in a
+ container group.
+
+ Arguments
+ --container-name : The container to attach to. If omitted, the first
container in the
+ container group will be chosen.
+
+ Resource Id Arguments
+ --ids : One or more resource IDs (space delimited). If
provided, no other 'Resource
+ Id' arguments should be specified.
+ --name -n : The name of the container group.
+ --resource-group -g: Name of resource group. You can configure the
default group using `az
+ configure --defaults group=<name>`.
+
Global Arguments
--debug : Increase logging verbosity to show all debug logs.
--help -h : Show this help message and exit.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/azure-cli-container-0.1.16/azure/cli/command_modules/container/_client_factory.py
new/azure-cli-container-0.1.22/azure/cli/command_modules/container/_client_factory.py
---
old/azure-cli-container-0.1.16/azure/cli/command_modules/container/_client_factory.py
2018-01-05 22:11:35.000000000 +0100
+++
new/azure-cli-container-0.1.22/azure/cli/command_modules/container/_client_factory.py
2018-04-06 19:33:13.000000000 +0200
@@ -16,3 +16,7 @@
def cf_container_logs(cli_ctx, *_):
return _container_instance_client_factory(cli_ctx).container_logs
+
+
+def cf_start_container(cli_ctx, *_):
+ return _container_instance_client_factory(cli_ctx).start_container
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/azure-cli-container-0.1.16/azure/cli/command_modules/container/_format.py
new/azure-cli-container-0.1.22/azure/cli/command_modules/container/_format.py
---
old/azure-cli-container-0.1.16/azure/cli/command_modules/container/_format.py
2018-01-05 22:11:35.000000000 +0100
+++
new/azure-cli-container-0.1.22/azure/cli/command_modules/container/_format.py
2018-04-06 19:33:13.000000000 +0200
@@ -44,11 +44,6 @@
return None
-def transform_log_output(result):
- '''Print log. '''
- print(result)
-
-
def transform_container_group(result):
"""Transform a container group to table output. """
return OrderedDict([('Name', result['name']),
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/azure-cli-container-0.1.16/azure/cli/command_modules/container/_help.py
new/azure-cli-container-0.1.22/azure/cli/command_modules/container/_help.py
--- old/azure-cli-container-0.1.16/azure/cli/command_modules/container/_help.py
2018-01-05 22:11:35.000000000 +0100
+++ new/azure-cli-container-0.1.22/azure/cli/command_modules/container/_help.py
2018-04-06 19:33:13.000000000 +0200
@@ -8,7 +8,7 @@
helps['container'] = """
type: group
- short-summary: (PREVIEW) Manage Azure Container Instances.
+ short-summary: Manage Azure Container Instances.
"""
helps['container create'] = """
@@ -16,23 +16,27 @@
short-summary: Create a container group.
examples:
- name: Create a container in a container group with 1 core and 1Gb of
memory.
- text: az container create -g MyResourceGroup --name myalpine --image
alpine:latest --cpu 1 --memory 1
+ text: az container create -g MyResourceGroup --name myapp --image
myimage:latest --cpu 1 --memory 1
- name: Create a container in a container group that runs Windows,
with 2 cores and 3.5Gb of memory.
text: az container create -g MyResourceGroup --name mywinapp --image
winappimage:latest --os-type Windows --cpu 2 --memory 3.5
- name: Create a container in a container group with public IP address
and ports.
- text: az container create -g MyResourceGroup --name myalpine --image
alpine:latest --ip-address public --ports 80 443
+ text: az container create -g MyResourceGroup --name myapp --image
myimage:latest --ip-address public --ports 80 443
+ - name: Create a container in a container group with public IP
address, ports and DNS name label.
+ text: az container create -g MyResourceGroup --name myapp --image
myimage:latest --ports 80 443 --dns-name-label contoso
- name: Create a container in a container group that invokes a script
upon start.
- text: az container create -g MyResourceGroup --name myalpine --image
alpine:latest --command-line "/bin/sh -c '/path to/myscript.sh'"
+ text: az container create -g MyResourceGroup --name myapp --image
myimage:latest --command-line "/bin/sh -c '/path to/myscript.sh'"
- name: Create a container in a container group that runs a command
and stop the container afterwards.
- text: az container create -g MyResourceGroup --name myalpine --image
alpine:latest --command-line "echo hello" --restart-policy Never
+ text: az container create -g MyResourceGroup --name myapp --image
myimage:latest --command-line "echo hello" --restart-policy Never
- name: Create a container in a container group with environment
variables.
- text: az container create -g MyResourceGroup --name myalpine --image
alpine:latest -e key1=value1 key2=value2
+ text: az container create -g MyResourceGroup --name myapp --image
myimage:latest -e key1=value1 key2=value2
- name: Create a container in a container group using container image
from Azure Container Registry.
- text: az container create -g MyResourceGroup --name myalpine --image
myAcrRegistry.azurecr.io/alpine:latest --registry-password password
+ text: az container create -g MyResourceGroup --name myapp --image
myAcrRegistry.azurecr.io/myimage:latest --registry-password password
- name: Create a container in a container group using container image
from another private container image registry.
text: az container create -g MyResourceGroup --name myapp --image
myimage:latest --cpu 1 --memory 1.5 --registry-login-server myregistry.com
--registry-username username --registry-password password
- name: Create a container in a container group that mounts an Azure
File share as volume.
- text: az container create -g MyResourceGroup --name myapp --image
alpine:latest --command-line "cat /mnt/azfile/myfile"
--azure-file-volume-share-name myshare --azure-file-volume-account-name
mystorageaccount --azure-file-volume-account-key mystoragekey
--azure-file-volume-mount-path /mnt/azfile
+ text: az container create -g MyResourceGroup --name myapp --image
myimage:latest --command-line "cat /mnt/azfile/myfile"
--azure-file-volume-share-name myshare --azure-file-volume-account-name
mystorageaccount --azure-file-volume-account-key mystoragekey
--azure-file-volume-mount-path /mnt/azfile
+ - name: Create a container in a container group that mounts a git repo
as volume.
+ text: az container create -g MyResourceGroup --name myapp --image
myimage:latest --command-line "cat /mnt/gitrepo" --gitrepo-url
https://github.com/user/myrepo.git --gitrepo-dir ./dir1 --gitrepo-mount-path
/mnt/gitrepo
"""
helps['container delete'] = """
@@ -52,5 +56,19 @@
helps['container logs'] = """
type: command
- short-summary: Examine the logs for a container group.
+ short-summary: Examine the logs for a container in a container group.
+"""
+
+helps['container exec'] = """
+ type: command
+ short-summary: Execute a command from within a running container of a
container group.
+ long-summary: The most common use case is to open an interactive bash
shell. See examples below. This command is currently not supported for Windows
machines.
+ examples:
+ - name: Stream a shell from within an nginx container.
+ text: az container exec -g MyResourceGroup --name mynginx
--container-name nginx --exec-command "/bin/bash"
+"""
+
+helps['container attach'] = """
+ type: command
+ short-summary: Attach local standard output and error streams to a
container in a container group.
"""
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/azure-cli-container-0.1.16/azure/cli/command_modules/container/_params.py
new/azure-cli-container-0.1.22/azure/cli/command_modules/container/_params.py
---
old/azure-cli-container-0.1.16/azure/cli/command_modules/container/_params.py
2018-01-05 22:11:35.000000000 +0100
+++
new/azure-cli-container-0.1.22/azure/cli/command_modules/container/_params.py
2018-04-06 19:33:13.000000000 +0200
@@ -4,12 +4,13 @@
#
--------------------------------------------------------------------------------------------
from knack.util import CLIError
+from knack.arguments import CLIArgumentType
from azure.cli.core.commands.parameters import (get_enum_type,
get_location_type,
resource_group_name_type)
from azure.cli.core.commands.validators import
get_default_location_from_resource_group
from azure.mgmt.containerinstance.models import (ContainerGroupRestartPolicy,
OperatingSystemTypes)
-from ._validators import validate_volume_mount_path
+from ._validators import validate_volume_mount_path, validate_secrets,
validate_gitrepo_directory
# pylint: disable=line-too-long
@@ -17,7 +18,7 @@
def _environment_variables_type(value):
- """Space separated values in 'key=value' format."""
+ """Space-separated values in 'key=value' format."""
try:
env_name, env_value = value.split('=', 1)
except ValueError:
@@ -27,6 +28,13 @@
return {'name': env_name, 'value': env_value}
+secrets_type = CLIArgumentType(
+ validator=validate_secrets,
+ help="space-separated secrets in 'key=value' format.",
+ nargs='+'
+)
+
+
def load_arguments(self, _):
with self.argument_context('container') as c:
c.argument('resource_group_name', arg_type=resource_group_name_type)
@@ -41,9 +49,12 @@
c.argument('os_type', arg_type=get_enum_type(OperatingSystemTypes),
help='The OS type of the containers')
c.argument('ip_address', arg_type=get_enum_type(IP_ADDRESS_TYPES),
help='The IP address type of the container group')
c.argument('ports', type=int, nargs='+', default=[80], help='The ports
to open')
+ c.argument('dns_name_label', help='The dns name label for container
group with public IP')
c.argument('restart_policy',
arg_type=get_enum_type(ContainerGroupRestartPolicy), help='Restart policy for
all containers within the container group')
c.argument('command_line', help='The command line to run when the
container is started, e.g. \'/bin/bash -c myscript.sh\'')
- c.argument('environment_variables', nargs='+',
options_list=['--environment-variables', '-e'],
type=_environment_variables_type, help='A list of environment variable for the
container. Space separated values in \'key=value\' format.')
+ c.argument('environment_variables', nargs='+',
options_list=['--environment-variables', '-e'],
type=_environment_variables_type, help='A list of environment variable for the
container. Space-separated values in \'key=value\' format.')
+ c.argument('secrets', secrets_type)
+ c.argument('secrets_mount_path', validator=validate_volume_mount_path,
help="The path within the container where the secrets volume should be mounted.
Must not contain colon ':'.")
with self.argument_context('container create', arg_group='Image Registry')
as c:
c.argument('registry_login_server', help='The container image registry
login server')
@@ -54,7 +65,23 @@
c.argument('azure_file_volume_share_name', help='The name of the Azure
File share to be mounted as a volume')
c.argument('azure_file_volume_account_name', help='The name of the
storage account that contains the Azure File share')
c.argument('azure_file_volume_account_key', help='The storage account
access key used to access the Azure File share')
- c.argument('azure_file_volume_mount_path',
validator=validate_volume_mount_path, help='The path within the container where
the volume should be mounted. Must not contain colon (:).')
+ c.argument('azure_file_volume_mount_path',
validator=validate_volume_mount_path, help="The path within the container where
the azure file volume should be mounted. Must not contain colon ':'.")
+
+ with self.argument_context('container create', arg_group='Git Repo
Volume') as c:
+ c.argument('gitrepo_url', help='The URL of a git repository to be
mounted as a volume')
+ c.argument('gitrepo_dir', validator=validate_gitrepo_directory,
help="The target directory path in the git repository. Must not contain '..'.")
+ c.argument('gitrepo_revision', help='The commit hash for the specified
revision')
+ c.argument('gitrepo_mount_path', validator=validate_volume_mount_path,
help="The path within the container where the git repo volume should be
mounted. Must not contain colon ':'.")
with self.argument_context('container logs') as c:
- c.argument('container_name', help='The container name to tail the
logs')
+ c.argument('container_name', help='The container name to tail the
logs. If omitted, the first container in the container group will be chosen')
+ c.argument('follow', help='Indicate to stream the tailing logs',
action='store_true')
+
+ with self.argument_context('container exec') as c:
+ c.argument('container_name', help='The container name where to execute
the command. Can be ommitted for container groups with only one container.')
+ c.argument('exec_command', help='The command to run from within the
container')
+ c.argument('terminal_row_size', help='The row size for the command
output')
+ c.argument('terminal_col_size', help='The col size for the command
output')
+
+ with self.argument_context('container attach') as c:
+ c.argument('container_name', help='The container to attach to. If
omitted, the first container in the container group will be chosen')
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/azure-cli-container-0.1.16/azure/cli/command_modules/container/_validators.py
new/azure-cli-container-0.1.22/azure/cli/command_modules/container/_validators.py
---
old/azure-cli-container-0.1.16/azure/cli/command_modules/container/_validators.py
2018-01-05 22:11:35.000000000 +0100
+++
new/azure-cli-container-0.1.22/azure/cli/command_modules/container/_validators.py
2018-04-06 19:33:13.000000000 +0200
@@ -3,9 +3,35 @@
# Licensed under the MIT License. See License.txt in the project root for
license information.
#
--------------------------------------------------------------------------------------------
+from base64 import b64encode
from knack.util import CLIError
def validate_volume_mount_path(ns):
if ns.azure_file_volume_mount_path and ':' in
ns.azure_file_volume_mount_path:
- raise CLIError("The Azure File volume mount path cannot container ':'")
+ raise CLIError("The volume mount path cannot contain ':'")
+
+
+def validate_secrets(ns):
+ """ Extracts multiple space-separated secrets in key=value format """
+ if isinstance(ns.secrets, list):
+ secrets_dict = {}
+ for item in ns.secrets:
+ secrets_dict.update(validate_secret(item))
+ ns.secrets = secrets_dict
+
+
+def validate_secret(string):
+ """ Extracts a single secret in key=value format """
+ result = {}
+ if string:
+ comps = string.split('=', 1)
+ if len(comps) != 2:
+ raise CLIError("Secrets need to be specifed in key=value format.")
+ result = {comps[0]:
b64encode(comps[1].encode('ascii')).decode('ascii')}
+ return result
+
+
+def validate_gitrepo_directory(ns):
+ if ns.gitrepo_dir and '..' in ns.gitrepo_dir:
+ raise CLIError("The git repo directory cannot contain '..'")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/azure-cli-container-0.1.16/azure/cli/command_modules/container/commands.py
new/azure-cli-container-0.1.22/azure/cli/command_modules/container/commands.py
---
old/azure-cli-container-0.1.16/azure/cli/command_modules/container/commands.py
2018-01-05 22:11:35.000000000 +0100
+++
new/azure-cli-container-0.1.22/azure/cli/command_modules/container/commands.py
2018-04-06 19:33:13.000000000 +0200
@@ -5,14 +5,16 @@
from azure.cli.core.util import empty_on_404
from ._client_factory import cf_container_groups, cf_container_logs
-from ._format import transform_log_output, transform_container_group_list,
transform_container_group
+from ._format import transform_container_group_list, transform_container_group
def load_command_table(self, _):
with self.command_group('container', client_factory=cf_container_groups)
as g:
g.custom_command('list', 'list_containers',
table_transformer=transform_container_group_list)
- g.custom_command('create', 'create_container',
table_transformer=transform_container_group_list)
+ g.custom_command('create', 'create_container',
table_transformer=transform_container_group)
g.custom_command('show', 'get_container',
exception_handler=empty_on_404,
table_transformer=transform_container_group)
g.custom_command('delete', 'delete_container', confirmation=True)
- g.custom_command('logs', 'container_logs',
client_factory=cf_container_logs, transform=transform_log_output)
+ g.custom_command('logs', 'container_logs',
client_factory=cf_container_logs)
+ g.custom_command('exec', 'container_exec')
+ g.custom_command('attach', 'attach_to_container')
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/azure-cli-container-0.1.16/azure/cli/command_modules/container/custom.py
new/azure-cli-container-0.1.22/azure/cli/command_modules/container/custom.py
---
old/azure-cli-container-0.1.16/azure/cli/command_modules/container/custom.py
2018-01-05 22:11:35.000000000 +0100
+++
new/azure-cli-container-0.1.22/azure/cli/command_modules/container/custom.py
2018-04-06 19:33:13.000000000 +0200
@@ -5,16 +5,41 @@
# pylint:
disable=too-few-public-methods,too-many-arguments,no-self-use,too-many-locals,line-too-long,unused-argument
+import errno
+try:
+ import msvcrt
+except ImportError:
+ # Not supported for Linux machines.
+ pass
+import platform
+import select
import shlex
+import signal
+import sys
+import threading
+import time
+try:
+ import termios
+ import tty
+except ImportError:
+ # Not supported for Windows machines.
+ pass
+import websocket
+from knack.log import get_logger
from knack.prompting import prompt_pass, NoTTYException
from knack.util import CLIError
-from azure.mgmt.containerinstance.models import (ContainerGroup, Container,
ContainerPort, Port, IpAddress,
- ImageRegistryCredential,
ResourceRequirements, ResourceRequests,
-
ContainerGroupNetworkProtocol, Volume, AzureFileVolume, VolumeMount)
-
+from azure.mgmt.containerinstance.models import (AzureFileVolume, Container,
ContainerGroup, ContainerGroupNetworkProtocol,
+ ContainerPort,
ImageRegistryCredential, IpAddress, Port, ResourceRequests,
+ ResourceRequirements, Volume,
VolumeMount, ContainerExecRequestTerminalSize,
+ GitRepoVolume)
+from ._client_factory import cf_container_groups, cf_container_logs,
cf_start_container
+logger = get_logger(__name__)
+WINDOWS_NAME = 'Windows'
ACR_SERVER_SUFFIX = '.azurecr.io/'
AZURE_FILE_VOLUME_NAME = 'azurefile'
+SECRETS_VOLUME_NAME = 'secrets'
+GITREPO_VOLUME_NAME = 'gitrepo'
def list_containers(client, resource_group_name=None):
@@ -45,6 +70,7 @@
ports=None,
os_type='Linux',
ip_address=None,
+ dns_name_label=None,
command_line=None,
environment_variables=None,
registry_login_server=None,
@@ -53,28 +79,55 @@
azure_file_volume_share_name=None,
azure_file_volume_account_name=None,
azure_file_volume_account_key=None,
- azure_file_volume_mount_path=None):
+ azure_file_volume_mount_path=None,
+ gitrepo_url=None,
+ gitrepo_dir='.',
+ gitrepo_revision=None,
+ gitrepo_mount_path=None,
+ secrets=None,
+ secrets_mount_path=None):
"""Create a container group. """
ports = ports or [80]
- container_resource_requirements = create_resource_requirements(cpu=cpu,
memory=memory)
+ container_resource_requirements = _create_resource_requirements(cpu=cpu,
memory=memory)
- image_registry_credentials =
create_image_registry_credentials(registry_login_server=registry_login_server,
-
registry_username=registry_username,
-
registry_password=registry_password,
- image=image)
+ image_registry_credentials =
_create_image_registry_credentials(registry_login_server=registry_login_server,
+
registry_username=registry_username,
+
registry_password=registry_password,
+
image=image)
command = shlex.split(command_line) if command_line else None
- azure_file_volume =
create_azure_file_volume(azure_file_volume_share_name=azure_file_volume_share_name,
-
azure_file_volume_account_name=azure_file_volume_account_name,
-
azure_file_volume_account_key=azure_file_volume_account_key)
+ volumes = []
+ mounts = []
- azure_file_volume_mount =
create_azure_file_volume_mount(azure_file_volume=azure_file_volume,
-
azure_file_volume_mount_path=azure_file_volume_mount_path)
+ azure_file_volume =
_create_azure_file_volume(azure_file_volume_share_name=azure_file_volume_share_name,
+
azure_file_volume_account_name=azure_file_volume_account_name,
+
azure_file_volume_account_key=azure_file_volume_account_key)
+ azure_file_volume_mount =
_create_azure_file_volume_mount(azure_file_volume=azure_file_volume,
+
azure_file_volume_mount_path=azure_file_volume_mount_path)
+
+ if azure_file_volume:
+ volumes.append(azure_file_volume)
+ mounts.append(azure_file_volume_mount)
+
+ secrets_volume = _create_secrets_volume(secrets)
+ secrets_volume_mount =
_create_secrets_volume_mount(secrets_volume=secrets_volume,
+
secrets_mount_path=secrets_mount_path)
+
+ if secrets_volume:
+ volumes.append(secrets_volume)
+ mounts.append(secrets_volume_mount)
+
+ gitrepo_volume = _create_gitrepo_volume(gitrepo_url=gitrepo_url,
gitrepo_dir=gitrepo_dir, gitrepo_revision=gitrepo_revision)
+ gitrepo_volume_mount =
_create_gitrepo_volume_mount(gitrepo_volume=gitrepo_volume,
gitrepo_mount_path=gitrepo_mount_path)
+
+ if gitrepo_volume:
+ volumes.append(gitrepo_volume)
+ mounts.append(gitrepo_volume_mount)
- cgroup_ip_address = create_ip_address(ip_address, ports)
+ cgroup_ip_address = _create_ip_address(ip_address, ports, dns_name_label)
container = Container(name=name,
image=image,
@@ -82,7 +135,7 @@
command=command,
ports=[ContainerPort(port=p) for p in ports] if
cgroup_ip_address else None,
environment_variables=environment_variables,
- volume_mounts=azure_file_volume_mount)
+ volume_mounts=mounts or None)
cgroup = ContainerGroup(location=location,
containers=[container],
@@ -90,20 +143,21 @@
restart_policy=restart_policy,
ip_address=cgroup_ip_address,
image_registry_credentials=image_registry_credentials,
- volumes=azure_file_volume)
+ volumes=volumes or None)
- return client.create_or_update(resource_group_name, name, cgroup)
+ raw_response = client.create_or_update(resource_group_name, name, cgroup,
raw=True)
+ return raw_response.output
# pylint: disable=inconsistent-return-statements
-def create_resource_requirements(cpu, memory):
+def _create_resource_requirements(cpu, memory):
"""Create resource requirements. """
if cpu or memory:
container_resource_requests = ResourceRequests(memory_in_gb=memory,
cpu=cpu)
return ResourceRequirements(requests=container_resource_requests)
-def create_image_registry_credentials(registry_login_server,
registry_username, registry_password, image):
+def _create_image_registry_credentials(registry_login_server,
registry_username, registry_password, image):
"""Create image registry credentials. """
image_registry_credentials = None
if registry_login_server:
@@ -136,7 +190,7 @@
return image_registry_credentials
-def create_azure_file_volume(azure_file_volume_share_name,
azure_file_volume_account_name, azure_file_volume_account_key):
+def _create_azure_file_volume(azure_file_volume_share_name,
azure_file_volume_account_name, azure_file_volume_account_key):
"""Create Azure File volume. """
azure_file_volume = None
if azure_file_volume_share_name:
@@ -152,29 +206,296 @@
storage_account_name=azure_file_volume_account_name,
storage_account_key=azure_file_volume_account_key)
- return [Volume(name=AZURE_FILE_VOLUME_NAME, azure_file=azure_file_volume)]
if azure_file_volume else None
+ return Volume(name=AZURE_FILE_VOLUME_NAME, azure_file=azure_file_volume)
if azure_file_volume else None
+
+
+def _create_secrets_volume(secrets):
+ """Create secrets volume. """
+ return Volume(name=SECRETS_VOLUME_NAME, secret=secrets) if secrets else
None
+
+
+def _create_gitrepo_volume(gitrepo_url, gitrepo_dir, gitrepo_revision):
+ """Create Git Repo volume. """
+ gitrepo_volume = GitRepoVolume(repository=gitrepo_url,
directory=gitrepo_dir, revision=gitrepo_revision)
+
+ return Volume(name=GITREPO_VOLUME_NAME, git_repo=gitrepo_volume) if
gitrepo_url else None
# pylint: disable=inconsistent-return-statements
-def create_azure_file_volume_mount(azure_file_volume,
azure_file_volume_mount_path):
+def _create_azure_file_volume_mount(azure_file_volume,
azure_file_volume_mount_path):
"""Create Azure File volume mount. """
if azure_file_volume_mount_path:
if not azure_file_volume:
raise CLIError('Please specify --azure-file-volume-share-name
--azure-file-volume-account-name --azure-file-volume-account-key '
'to enable Azure File volume mount.')
- return [VolumeMount(name=AZURE_FILE_VOLUME_NAME,
mount_path=azure_file_volume_mount_path)]
+ return VolumeMount(name=AZURE_FILE_VOLUME_NAME,
mount_path=azure_file_volume_mount_path)
+
+
+def _create_secrets_volume_mount(secrets_volume, secrets_mount_path):
+ """Create secrets volume mount. """
+ if secrets_volume:
+ if not secrets_mount_path:
+ raise CLIError('Please specify --secrets --secrets-mount-path '
+ 'to enable secrets volume mount.')
+ return VolumeMount(name=SECRETS_VOLUME_NAME,
mount_path=secrets_mount_path)
+
+
+def _create_gitrepo_volume_mount(gitrepo_volume, gitrepo_mount_path):
+ """Create Git Repo volume mount. """
+ if gitrepo_mount_path:
+ if not gitrepo_volume:
+ raise CLIError('Please specify --gitrepo-url (--gitrepo-dir
--gitrepo-revision) '
+ 'to enable Git Repo volume mount.')
+ return VolumeMount(name=GITREPO_VOLUME_NAME,
mount_path=gitrepo_mount_path)
# pylint: disable=inconsistent-return-statements
-def create_ip_address(ip_address, ports):
+def _create_ip_address(ip_address, ports, dns_name_label):
"""Create IP address. """
- if ip_address and ip_address.lower() == 'public':
- return
IpAddress(ports=[Port(protocol=ContainerGroupNetworkProtocol.tcp, port=p) for p
in ports])
+ if (ip_address and ip_address.lower() == 'public') or dns_name_label:
+ return
IpAddress(ports=[Port(protocol=ContainerGroupNetworkProtocol.tcp, port=p) for p
in ports], dns_name_label=dns_name_label)
-def container_logs(client, resource_group_name, name, container_name=None):
+# pylint: disable=inconsistent-return-statements
+def container_logs(cmd, resource_group_name, name, container_name=None,
follow=False):
"""Tail a container instance log. """
+ logs_client = cf_container_logs(cmd.cli_ctx)
+ container_group_client = cf_container_groups(cmd.cli_ctx)
+ container_group = container_group_client.get(resource_group_name, name)
+
+ # If container name is not present, use the first container.
if container_name is None:
- container_name = name
- log = client.list(resource_group_name, name, container_name)
- return log.content
+ container_name = container_group.containers[0].name
+
+ if not follow:
+ log = logs_client.list(resource_group_name, name, container_name)
+ print(log.content)
+ else:
+ _start_streaming(
+ terminate_condition=_is_container_terminated,
+ terminate_condition_args=(container_group_client,
resource_group_name, name, container_name),
+ shupdown_grace_period=5,
+ stream_target=_stream_logs,
+ stream_args=(logs_client, resource_group_name, name,
container_name, container_group.restart_policy))
+
+
+def container_exec(cmd, resource_group_name, name, exec_command,
container_name=None, terminal_row_size=20, terminal_col_size=80):
+ """Start exec for a container. """
+
+ start_container_client = cf_start_container(cmd.cli_ctx)
+ container_group_client = cf_container_groups(cmd.cli_ctx)
+ container_group = container_group_client.get(resource_group_name, name)
+
+ if container_name or container_name is None and
len(container_group.containers) == 1:
+ # If only one container in container group, use that container.
+ if container_name is None:
+ container_name = container_group.containers[0].name
+
+ terminal_size =
ContainerExecRequestTerminalSize(rows=terminal_row_size, cols=terminal_col_size)
+
+ execContainerResponse =
start_container_client.launch_exec(resource_group_name, name, container_name,
exec_command, terminal_size)
+
+ if platform.system() is WINDOWS_NAME:
+ _start_exec_pipe_win(execContainerResponse.web_socket_uri,
execContainerResponse.password)
+ else:
+ _start_exec_pipe(execContainerResponse.web_socket_uri,
execContainerResponse.password)
+
+ else:
+ raise CLIError('--container-name required when container group has
more than one container.')
+
+
+def _start_exec_pipe_win(web_socket_uri, password):
+
+ def _on_ws_open(ws):
+ ws.send(password)
+ t = threading.Thread(target=_capture_stdin, args=[ws])
+ t.daemon = True
+ t.start()
+
+ ws = websocket.WebSocketApp(web_socket_uri, on_open=_on_ws_open,
on_message=_on_ws_msg)
+
+ ws.run_forever()
+
+
+def _on_ws_msg(ws, msg):
+ sys.stdout.write(msg)
+ sys.stdout.flush()
+
+
+def _capture_stdin(ws):
+ while True:
+ if msvcrt.kbhit:
+ x = msvcrt.getch()
+ ws.send(x)
+
+
+def _start_exec_pipe(web_socket_uri, password):
+ ws = websocket.create_connection(web_socket_uri)
+
+ oldtty = termios.tcgetattr(sys.stdin)
+ old_handler = signal.getsignal(signal.SIGWINCH)
+
+ try:
+ tty.setraw(sys.stdin.fileno())
+ tty.setcbreak(sys.stdin.fileno())
+ ws.send(password)
+ while True:
+ try:
+ if not _cycle_exec_pipe(ws):
+ break
+ except (select.error, IOError) as e:
+ if e.args and e.args[0] == errno.EINTR:
+ pass
+ else:
+ raise
+ except websocket.WebSocketException:
+ pass
+ finally:
+ termios.tcsetattr(sys.stdin, termios.TCSADRAIN, oldtty)
+ signal.signal(signal.SIGWINCH, old_handler)
+
+
+def _cycle_exec_pipe(ws):
+ r, _, _ = select.select([ws.sock, sys.stdin], [], [])
+ if ws.sock in r:
+ data = ws.recv()
+ if not data:
+ return False
+ sys.stdout.write(data)
+ sys.stdout.flush()
+ if sys.stdin in r:
+ x = sys.stdin.read(1)
+ if not x:
+ return True
+ ws.send(x)
+ return True
+
+
+def attach_to_container(cmd, resource_group_name, name, container_name=None):
+ """Attach to a container. """
+ logs_client = cf_container_logs(cmd.cli_ctx)
+ container_group_client = cf_container_groups(cmd.cli_ctx)
+ container_group = container_group_client.get(resource_group_name, name)
+
+ # If container name is not present, use the first container.
+ if container_name is None:
+ container_name = container_group.containers[0].name
+
+ _start_streaming(
+ terminate_condition=_is_container_terminated,
+ terminate_condition_args=(container_group_client, resource_group_name,
name, container_name),
+ shupdown_grace_period=5,
+ stream_target=_stream_container_events_and_logs,
+ stream_args=(container_group_client, logs_client, resource_group_name,
name, container_name))
+
+
+def _start_streaming(terminate_condition, terminate_condition_args,
shupdown_grace_period, stream_target, stream_args):
+ """Start streaming for the stream target. """
+ import colorama
+ colorama.init()
+
+ try:
+ t = threading.Thread(target=stream_target, args=stream_args)
+ t.daemon = True
+ t.start()
+
+ while not terminate_condition(*terminate_condition_args) and
t.is_alive():
+ time.sleep(10)
+
+ time.sleep(shupdown_grace_period)
+
+ finally:
+ colorama.deinit()
+
+
+def _stream_logs(client, resource_group_name, name, container_name,
restart_policy):
+ """Stream logs for a container. """
+ lastOutputLines = 0
+ while True:
+ log = client.list(resource_group_name, name, container_name)
+ lines = log.content.split('\n')
+ currentOutputLines = len(lines)
+
+ # Should only happen when the container restarts.
+ if currentOutputLines < lastOutputLines and restart_policy != 'Never':
+ print("Warning: you're having '--restart-policy={}'; the container
'{}' was just restarted; the tail of the current log might be missing.
Exiting...".format(restart_policy, container_name))
+ break
+
+ _move_console_cursor_up(lastOutputLines)
+ print(log.content)
+
+ lastOutputLines = currentOutputLines
+ time.sleep(2)
+
+
+def _stream_container_events_and_logs(container_group_client, logs_client,
resource_group_name, name, container_name):
+ """Stream container events and logs. """
+ lastOutputLines = 0
+ lastContainerState = None
+
+ while True:
+ container_group, container = _find_container(container_group_client,
resource_group_name, name, container_name)
+
+ container_state = 'Unknown'
+ if container.instance_view and container.instance_view.current_state
and container.instance_view.current_state.state:
+ container_state = container.instance_view.current_state.state
+
+ _move_console_cursor_up(lastOutputLines)
+ if container_state != lastContainerState:
+ print("Container '{}' is in state '{}'...".format(container_name,
container_state))
+
+ currentOutputLines = 0
+ if container.instance_view and container.instance_view.events:
+ for event in sorted(container.instance_view.events, key=lambda e:
e.last_timestamp):
+ print('(count: {}) (last timestamp: {})
{}'.format(event.count, event.last_timestamp, event.message))
+ currentOutputLines += 1
+
+ lastOutputLines = currentOutputLines
+ lastContainerState = container_state
+
+ if container_state == 'Running':
+ print('\nStart streaming logs:')
+ break
+
+ time.sleep(2)
+
+ _stream_logs(logs_client, resource_group_name, name, container_name,
container_group.restart_policy)
+
+
+def _is_container_terminated(client, resource_group_name, name,
container_name):
+ """Check if a container should be considered terminated. """
+ container_group, container = _find_container(client, resource_group_name,
name, container_name)
+
+ # If a container group is terminated, assume the container is also
terminated.
+ if container_group.instance_view and container_group.instance_view.state:
+ if container_group.instance_view.state == 'Succeeded' or
container_group.instance_view.state == 'Failed':
+ return True
+
+ # If the restart policy is Always, assume the container will be restarted.
+ if container_group.restart_policy:
+ if container_group.restart_policy == 'Always':
+ return False
+
+ # Only assume the container is terminated if its state is Terminated.
+ if container.instance_view and container.instance_view.current_state and
container.instance_view.current_state.state == 'Terminated':
+ return True
+
+ return False
+
+
+def _find_container(client, resource_group_name, name, container_name):
+ """Find a container in a container group. """
+ container_group = client.get(resource_group_name, name)
+ containers = [c for c in container_group.containers if c.name ==
container_name]
+
+ if len(containers) != 1:
+ raise CLIError("Found 0 or more than 1 container with name
'{}'".format(container_name))
+
+ return container_group, containers[0]
+
+
+def _move_console_cursor_up(lines):
+ """Move console cursor up. """
+ if lines > 0:
+ # Use stdout.write to support Python 2
+ sys.stdout.write('\033[{}A\033[K\033[J'.format(lines))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/azure-cli-container-0.1.16/azure_cli_container.egg-info/PKG-INFO
new/azure-cli-container-0.1.22/azure_cli_container.egg-info/PKG-INFO
--- old/azure-cli-container-0.1.16/azure_cli_container.egg-info/PKG-INFO
2018-01-05 22:11:53.000000000 +0100
+++ new/azure-cli-container-0.1.22/azure_cli_container.egg-info/PKG-INFO
2018-04-06 19:33:36.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: azure-cli-container
-Version: 0.1.16
+Version: 0.1.22
Summary: Microsoft Azure Command-Line Tools container Command Module
Home-page: https://github.com/Azure/azure-cli
Author: Microsoft Corporation
@@ -18,6 +18,7 @@
az container: Manage Azure Container Instances.
Commands:
+ attach: Attach local standard output and error streams to a
container in a container group.
create: Create a container group.
delete: Delete a container group.
list : List container groups.
@@ -39,8 +40,8 @@
--command-line : The command line to run when
the container is started, e.g.
'/bin/bash -c myscript.sh'.
--cpu : The required number of CPU
cores of the containers. Default: 1.
- --environment-variables -e : A list of environment variable
for the container. Space
- separated values in
'key=value' format.
+ --environment-variables -e : A list of environment variable
for the container.
+ Space-separated values in
'key=value' format.
--ip-address : The IP address type of the
container group. Allowed values:
Public.
--location -l : Location. You can configure
the default location using `az
@@ -104,7 +105,7 @@
Arguments
Resource Id Arguments
- --ids : One or more resource IDs (space
delimited). If provided, no other 'Resource
+ --ids : One or more resource IDs
(space-delimited). If provided, no other 'Resource
Id' arguments should be specified.
--name -n : The name of the container group.
--resource-group -g: Name of resource group. You can configure
the default group using `az
@@ -129,7 +130,7 @@
--container-name : The container name to tail the logs.
Resource Id Arguments
- --ids : One or more resource IDs (space
delimited). If provided, no other 'Resource
+ --ids : One or more resource IDs
(space-delimited). If provided, no other 'Resource
Id' arguments should be specified.
--name -n : The name of the container group.
--resource-group -g: Name of resource group. You can configure
the default group using `az
@@ -154,7 +155,7 @@
--yes -y : Do not prompt for confirmation.
Resource Id Arguments
- --ids : One or more resource IDs (space
delimited). If provided, no other 'Resource
+ --ids : One or more resource IDs
(space-delimited). If provided, no other 'Resource
Id' arguments should be specified.
--name -n : The name of the container group.
--resource-group -g: Name of resource group. You can configure
the default group using `az
@@ -187,12 +188,66 @@
examples.
--verbose : Increase logging verbosity. Use --debug
for full debug logs.
+ Commands to attach to a container in a container group
+ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ ::
+
+ Command
+ az container attach: Attach local standard output and error
streams to a container in a
+ container group.
+
+ Arguments
+ --container-name : The container to attach to. If omitted,
the first container in the
+ container group will be chosen.
+
+ Resource Id Arguments
+ --ids : One or more resource IDs (space
delimited). If provided, no other 'Resource
+ Id' arguments should be specified.
+ --name -n : The name of the container group.
+ --resource-group -g: Name of resource group. You can configure
the default group using `az
+ configure --defaults group=<name>`.
+
+ Global Arguments
+ --debug : Increase logging verbosity to show all
debug logs.
+ --help -h : Show this help message and exit.
+ --output -o : Output format. Allowed values: json,
jsonc, table, tsv. Default: json.
+ --query : JMESPath query string. See
http://jmespath.org/ for more information and
+ examples.
+ --verbose : Increase logging verbosity. Use --debug
for full debug logs.
+
.. :changelog:
Release History
===============
+ 0.1.22
+ ++++++
+ * Add Git Repo volume mount parameters '--gitrepo-url' '--gitrepo-dir'
'--gitrepo-revision' and '--gitrepo-mount-path'
+
+ 0.1.21
+ ++++++
+ * Fixed [#5926](https://github.com/Azure/azure-cli/issues/5926): Fix
`az container exec` failing when --container-name specified
+ * `sdist` is now compatible with wheel 0.31.0
+
+ 0.1.20
+ ++++++
+ * Add 'az container exec' command that allows for exec commands in a
container for a running container group.
+ * Allow table output for creating and updating a container group.
+
+ 0.1.19
+ ++++++
+ * Add '--secrets' and '--secrets-mount-path' options to 'az container
create' for using secrets in ACI
+
+ 0.1.18
+ ++++++
+ * Add '--follow' option to 'az container logs' for streaming logs
+ * Add 'az container attach' command that attaches local standard
output and error streams to a container in a container group.
+
+ 0.1.17
+ ++++++
+ * Minor fixes
+
0.1.16
++++++
* Update for CLI core changes.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/azure-cli-container-0.1.16/azure_cli_container.egg-info/requires.txt
new/azure-cli-container-0.1.22/azure_cli_container.egg-info/requires.txt
--- old/azure-cli-container-0.1.16/azure_cli_container.egg-info/requires.txt
2018-01-05 22:11:53.000000000 +0100
+++ new/azure-cli-container-0.1.22/azure_cli_container.egg-info/requires.txt
2018-04-06 19:33:36.000000000 +0200
@@ -1,3 +1,5 @@
-azure-mgmt-containerinstance==0.2.0
+azure-mgmt-containerinstance==0.4.0
azure-cli-core
pyyaml
+colorama
+websocket-client
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/azure-cli-container-0.1.16/setup.py
new/azure-cli-container-0.1.22/setup.py
--- old/azure-cli-container-0.1.16/setup.py 2018-01-05 22:11:35.000000000
+0100
+++ new/azure-cli-container-0.1.22/setup.py 2018-04-06 19:33:13.000000000
+0200
@@ -14,7 +14,7 @@
logger.warn("Wheel is not available, disabling bdist_wheel hook")
cmdclass = {}
-VERSION = "0.1.16"
+VERSION = "0.1.22"
CLASSIFIERS = [
'Development Status :: 4 - Beta',
@@ -31,9 +31,11 @@
]
DEPENDENCIES = [
- 'azure-mgmt-containerinstance==0.2.0',
+ 'azure-mgmt-containerinstance==0.4.0',
'azure-cli-core',
'pyyaml',
+ 'colorama',
+ 'websocket-client'
]
with open('README.rst', 'r', encoding='utf-8') as f: