Exemplo n.º 1
0
 def test_get_default_latest_profile(self):
     with mock.patch('azure.cli.core.cloud.CLOUD_CONFIG_FILE',
                     tempfile.mkstemp()[1]):
         cli = DummyCli()
         clouds = get_clouds(cli)
         for c in clouds:
             self.assertEqual(c.profile, 'latest')
Exemplo n.º 2
0
def get_cloud_name_completion_list(prefix, action, parsed_args, **kwargs):  # pylint: disable=unused-argument
    return [c.name for c in get_clouds()]
Exemplo n.º 3
0
def list_clouds():
    return get_clouds()
Exemplo n.º 4
0
def _helper_get_clouds(_):
    """ Helper method for multiprocessing.Pool.map func that uses throwaway arg """
    get_clouds(DummyCli())
Exemplo n.º 5
0
def get_cloud_name_completion_list(prefix, action, parsed_args, **kwargs):  # pylint: disable=unused-argument
    return [c.name for c in get_clouds()]
Exemplo n.º 6
0
def _helper_get_clouds(_):
    """ Helper method for multiprocessing.Pool.map func that uses throwaway arg """
    get_clouds()
Exemplo n.º 7
0
 def test_get_default_latest_profile(self):
     with mock.patch('azure.cli.core.cloud.CLOUD_CONFIG_FILE', tempfile.mkstemp()[1]):
         clouds = get_clouds()
         for c in clouds:
             self.assertEqual(c.profile, 'latest')
Exemplo n.º 8
0
def list_clouds():
    return get_clouds()
Exemplo n.º 9
0
def list_clouds(cmd):
    return get_clouds(cmd.cli_ctx)
Exemplo n.º 10
0
def list_clouds(cmd):
    return get_clouds(cmd.cli_ctx)