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

Python certdirectory.Path类代码示例

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

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



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

示例1: __init__

 def __init__(self, name='redhat.repo'):
     ConfigParser.__init__(self)
     # note PATH get's expanded with chroot info, etc
     self.path = Path.join(self.PATH, name)
     self.repos_dir = Path.abs(self.PATH)
     self.manage_repos = manage_repos_enabled()
     # Simulate manage repos turned off if no yum.repos.d directory exists.
     # This indicates yum is not installed so clearly no need for us to
     # manage repos.
     if not self.path_exists(self.repos_dir):
         log.warn("%s does not exist, turning manage_repos off." %
                 self.repos_dir)
         self.manage_repos = False
     self.create()
开发者ID:belonesox,项目名称:subscription-manager,代码行数:14,代码来源:repolib.py


示例2: __init__

 def __init__(self, path=None, name=None):
     # note PATH get's expanded with chroot info, etc
     path = path or self.PATH
     name = name or self.NAME
     self.path = Path.join(path, name)
     self.repos_dir = Path.abs(path)
     self.manage_repos = manage_repos_enabled()
     # Simulate manage repos turned off if no repos directory exists.
     # This indicates the corresponding package manager is not installed so
     # clearly no need for us to manage repos.
     if not self.path_exists(self.repos_dir):
         log.warn("%s does not exist, turning manage_repos off." %
                 self.repos_dir)
         self.manage_repos = False
     else:
         self.create()
开发者ID:Januson,项目名称:subscription-manager,代码行数:16,代码来源:repofile.py


示例3: __init__

 def __init__(self, name='redhat.repo'):
     ConfigParser.__init__(self)
     # note PATH get's expanded with chroot info, etc
     self.path = Path.join(self.PATH, name)
     self.repos_dir = Path.abs(self.PATH)
     self.manage_repos = 1
     if CFG.has_option('rhsm', 'manage_repos'):
         self.manage_repos = int(CFG.get('rhsm', 'manage_repos'))
     # Simulate manage repos turned off if no yum.repos.d directory exists.
     # This indicates yum is not installed so clearly no need for us to
     # manage repos.
     if not os.path.exists(self.repos_dir):
         log.warn("%s does not exist, turning manage_repos off." %
                 self.repos_dir)
         self.manage_repos = 0
     self.create()
开发者ID:cgwalters,项目名称:subscription-manager,代码行数:16,代码来源:repolib.py


示例4: installed

 def installed(cls):
     return os.path.exists(Path.abs(cls.PATH))
开发者ID:Januson,项目名称:subscription-manager,代码行数:2,代码来源:repofile.py


示例5: test_normal_pathjoin

 def test_normal_pathjoin(self):
     ed = EntitlementDirectory()
     self.assertEquals('/etc/pki/entitlement/1-key.pem',
             Path.join(ed.productpath(), "1-key.pem"))
开发者ID:jkonecny12,项目名称:subscription-manager,代码行数:4,代码来源:test_certdirectory.py


示例6: test_sysimage_pathjoin

 def test_sysimage_pathjoin(self):
     Path.ROOT = '/mnt/sysimage'
     ed = EntitlementDirectory()
     self.assertEquals('/mnt/sysimage/etc/pki/entitlement/1-key.pem',
             Path.join(ed.productpath(), '1-key.pem'))
开发者ID:jkonecny12,项目名称:subscription-manager,代码行数:5,代码来源:test_certdirectory.py


示例7: test_modified_root_no_trailing_slash

 def test_modified_root_no_trailing_slash(self):
     Path.ROOT = '/mnt/sysimage'
     self.assertEquals('/mnt/sysimage/etc/pki/consumer/',
             Path.abs('/etc/pki/consumer/'))
     self.assertEquals('/mnt/sysimage/etc/pki/consumer/',
             Path.abs('etc/pki/consumer/'))
开发者ID:jkonecny12,项目名称:subscription-manager,代码行数:6,代码来源:test_certdirectory.py


示例8: test_modified_root

 def test_modified_root(self):
     Path.ROOT = '/mnt/sysimage/'
     self.assertEquals('/mnt/sysimage/etc/pki/consumer/',
             Path.abs('/etc/pki/consumer/'))
     self.assertEquals('/mnt/sysimage/etc/pki/consumer/',
             Path.abs('etc/pki/consumer/'))
开发者ID:jkonecny12,项目名称:subscription-manager,代码行数:6,代码来源:test_certdirectory.py


示例9: test_normal_root

 def test_normal_root(self):
     # this is the default, but have to set it as other tests can modify
     # it if they run first.
     self.assertEquals('/etc/pki/consumer/', Path.abs('/etc/pki/consumer/'))
     self.assertEquals('/etc/pki/consumer/', Path.abs('etc/pki/consumer/'))
开发者ID:jkonecny12,项目名称:subscription-manager,代码行数:5,代码来源:test_certdirectory.py


示例10: certpath

 def certpath():
     return str(Path.join(ConsumerIdentity.PATH, ConsumerIdentity.CERT))
开发者ID:Januson,项目名称:subscription-manager,代码行数:2,代码来源:identity.py


示例11: keypath

 def keypath():
     return str(Path.join(ConsumerIdentity.PATH, ConsumerIdentity.KEY))
开发者ID:Januson,项目名称:subscription-manager,代码行数:2,代码来源:identity.py


示例12: __mkdir

 def __mkdir(self):
     path = Path.abs(self.PATH)
     if not os.path.exists(path):
         os.mkdir(path)
开发者ID:Januson,项目名称:subscription-manager,代码行数:4,代码来源:identity.py


示例13: certpath

 def certpath(cls):
     return Path.join(cls.PATH, cls.CERT)
开发者ID:aweiteka,项目名称:subscription-manager,代码行数:2,代码来源:identity.py


示例14: keypath

 def keypath(cls):
     return Path.join(cls.PATH, cls.KEY)
开发者ID:aweiteka,项目名称:subscription-manager,代码行数:2,代码来源:identity.py



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
Python certlib.ConsumerIdentity类代码示例发布时间:2022-05-27
下一篇:
Python models.Subscription类代码示例发布时间: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