• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Python config.is_provider_configured函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Python中salt.config.is_provider_configured函数的典型用法代码示例。如果您正苦于以下问题:Python is_provider_configured函数的具体用法?Python is_provider_configured怎么用?Python is_provider_configured使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了is_provider_configured函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。

示例1: test_is_provider_configured_no_alias

 def test_is_provider_configured_no_alias(self):
     '''
     Tests when provider alias is not in opts
     '''
     opts = {'providers': 'test'}
     provider = 'foo:bar'
     self.assertFalse(sconfig.is_provider_configured(opts, provider))
开发者ID:HowardMei,项目名称:saltstack,代码行数:7,代码来源:config_test.py


示例2: test_is_provider_configured_no_driver

 def test_is_provider_configured_no_driver(self):
     '''
     Tests when provider driver is not in opts
     '''
     opts = {'providers': {'foo': 'baz'}}
     provider = 'foo:bar'
     self.assertFalse(sconfig.is_provider_configured(opts, provider))
开发者ID:HowardMei,项目名称:saltstack,代码行数:7,代码来源:config_test.py


示例3: test_is_provider_configured_multiple_driver_not_provider

 def test_is_provider_configured_multiple_driver_not_provider(self):
     '''
     Tests when the drive is not the same as the provider when
     searching through multiple providers
     '''
     opts = {'providers': {'foo': {'bar': {'api_key': 'baz'}}}}
     provider = 'foo'
     self.assertFalse(sconfig.is_provider_configured(opts, provider))
开发者ID:HowardMei,项目名称:saltstack,代码行数:8,代码来源:config_test.py


示例4: get_configured_provider

def get_configured_provider():
    ''' Return the first configured instance.
    '''
    return config.is_provider_configured(
        __opts__,
        __active_provider_name__ or __virtualname__,
        ('token',)
    )
开发者ID:iquaba,项目名称:salt,代码行数:8,代码来源:scaleway.py


示例5: get_configured_provider

def get_configured_provider():
    '''
    Return the first configured instance.
    '''
    return config.is_provider_configured(
        __opts__,
        __active_provider_name__ or 'pyrax'
    )
开发者ID:DavideyLee,项目名称:salt,代码行数:8,代码来源:pyrax.py


示例6: get_configured_provider

def get_configured_provider():
    '''
    Return the first configured instance.
    '''
    return config.is_provider_configured(
        __opts__,
        __active_provider_name__ or 'gogrid',
        ('apikey', 'sharedsecret')
    )
开发者ID:Anbcorp,项目名称:salt,代码行数:9,代码来源:gogrid.py


示例7: get_configured_provider

def get_configured_provider():
    '''
    Return the first configured instance.
    '''
    return config.is_provider_configured(
        __opts__,
        __active_provider_name__ or 'dimensiondata',
        ('user_id', 'key', 'region')
    )
开发者ID:HowardMei,项目名称:saltstack,代码行数:9,代码来源:dimensiondata.py


示例8: get_configured_provider

def get_configured_provider():
    '''
    Return the first configured instance.
    '''
    return config.is_provider_configured(
        __opts__,
        __active_provider_name__ or __virtualname__,
        ('user', 'tenant', 'identity_url', 'compute_region',)
    )
开发者ID:mahak,项目名称:salt,代码行数:9,代码来源:nova.py


示例9: get_configured_provider

def get_configured_provider():
    """
    Return the first configured instance.
    """
    return config.is_provider_configured(
        __opts__,
        __active_provider_name__ or "qingcloud",
        ("access_key_id", "secret_access_key", "zone", "key_filename"),
    )
开发者ID:DaveQB,项目名称:salt,代码行数:9,代码来源:qingcloud.py


示例10: get_configured_provider

def get_configured_provider():
    '''
    Return the first configured instance.
    '''
    return config.is_provider_configured(
        __opts__,
        __active_provider_name__ or 'digital_ocean',
        ('api_key',)
    )
开发者ID:wikimedia,项目名称:operations-debs-salt,代码行数:9,代码来源:digital_ocean.py


示例11: get_configured_provider

def get_configured_provider():
    '''
    Return the first configured instance.
    '''
    return config.is_provider_configured(
        __opts__,
        __active_provider_name__ or 'aws',
        ('id', 'key', 'keyname', 'securitygroup', 'private_key')
    )
开发者ID:Anbcorp,项目名称:salt,代码行数:9,代码来源:libcloud_aws.py


示例12: get_configured_provider

def get_configured_provider():
    '''
    Return the first configured instance.
    '''
    return config.is_provider_configured(
        __opts__,
        __active_provider_name__ or __virtualname__,
        ('access_key_id', 'secret_access_key', 'zone', 'key_filename')
    )
开发者ID:bryson,项目名称:salt,代码行数:9,代码来源:qingcloud.py


示例13: get_configured_provider

def get_configured_provider():
    '''
    Return the first configured instance.
    '''
    return config.is_provider_configured(
        __opts__,
        __active_provider_name__ or __virtualname__,
        ('subscription_id', 'certificate_path',)
    )
开发者ID:MadeiraCloud,项目名称:salt,代码行数:9,代码来源:msazure.py


示例14: get_configured_provider

def get_configured_provider():
    '''
    Return the first configured instance.
    '''
    return config.is_provider_configured(
        __opts__,
        __active_provider_name__ or 'cloudstack',
        ('apikey', 'secretkey', 'host', 'path')
    )
开发者ID:dmyerscough,项目名称:salt,代码行数:9,代码来源:cloudstack.py


示例15: get_configured_provider

def get_configured_provider():
    '''
    Return the first configured instance.
    '''
    return config.is_provider_configured(
        __opts__,
        __active_provider_name__ or __virtualname__,
        ('username', 'password', 'datacenter_id')
    )
开发者ID:bryson,项目名称:salt,代码行数:9,代码来源:profitbricks.py


示例16: get_configured_provider

def get_configured_provider():
    """
    Return the first configured instance.
    """
    configured = config.is_provider_configured(
        __opts__,
        __active_provider_name__ or __virtualname__,
        ()  # keys we need from the provider configuration
    )
    return configured
开发者ID:bryson,项目名称:salt,代码行数:10,代码来源:virtualbox.py


示例17: test_is_provider_configured_key_is_none

 def test_is_provider_configured_key_is_none(self):
     '''
     Tests when a required configuration key is not set
     '''
     opts = {'providers': {'foo': {'bar': {'api_key': None}}}}
     provider = 'foo:bar'
     self.assertFalse(
         sconfig.is_provider_configured(opts,
                                        provider,
                                        required_keys=('api_key',)))
开发者ID:HowardMei,项目名称:saltstack,代码行数:10,代码来源:config_test.py


示例18: get_configured_provider

def get_configured_provider():
    '''
    Return the first configured instance.
    '''

    return config.is_provider_configured(
        __opts__,
        __active_provider_name__ or 'vcloud',
        ('user', 'org', 'secret', 'host',)
    )
开发者ID:techhat,项目名称:salt-cloud-provider-vcloud,代码行数:10,代码来源:vcloud.py


示例19: test_is_provider_configured_success

 def test_is_provider_configured_success(self):
     '''
     Tests successful cloud provider configuration
     '''
     opts = {'providers': {'foo': {'bar': {'api_key': 'baz'}}}}
     provider = 'foo:bar'
     ret = {'api_key': 'baz'}
     self.assertEqual(
         sconfig.is_provider_configured(opts,
                                        provider,
                                        required_keys=('api_key',)), ret)
开发者ID:HowardMei,项目名称:saltstack,代码行数:11,代码来源:config_test.py


示例20: get_configured_provider

def get_configured_provider():
    '''
    Return the first configured instance.
    '''
    return config.is_provider_configured(
        __opts__,
        __active_provider_name__ or 'gce',
        ('project',
         'service_account_email_address',
         'service_account_private_key')
    )
开发者ID:penta-srl,项目名称:salt,代码行数:11,代码来源:gce.py



注:本文中的salt.config.is_provider_configured函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python config.master_config函数代码示例发布时间:2022-05-27
下一篇:
Python config.get_cloud_config_value函数代码示例发布时间:2022-05-27
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap