Hello community,

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

Package is "azure-cli-profile"

Wed Feb 14 09:31:36 2018 rev:2 rq:574820 version:2.0.18

Changes:
--------
--- /work/SRC/openSUSE:Factory/azure-cli-profile/azure-cli-profile.changes      
2017-11-10 14:54:27.674449944 +0100
+++ /work/SRC/openSUSE:Factory/.azure-cli-profile.new/azure-cli-profile.changes 
2018-02-14 09:31:37.319480059 +0100
@@ -1,0 +2,10 @@
+Thu Feb  8 13:34:51 UTC 2018 - adrian.glaub...@suse.com
+
+- New upstream release
+  + Version 2.0.18
+  + For detailed information about changes see the
+    HISTORY.rst file provided with this package
+- Install HISTORY.rst into doc directory
+- Update Requires from setup.py
+
+-------------------------------------------------------------------

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

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

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

Other differences:
------------------
++++++ azure-cli-profile.spec ++++++
--- /var/tmp/diff_new_pack.I6rOKM/_old  2018-02-14 09:31:37.879459768 +0100
+++ /var/tmp/diff_new_pack.I6rOKM/_new  2018-02-14 09:31:37.883459623 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package azure-cli-profile
 #
-# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -15,8 +15,9 @@
 # Please submit bugfixes or comments via http://bugs.opensuse.org/
 #
 
+
 Name:           azure-cli-profile
-Version:        2.0.13
+Version:        2.0.18
 Release:        0
 Summary:        Microsoft Azure CLI 'profile' Command Module
 License:        MIT
@@ -24,17 +25,17 @@
 Url:            https://github.com/Azure/azure-cli
 Source:         
https://files.pythonhosted.org/packages/source/a/azure-cli-profile/azure-cli-profile-%{version}.tar.gz
 Source1:        LICENSE.txt
-BuildRequires:  python3-devel
-BuildRequires:  python3-setuptools
-BuildRequires:  unzip
 BuildRequires:  azure-cli-command-modules-nspkg
 BuildRequires:  azure-cli-nspkg
 BuildRequires:  python3-azure-nspkg
+BuildRequires:  python3-devel
+BuildRequires:  python3-setuptools
+BuildRequires:  unzip
 Requires:       azure-cli-command-modules-nspkg
+Requires:       azure-cli-core
 Requires:       azure-cli-nspkg
+Requires:       python3-adal >= 0.4.7
 Requires:       python3-azure-nspkg
-Requires:       python3-adal >= 0.4.3
-Requires:       azure-cli-core
 Conflicts:      azure-cli < 2.0.0
 
 BuildArch:      noarch
@@ -65,7 +66,8 @@
 
 %files
 %defattr(-,root,root,-)
-%doc LICENSE.txt README.rst
+%doc HISTORY.rst LICENSE.txt README.rst
 %{python3_sitelib}/azure/cli/command_modules/profile
 %{python3_sitelib}/azure_cli_profile-*.egg-info
+
 %changelog

++++++ azure-cli-profile-2.0.13.tar.gz -> azure-cli-profile-2.0.18.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/azure-cli-profile-2.0.13/HISTORY.rst 
new/azure-cli-profile-2.0.18/HISTORY.rst
--- old/azure-cli-profile-2.0.13/HISTORY.rst    2017-09-23 01:47:00.000000000 
+0200
+++ new/azure-cli-profile-2.0.18/HISTORY.rst    2018-01-26 17:12:24.000000000 
+0100
@@ -2,6 +2,26 @@
 
 Release History
 ===============
+2.0.18
+++++++
+* ensure 'get-access-token' work inside a VM with identity
+
+2.0.17
+++++++
+* Update for CLI core changes.
+
+2.0.16
+++++++
+* support login with user assigned identities
+
+2.0.15
+++++++
+* minor fixes
+
+2.0.14 (2017-10-09)
++++++++++++++++++++
+* minor fixes
+
 2.0.13 (2017-09-22)
 +++++++++++++++++++
 * minor fixes
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/azure-cli-profile-2.0.13/PKG-INFO 
new/azure-cli-profile-2.0.18/PKG-INFO
--- old/azure-cli-profile-2.0.13/PKG-INFO       2017-09-23 01:48:00.000000000 
+0200
+++ new/azure-cli-profile-2.0.18/PKG-INFO       2018-01-26 17:12:50.000000000 
+0100
@@ -1,12 +1,11 @@
 Metadata-Version: 1.1
 Name: azure-cli-profile
-Version: 2.0.13
+Version: 2.0.18
 Summary: Microsoft Azure Command-Line Tools Profile Command Module
 Home-page: https://github.com/Azure/azure-cli
 Author: Microsoft Corporation
 Author-email: azpy...@microsoft.com
 License: MIT
-Description-Content-Type: UNKNOWN
 Description: Microsoft Azure CLI 'profile' Command Module
         ============================================
         
@@ -22,6 +21,26 @@
         
         Release History
         ===============
+        2.0.18
+        ++++++
+        * ensure 'get-access-token' work inside a VM with identity
+        
+        2.0.17
+        ++++++
+        * Update for CLI core changes.
+        
+        2.0.16
+        ++++++
+        * support login with user assigned identities
+        
+        2.0.15
+        ++++++
+        * minor fixes
+        
+        2.0.14 (2017-10-09)
+        +++++++++++++++++++
+        * minor fixes
+        
         2.0.13 (2017-09-22)
         +++++++++++++++++++
         * minor fixes
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/azure-cli-profile-2.0.13/azure/cli/command_modules/profile/__init__.py 
new/azure-cli-profile-2.0.18/azure/cli/command_modules/profile/__init__.py
--- old/azure-cli-profile-2.0.13/azure/cli/command_modules/profile/__init__.py  
2017-09-23 01:47:00.000000000 +0200
+++ new/azure-cli-profile-2.0.18/azure/cli/command_modules/profile/__init__.py  
2018-01-26 17:12:24.000000000 +0100
@@ -3,12 +3,63 @@
 # Licensed under the MIT License. See License.txt in the project root for 
license information.
 # 
--------------------------------------------------------------------------------------------
 
+from azure.cli.core import AzCommandsLoader
+from azure.cli.core.commands import CliCommandType
+
+from azure.cli.command_modules.profile._completers import 
get_subscription_id_list
+from azure.cli.command_modules.profile._format import transform_account_list
 import azure.cli.command_modules.profile._help  # pylint: disable=unused-import
 
 
-def load_params(_):
-    import azure.cli.command_modules.profile._params  # pylint: 
disable=redefined-outer-name, unused-variable
+class ProfileCommandsLoader(AzCommandsLoader):
+
+    def __init__(self, cli_ctx=None):
+        super(ProfileCommandsLoader, self).__init__(cli_ctx=cli_ctx)
+
+    def load_command_table(self, args):
+
+        profile_custom = CliCommandType(
+            operations_tmpl='azure.cli.command_modules.profile.custom#{}'
+        )
+
+        with self.command_group('', profile_custom) as g:
+            g.command('login', 'login')
+            g.command('logout', 'logout')
+
+        with self.command_group('account', profile_custom) as g:
+            g.command('list', 'list_subscriptions', 
table_transformer=transform_account_list)
+            g.command('set', 'set_active_subscription')
+            g.command('show', 'show_subscription')
+            g.command('clear', 'account_clear')
+            g.command('list-locations', 'list_locations')
+            g.command('get-access-token', 'get_access_token')
+
+        return self.command_table
+
+    # pylint: disable=line-too-long
+    def load_arguments(self, command):
+
+        with self.argument_context('login') as c:
+            c.argument('password', options_list=('--password', '-p'), 
help="Credentials like user password, or for a service principal, provide 
client secret or a pem file with key and public certificate. Will prompt if not 
given.")
+            c.argument('service_principal', action='store_true', help='The 
credential representing a service principal.')
+            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')
+
+        with self.argument_context('logout') as c:
+            c.argument('username', help='account user, if missing, logout the 
current active account')
+
+        with self.argument_context('account') as c:
+            c.argument('subscription', options_list=('--subscription', '-s'), 
help='Name or ID of subscription.', completer=get_subscription_id_list)
+
+        with self.argument_context('account list') as c:
+            c.argument('all', help="List all subscriptions, rather just 
'Enabled' ones", action='store_true')
+            c.argument('refresh', help="retrieve up-to-date subscriptions from 
server", action='store_true')
+
+        with self.argument_context('account show') as c:
+            c.argument('show_auth_for_sdk', options_list=('--sdk-auth',), 
action='store_true', help='output result in compatible with Azure SDK auth 
file')
 
 
-def load_commands():
-    import azure.cli.command_modules.profile.commands  # pylint: 
disable=redefined-outer-name, unused-variable
+COMMAND_LOADER_CLS = ProfileCommandsLoader
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/azure-cli-profile-2.0.13/azure/cli/command_modules/profile/_completers.py 
new/azure-cli-profile-2.0.18/azure/cli/command_modules/profile/_completers.py
--- 
old/azure-cli-profile-2.0.13/azure/cli/command_modules/profile/_completers.py   
    1970-01-01 01:00:00.000000000 +0100
+++ 
new/azure-cli-profile-2.0.18/azure/cli/command_modules/profile/_completers.py   
    2018-01-26 17:12:24.000000000 +0100
@@ -0,0 +1,18 @@
+# 
--------------------------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for 
license information.
+# 
--------------------------------------------------------------------------------------------
+
+from azure.cli.core.decorators import Completer
+
+from azure.cli.command_modules.profile.custom import _load_subscriptions
+
+
+@Completer
+def get_subscription_id_list(cmd, prefix, namespace, **kwargs):  # pylint: 
disable=unused-argument
+    subscriptions = _load_subscriptions(cmd.cli_ctx)
+    result = []
+    for subscription in subscriptions:
+        result.append(subscription['id'])
+        result.append(subscription['name'])
+    return result
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/azure-cli-profile-2.0.13/azure/cli/command_modules/profile/_format.py 
new/azure-cli-profile-2.0.18/azure/cli/command_modules/profile/_format.py
--- old/azure-cli-profile-2.0.13/azure/cli/command_modules/profile/_format.py   
1970-01-01 01:00:00.000000000 +0100
+++ new/azure-cli-profile-2.0.18/azure/cli/command_modules/profile/_format.py   
2018-01-26 17:12:24.000000000 +0100
@@ -0,0 +1,18 @@
+# 
--------------------------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for 
license information.
+# 
--------------------------------------------------------------------------------------------
+
+from collections import OrderedDict
+
+
+def transform_account_list(result):
+    transformed = []
+    for r in result:
+        res = OrderedDict([('Name', r['name']),
+                           ('CloudName', r['cloudName']),
+                           ('SubscriptionId', r['id']),
+                           ('State', r['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.13/azure/cli/command_modules/profile/_help.py 
new/azure-cli-profile-2.0.18/azure/cli/command_modules/profile/_help.py
--- old/azure-cli-profile-2.0.13/azure/cli/command_modules/profile/_help.py     
2017-09-23 01:47:00.000000000 +0200
+++ new/azure-cli-profile-2.0.18/azure/cli/command_modules/profile/_help.py     
2018-01-26 17:12:24.000000000 +0100
@@ -4,7 +4,7 @@
 # 
--------------------------------------------------------------------------------------------
 
 
-from azure.cli.core.help_files import helps  # pylint: disable=unused-import
+from knack.help_files import helps  # pylint: disable=unused-import
 
 helps['login'] = """
     type: command
@@ -22,9 +22,12 @@
         - name: Log in with a service principal using client certificate.
           text: >
             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 managed service identity (MSI)
+        - name: Log in using a VM's system assigned identity
           text: >
-            az login -msi
+            az login --msi
+        - 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
     """
 
 helps['account'] = """
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/azure-cli-profile-2.0.13/azure/cli/command_modules/profile/_params.py 
new/azure-cli-profile-2.0.18/azure/cli/command_modules/profile/_params.py
--- old/azure-cli-profile-2.0.13/azure/cli/command_modules/profile/_params.py   
2017-09-23 01:47:00.000000000 +0200
+++ new/azure-cli-profile-2.0.18/azure/cli/command_modules/profile/_params.py   
1970-01-01 01:00:00.000000000 +0100
@@ -1,33 +0,0 @@
-# 
--------------------------------------------------------------------------------------------
-# Copyright (c) Microsoft Corporation. All rights reserved.
-# Licensed under the MIT License. See License.txt in the project root for 
license information.
-# 
--------------------------------------------------------------------------------------------
-
-# pylint: disable=line-too-long
-from azure.cli.core.commands import register_cli_argument
-from .custom import load_subscriptions
-
-
-def get_subscription_id_list(prefix, **kwargs):  # pylint: 
disable=unused-argument
-    subscriptions = load_subscriptions()
-    result = []
-    for subscription in subscriptions:
-        result.append(subscription['id'])
-        result.append(subscription['name'])
-    return result
-
-
-register_cli_argument('login', 'password', options_list=('--password', '-p'), 
help="Credentials like user password, or for a service principal, provide 
client secret or a pem file with key and public certificate. Will prompt if not 
given.")
-register_cli_argument('login', 'service_principal', action='store_true', 
help='The credential representing a service principal.')
-register_cli_argument('login', 'username', options_list=('--username', '-u'), 
help='Organization id or service principal')
-register_cli_argument('login', 'tenant', options_list=('--tenant', '-t'), 
help='The AAD tenant, must provide when using service principals.')
-register_cli_argument('login', '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'")
-register_cli_argument('login', 'msi', action='store_true', help="Log in using 
the Virtual Machine's identity", arg_group='Managed Service Identity')
-register_cli_argument('login', 'msi_port', help="the port to retrieve tokens 
for login", arg_group='Managed Service Identity')
-
-register_cli_argument('logout', 'username', help='account user, if missing, 
logout the current active account')
-
-register_cli_argument('account', 'subscription', 
options_list=('--subscription', '-s'), help='Name or ID of subscription.', 
completer=get_subscription_id_list)
-register_cli_argument('account list', 'all', help="List all subscriptions, 
rather just 'Enabled' ones", action='store_true')
-register_cli_argument('account list', 'refresh', help="retrieve up to date 
subscriptions from server", action='store_true')
-register_cli_argument('account show', 'show_auth_for_sdk', 
options_list=('--sdk-auth',), action='store_true', help='output result in 
compatible with Azure SDK auth file')
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/azure-cli-profile-2.0.13/azure/cli/command_modules/profile/commands.py 
new/azure-cli-profile-2.0.18/azure/cli/command_modules/profile/commands.py
--- old/azure-cli-profile-2.0.13/azure/cli/command_modules/profile/commands.py  
2017-09-23 01:47:00.000000000 +0200
+++ new/azure-cli-profile-2.0.18/azure/cli/command_modules/profile/commands.py  
1970-01-01 01:00:00.000000000 +0100
@@ -1,35 +0,0 @@
-# 
--------------------------------------------------------------------------------------------
-# Copyright (c) Microsoft Corporation. All rights reserved.
-# Licensed under the MIT License. See License.txt in the project root for 
license information.
-# 
--------------------------------------------------------------------------------------------
-
-
-from collections import OrderedDict
-
-from azure.cli.core.commands import cli_command
-
-cli_command(__name__, 'login', 
'azure.cli.command_modules.profile.custom#login')
-cli_command(__name__, 'logout', 
'azure.cli.command_modules.profile.custom#logout')
-
-
-def transform_account_list(result):
-    transformed = []
-    for r in result:
-        res = OrderedDict([('Name', r['name']),
-                           ('CloudName', r['cloudName']),
-                           ('SubscriptionId', r['id']),
-                           ('State', r['state']),
-                           ('IsDefault', r['isDefault'])])
-        transformed.append(res)
-    return transformed
-
-
-_custom_module = 'azure.cli.command_modules.profile.custom#'
-
-cli_command(__name__, 'account list', _custom_module + 'list_subscriptions',
-            table_transformer=transform_account_list)
-cli_command(__name__, 'account set', _custom_module + 
'set_active_subscription')
-cli_command(__name__, 'account show', _custom_module + 'show_subscription')
-cli_command(__name__, 'account clear', _custom_module + 'account_clear')
-cli_command(__name__, 'account list-locations', _custom_module + 
'list_locations')
-cli_command(__name__, 'account get-access-token', _custom_module + 
'get_access_token')
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/azure-cli-profile-2.0.13/azure/cli/command_modules/profile/custom.py 
new/azure-cli-profile-2.0.18/azure/cli/command_modules/profile/custom.py
--- old/azure-cli-profile-2.0.13/azure/cli/command_modules/profile/custom.py    
2017-09-23 01:47:00.000000000 +0200
+++ new/azure-cli-profile-2.0.18/azure/cli/command_modules/profile/custom.py    
2018-01-26 17:12:24.000000000 +0100
@@ -5,31 +5,32 @@
 
 from __future__ import print_function
 
-from azure.cli.core.prompting import prompt_pass, NoTTYException
-from azure.cli.core import get_az_logger
+from knack.log import get_logger
+from knack.prompting import prompt_pass, NoTTYException
+from knack.util import CLIError
+
 from azure.cli.core._profile import Profile
-from azure.cli.core.util import CLIError, in_cloud_console
-from azure.cli.core.cloud import get_active_cloud
-from azure.cli.core.commands.validators import DefaultStr
+from azure.cli.core.util import in_cloud_console
 
+from azure.cli.core.commands.validators import DefaultStr
 
-logger = get_az_logger(__name__)
+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.")
 
 
-def load_subscriptions(all_clouds=False, refresh=False):
-    profile = Profile()
+def _load_subscriptions(cli_ctx, all_clouds=False, refresh=False):
+    profile = Profile(cli_ctx=cli_ctx)
     if refresh:
         subscriptions = profile.refresh_accounts()
     subscriptions = profile.load_cached_subscriptions(all_clouds)
     return subscriptions
 
 
-def list_subscriptions(all=False, refresh=False):  # pylint: 
disable=redefined-builtin
+def list_subscriptions(cmd, all=False, refresh=False):  # pylint: 
disable=redefined-builtin
     """List the imported subscriptions."""
-    subscriptions = load_subscriptions(all_clouds=all, refresh=refresh)
+    subscriptions = _load_subscriptions(cmd.cli_ctx, all_clouds=all, 
refresh=refresh)
     if not subscriptions:
         logger.warning('Please run "az login" to access your accounts.')
     for sub in subscriptions:
@@ -43,9 +44,10 @@
     return subscriptions
 
 
-def show_subscription(subscription=None, show_auth_for_sdk=None):
+# pylint: disable=inconsistent-return-statements
+def show_subscription(cmd, subscription=None, show_auth_for_sdk=None):
     import json
-    profile = Profile()
+    profile = Profile(cli_ctx=cmd.cli_ctx)
     if not show_auth_for_sdk:
         return profile.get_subscription(subscription)
 
@@ -53,39 +55,40 @@
     print(json.dumps(profile.get_sp_auth_info(subscription), indent=2))
 
 
-def get_access_token(subscription=None, resource=None):
+def get_access_token(cmd, subscription=None, resource=None):
     '''
     get AAD token to access to a specified resource
     :param resource: Azure resource endpoints. Default to Azure Resource 
Manager
     Use 'az cloud show' command for other Azure resources
     '''
-    resource = (resource or 
get_active_cloud().endpoints.active_directory_resource_id)
-    profile = Profile()
-    creds, subscription, tenant = profile.get_raw_token(resource, 
subscription=subscription)
+    resource = (resource or 
cmd.cli_ctx.cloud.endpoints.active_directory_resource_id)
+    profile = Profile(cli_ctx=cmd.cli_ctx)
+    creds, subscription, tenant = 
profile.get_raw_token(subscription=subscription, resource=resource)
     return {
         'tokenType': creds[0],
         'accessToken': creds[1],
-        'expiresOn': creds[2]['expiresOn'],
+        'expiresOn': creds[2].get('expiresOn', 'N/A'),
         'subscription': subscription,
         'tenant': tenant
     }
 
 
-def set_active_subscription(subscription):
+def set_active_subscription(cmd, subscription):
     """Set the current subscription"""
+    profile = Profile(cli_ctx=cmd.cli_ctx)
     if not id:
         raise CLIError('Please provide subscription id or unique name.')
-    profile = Profile()
     profile.set_active_subscription(subscription)
 
 
-def account_clear():
+def account_clear(cmd):
     """Clear all stored subscriptions. To clear individual, use 'logout'"""
-    profile = Profile()
+    profile = Profile(cli_ctx=cmd.cli_ctx)
     profile.logout_all()
 
 
-def login(username=None, password=None, service_principal=None, tenant=None,
+# 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)):
     """Log in to access Azure subscriptions"""
     import os
@@ -94,13 +97,13 @@
     import requests
 
     # quick argument usage check
-    if (any([username, password, service_principal, tenant, 
allow_no_subscriptions]) and
+    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")
 
     interactive = False
 
-    profile = Profile()
+    profile = Profile(cli_ctx=cmd.cli_ctx)
 
     if in_cloud_console():
         console_tokens = os.environ.get('AZURE_CONSOLE_TOKENS', None)
@@ -110,7 +113,7 @@
         return
 
     if msi:
-        return profile.find_subscriptions_in_vm_with_msi(msi_port)
+        return profile.find_subscriptions_in_vm_with_msi(msi_port, username)
 
     if username:
         if not password:
@@ -122,6 +125,7 @@
         interactive = True
 
     try:
+        profile = Profile(cli_ctx=cmd.cli_ctx)
         subscriptions = profile.find_subscriptions_on_login(
             interactive,
             username,
@@ -147,18 +151,18 @@
     return all_subscriptions
 
 
-def logout(username=None):
+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
 
-    profile = Profile()
+    profile = Profile(cli_ctx=cmd.cli_ctx)
     if not username:
         username = profile.get_current_account_user()
     profile.logout(username)
 
 
-def list_locations():
+def list_locations(cmd):
     from azure.cli.core.commands.parameters import get_subscription_locations
-    return get_subscription_locations()
+    return get_subscription_locations(cmd.cli_ctx)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/azure-cli-profile-2.0.13/azure_cli_profile.egg-info/PKG-INFO 
new/azure-cli-profile-2.0.18/azure_cli_profile.egg-info/PKG-INFO
--- old/azure-cli-profile-2.0.13/azure_cli_profile.egg-info/PKG-INFO    
2017-09-23 01:47:59.000000000 +0200
+++ new/azure-cli-profile-2.0.18/azure_cli_profile.egg-info/PKG-INFO    
2018-01-26 17:12:50.000000000 +0100
@@ -1,12 +1,11 @@
 Metadata-Version: 1.1
 Name: azure-cli-profile
-Version: 2.0.13
+Version: 2.0.18
 Summary: Microsoft Azure Command-Line Tools Profile Command Module
 Home-page: https://github.com/Azure/azure-cli
 Author: Microsoft Corporation
 Author-email: azpy...@microsoft.com
 License: MIT
-Description-Content-Type: UNKNOWN
 Description: Microsoft Azure CLI 'profile' Command Module
         ============================================
         
@@ -22,6 +21,26 @@
         
         Release History
         ===============
+        2.0.18
+        ++++++
+        * ensure 'get-access-token' work inside a VM with identity
+        
+        2.0.17
+        ++++++
+        * Update for CLI core changes.
+        
+        2.0.16
+        ++++++
+        * support login with user assigned identities
+        
+        2.0.15
+        ++++++
+        * minor fixes
+        
+        2.0.14 (2017-10-09)
+        +++++++++++++++++++
+        * minor fixes
+        
         2.0.13 (2017-09-22)
         +++++++++++++++++++
         * minor fixes
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/azure-cli-profile-2.0.13/azure_cli_profile.egg-info/SOURCES.txt 
new/azure-cli-profile-2.0.18/azure_cli_profile.egg-info/SOURCES.txt
--- old/azure-cli-profile-2.0.13/azure_cli_profile.egg-info/SOURCES.txt 
2017-09-23 01:47:59.000000000 +0200
+++ new/azure-cli-profile-2.0.18/azure_cli_profile.egg-info/SOURCES.txt 
2018-01-26 17:12:50.000000000 +0100
@@ -7,9 +7,9 @@
 azure/cli/__init__.py
 azure/cli/command_modules/__init__.py
 azure/cli/command_modules/profile/__init__.py
+azure/cli/command_modules/profile/_completers.py
+azure/cli/command_modules/profile/_format.py
 azure/cli/command_modules/profile/_help.py
-azure/cli/command_modules/profile/_params.py
-azure/cli/command_modules/profile/commands.py
 azure/cli/command_modules/profile/custom.py
 azure_cli_profile.egg-info/PKG-INFO
 azure_cli_profile.egg-info/SOURCES.txt
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/azure-cli-profile-2.0.13/azure_cli_profile.egg-info/requires.txt 
new/azure-cli-profile-2.0.18/azure_cli_profile.egg-info/requires.txt
--- old/azure-cli-profile-2.0.13/azure_cli_profile.egg-info/requires.txt        
2017-09-23 01:47:59.000000000 +0200
+++ new/azure-cli-profile-2.0.18/azure_cli_profile.egg-info/requires.txt        
2018-01-26 17:12:50.000000000 +0100
@@ -1,3 +1,2 @@
-adal>=0.4.3
+adal>=0.4.7
 azure-cli-core
-azure-cli-command-modules-nspkg>=2.0.0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/azure-cli-profile-2.0.13/setup.py 
new/azure-cli-profile-2.0.18/setup.py
--- old/azure-cli-profile-2.0.13/setup.py       2017-09-23 01:47:59.000000000 
+0200
+++ new/azure-cli-profile-2.0.18/setup.py       2018-01-26 17:12:24.000000000 
+0100
@@ -14,7 +14,7 @@
     logger.warn("Wheel is not available, disabling bdist_wheel hook")
     cmdclass = {}
 
-VERSION = "2.0.13"
+VERSION = "2.0.18"
 CLASSIFIERS = [
     'Development Status :: 5 - Production/Stable',
     'Intended Audience :: Developers',
@@ -30,7 +30,7 @@
 ]
 
 DEPENDENCIES = [
-    'adal>=0.4.3',
+    'adal>=0.4.7',
     'azure-cli-core',
 ]
 


Reply via email to