Hello community,

here is the log from the commit of package azure-cli-profile for 
openSUSE:Factory checked in at 2018-05-13 16:02:53
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/azure-cli-profile (Old)
 and      /work/SRC/openSUSE:Factory/.azure-cli-profile.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "azure-cli-profile"

Sun May 13 16:02:53 2018 rev:3 rq:600060 version:2.0.22

Changes:
--------
--- /work/SRC/openSUSE:Factory/azure-cli-profile/azure-cli-profile.changes      
2018-02-14 09:31:37.319480059 +0100
+++ /work/SRC/openSUSE:Factory/.azure-cli-profile.new/azure-cli-profile.changes 
2018-05-13 16:02:57.750934298 +0200
@@ -1,0 +2,7 @@
+Thu Apr 19 11:39:02 UTC 2018 - [email protected]
+
+- New upstream release
+  + Version 2.0.22
+- Move LICENSE.txt from %doc to %license section
+
+-------------------------------------------------------------------

Old:
----
  azure-cli-profile-2.0.18.tar.gz

New:
----
  azure-cli-profile-2.0.22.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ azure-cli-profile.spec ++++++
--- /var/tmp/diff_new_pack.THPaZc/_old  2018-05-13 16:02:58.294914452 +0200
+++ /var/tmp/diff_new_pack.THPaZc/_new  2018-05-13 16:02:58.294914452 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           azure-cli-profile
-Version:        2.0.18
+Version:        2.0.22
 Release:        0
 Summary:        Microsoft Azure CLI 'profile' Command Module
 License:        MIT
@@ -66,7 +66,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/profile
 %{python3_sitelib}/azure_cli_profile-*.egg-info
 

++++++ azure-cli-profile-2.0.18.tar.gz -> azure-cli-profile-2.0.22.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/azure-cli-profile-2.0.18/HISTORY.rst 
new/azure-cli-profile-2.0.22/HISTORY.rst
--- old/azure-cli-profile-2.0.18/HISTORY.rst    2018-01-26 17:12:24.000000000 
+0100
+++ new/azure-cli-profile-2.0.22/HISTORY.rst    2018-04-06 19:33:13.000000000 
+0200
@@ -2,6 +2,25 @@
 
 Release History
 ===============
+2.0.22
+++++++
+* account list: handle accounts which come from CLI 1.0/ASM mode
+* (Breaking change): remove `--msi` & `--msi-port` which were tagged 
`deprecating` 2 releases ago
+* `sdist` is now compatible with wheel 0.31.0
+
+2.0.21
+++++++
+* az login: warn on using --identity-port/--msi-port as they become useless 
with imds support
+
+2.0.20
+++++++
+* az login: use `--identity` and deprecate `--msi`
+* enable login/logout commands in cloud shell
+
+2.0.19
+++++++
+* Enable `az login` in from interactive mode.
+
 2.0.18
 ++++++
 * ensure 'get-access-token' work inside a VM with identity
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/azure-cli-profile-2.0.18/PKG-INFO 
new/azure-cli-profile-2.0.22/PKG-INFO
--- old/azure-cli-profile-2.0.18/PKG-INFO       2018-01-26 17:12:50.000000000 
+0100
+++ new/azure-cli-profile-2.0.22/PKG-INFO       2018-04-06 19:33:53.000000000 
+0200
@@ -1,11 +1,12 @@
 Metadata-Version: 1.1
 Name: azure-cli-profile
-Version: 2.0.18
+Version: 2.0.22
 Summary: Microsoft Azure Command-Line Tools Profile Command Module
 Home-page: https://github.com/Azure/azure-cli
 Author: Microsoft Corporation
 Author-email: [email protected]
 License: MIT
+Description-Content-Type: UNKNOWN
 Description: Microsoft Azure CLI 'profile' Command Module
         ============================================
         
@@ -21,6 +22,25 @@
         
         Release History
         ===============
+        2.0.22
+        ++++++
+        * account list: handle accounts which come from CLI 1.0/ASM mode
+        * (Breaking change): remove `--msi` & `--msi-port` which were tagged 
`deprecating` 2 releases ago
+        * `sdist` is now compatible with wheel 0.31.0
+        
+        2.0.21
+        ++++++
+        * az login: warn on using --identity-port/--msi-port as they become 
useless with imds support
+        
+        2.0.20
+        ++++++
+        * az login: use `--identity` and deprecate `--msi`
+        * enable login/logout commands in cloud shell
+        
+        2.0.19
+        ++++++
+        * Enable `az login` in from interactive mode.
+        
         2.0.18
         ++++++
         * ensure 'get-access-token' work inside a VM with identity
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/azure-cli-profile-2.0.18/azure/cli/command_modules/profile/__init__.py 
new/azure-cli-profile-2.0.22/azure/cli/command_modules/profile/__init__.py
--- old/azure-cli-profile-2.0.18/azure/cli/command_modules/profile/__init__.py  
2018-01-26 17:12:24.000000000 +0100
+++ new/azure-cli-profile-2.0.22/azure/cli/command_modules/profile/__init__.py  
2018-04-06 19:33:13.000000000 +0200
@@ -45,8 +45,8 @@
             c.argument('username', options_list=('--username', '-u'), 
help='user name, service principal, or managed service identity ID')
             c.argument('tenant', options_list=('--tenant', '-t'), help='The 
AAD tenant, must provide when using service principals.')
             c.argument('allow_no_subscriptions', action='store_true', 
help="Support access tenants without subscriptions. It's uncommon but useful to 
run tenant level commands, such as 'az ad'")
-            c.argument('msi', action='store_true', help="Log in using the 
Virtual Machine's identity", arg_group='Managed Service Identity')
-            c.argument('msi_port', help="the port to retrieve tokens for 
login", arg_group='Managed Service Identity')
+            c.argument('identity', options_list=('-i', '--identity'), 
action='store_true', help="Log in using the Virtual Machine's identity", 
arg_group='Managed Service Identity')
+            c.argument('identity_port', type=int, help="the port to retrieve 
tokens for login. Default: 50342", arg_group='Managed Service Identity')
 
         with self.argument_context('logout') as c:
             c.argument('username', help='account user, if missing, logout the 
current active account')
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/azure-cli-profile-2.0.18/azure/cli/command_modules/profile/_format.py 
new/azure-cli-profile-2.0.22/azure/cli/command_modules/profile/_format.py
--- old/azure-cli-profile-2.0.18/azure/cli/command_modules/profile/_format.py   
2018-01-26 17:12:24.000000000 +0100
+++ new/azure-cli-profile-2.0.22/azure/cli/command_modules/profile/_format.py   
2018-04-06 19:33:13.000000000 +0200
@@ -12,7 +12,7 @@
         res = OrderedDict([('Name', r['name']),
                            ('CloudName', r['cloudName']),
                            ('SubscriptionId', r['id']),
-                           ('State', r['state']),
+                           ('State', r.get('state')),
                            ('IsDefault', r['isDefault'])])
         transformed.append(res)
     return transformed
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/azure-cli-profile-2.0.18/azure/cli/command_modules/profile/_help.py 
new/azure-cli-profile-2.0.22/azure/cli/command_modules/profile/_help.py
--- old/azure-cli-profile-2.0.18/azure/cli/command_modules/profile/_help.py     
2018-01-26 17:12:24.000000000 +0100
+++ new/azure-cli-profile-2.0.22/azure/cli/command_modules/profile/_help.py     
2018-04-06 19:33:13.000000000 +0200
@@ -24,10 +24,10 @@
             az login --service-principal -u 
http://azure-cli-2016-08-05-14-31-15 -p ~/mycertfile.pem --tenant 
contoso.onmicrosoft.com
         - name: Log in using a VM's system assigned identity
           text: >
-            az login --msi
+            az login --identity
         - name: Log in using a VM's user assigned identity. Client or object 
ids of the service identity also work
           text: >
-            az login --msi -u 
/subscriptions/<subscriptionId>/resourcegroups/myRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myID
+            az login --identity -u 
/subscriptions/<subscriptionId>/resourcegroups/myRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myID
     """
 
 helps['account'] = """
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/azure-cli-profile-2.0.18/azure/cli/command_modules/profile/custom.py 
new/azure-cli-profile-2.0.22/azure/cli/command_modules/profile/custom.py
--- old/azure-cli-profile-2.0.18/azure/cli/command_modules/profile/custom.py    
2018-01-26 17:12:24.000000000 +0100
+++ new/azure-cli-profile-2.0.22/azure/cli/command_modules/profile/custom.py    
2018-04-06 19:33:13.000000000 +0200
@@ -12,12 +12,13 @@
 from azure.cli.core._profile import Profile
 from azure.cli.core.util import in_cloud_console
 
-from azure.cli.core.commands.validators import DefaultStr
-
 logger = get_logger(__name__)
 
-_CLOUD_CONSOLE_WARNING_TEMPLATE = ("Azure Cloud Shell automatically 
authenticates the user account it was initially"
-                                   " launched under, as a result 'az %s' is 
disabled.")
+
+_CLOUD_CONSOLE_LOGOUT_WARNING = ("Logout successful. Re-login to your initial 
Cloud Shell identity with"
+                                 " 'az login --identity'. Login with a new 
identity with 'az login'.")
+_CLOUD_CONSOLE_LOGIN_WARNING = ("Cloud Shell is automatically authenticated 
under the initial account signed-in with."
+                                " Run 'az login' only if you need to use a 
different account")
 
 
 def _load_subscriptions(cli_ctx, all_clouds=False, refresh=False):
@@ -36,7 +37,7 @@
     for sub in subscriptions:
         sub['cloudName'] = sub.pop('environmentName', None)
     if not all:
-        enabled_ones = [s for s in subscriptions if s['state'] == 'Enabled']
+        enabled_ones = [s for s in subscriptions if s.get('state') == 
'Enabled']
         if len(enabled_ones) != len(subscriptions):
             logger.warning("A few accounts are skipped as they don't have 
'Enabled' state. "
                            "Use '--all' to display them.")
@@ -83,37 +84,37 @@
 
 def account_clear(cmd):
     """Clear all stored subscriptions. To clear individual, use 'logout'"""
+    if in_cloud_console():
+        logger.warning(_CLOUD_CONSOLE_LOGOUT_WARNING)
     profile = Profile(cli_ctx=cmd.cli_ctx)
     profile.logout_all()
 
 
 # pylint: disable=inconsistent-return-statements
-def login(cmd, username=None, password=None, service_principal=None, 
tenant=None,
-          allow_no_subscriptions=False, msi=False, msi_port=DefaultStr(50342)):
+def login(cmd, username=None, password=None, service_principal=None, 
tenant=None, allow_no_subscriptions=False,
+          identity=False, identity_port=None):
     """Log in to access Azure subscriptions"""
-    import os
-    import re
     from adal.adal_error import AdalError
     import requests
 
     # quick argument usage check
-    if (any([password, service_principal, tenant, allow_no_subscriptions]) and
-            any([msi, not getattr(msi_port, 'is_default', None)])):
-        raise CLIError("usage error: '--msi/--msi-port' are not applicable 
with other arguments")
+    if (any([password, service_principal, tenant, allow_no_subscriptions]) and 
identity):
+        raise CLIError("usage error: '--identity' is not applicable with other 
arguments")
 
-    interactive = False
+    if identity_port:
+        logger.warning("'--identity-port' is no longer required to login using 
managed identity."
+                       " This flag will be removed in a future release of 
CLI.")
 
-    profile = Profile(cli_ctx=cmd.cli_ctx)
+    interactive = False
 
-    if in_cloud_console():
-        console_tokens = os.environ.get('AZURE_CONSOLE_TOKENS', None)
-        if console_tokens:
-            return profile.find_subscriptions_in_cloud_console(re.split(';|,', 
console_tokens))
-        logger.warning(_CLOUD_CONSOLE_WARNING_TEMPLATE, 'login')
-        return
+    profile = Profile(cli_ctx=cmd.cli_ctx, async_persist=False)
 
-    if msi:
-        return profile.find_subscriptions_in_vm_with_msi(msi_port, username)
+    if identity:
+        if in_cloud_console():
+            return profile.find_subscriptions_in_cloud_console()
+        return profile.find_subscriptions_in_vm_with_msi(username)
+    elif in_cloud_console():  # tell users they might not need login
+        logger.warning(_CLOUD_CONSOLE_LOGIN_WARNING)
 
     if username:
         if not password:
@@ -125,7 +126,6 @@
         interactive = True
 
     try:
-        profile = Profile(cli_ctx=cmd.cli_ctx)
         subscriptions = profile.find_subscriptions_on_login(
             interactive,
             username,
@@ -154,8 +154,7 @@
 def logout(cmd, username=None):
     """Log out to remove access to Azure subscriptions"""
     if in_cloud_console():
-        logger.warning(_CLOUD_CONSOLE_WARNING_TEMPLATE, 'logout')
-        return
+        logger.warning(_CLOUD_CONSOLE_LOGOUT_WARNING)
 
     profile = Profile(cli_ctx=cmd.cli_ctx)
     if not username:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/azure-cli-profile-2.0.18/azure_cli_profile.egg-info/PKG-INFO 
new/azure-cli-profile-2.0.22/azure_cli_profile.egg-info/PKG-INFO
--- old/azure-cli-profile-2.0.18/azure_cli_profile.egg-info/PKG-INFO    
2018-01-26 17:12:50.000000000 +0100
+++ new/azure-cli-profile-2.0.22/azure_cli_profile.egg-info/PKG-INFO    
2018-04-06 19:33:53.000000000 +0200
@@ -1,11 +1,12 @@
 Metadata-Version: 1.1
 Name: azure-cli-profile
-Version: 2.0.18
+Version: 2.0.22
 Summary: Microsoft Azure Command-Line Tools Profile Command Module
 Home-page: https://github.com/Azure/azure-cli
 Author: Microsoft Corporation
 Author-email: [email protected]
 License: MIT
+Description-Content-Type: UNKNOWN
 Description: Microsoft Azure CLI 'profile' Command Module
         ============================================
         
@@ -21,6 +22,25 @@
         
         Release History
         ===============
+        2.0.22
+        ++++++
+        * account list: handle accounts which come from CLI 1.0/ASM mode
+        * (Breaking change): remove `--msi` & `--msi-port` which were tagged 
`deprecating` 2 releases ago
+        * `sdist` is now compatible with wheel 0.31.0
+        
+        2.0.21
+        ++++++
+        * az login: warn on using --identity-port/--msi-port as they become 
useless with imds support
+        
+        2.0.20
+        ++++++
+        * az login: use `--identity` and deprecate `--msi`
+        * enable login/logout commands in cloud shell
+        
+        2.0.19
+        ++++++
+        * Enable `az login` in from interactive mode.
+        
         2.0.18
         ++++++
         * ensure 'get-access-token' work inside a VM with identity
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/azure-cli-profile-2.0.18/setup.py 
new/azure-cli-profile-2.0.22/setup.py
--- old/azure-cli-profile-2.0.18/setup.py       2018-01-26 17:12:24.000000000 
+0100
+++ new/azure-cli-profile-2.0.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 = "2.0.18"
+VERSION = "2.0.22"
 CLASSIFIERS = [
     'Development Status :: 5 - Production/Stable',
     'Intended Audience :: Developers',


Reply via email to